Skip to content

Commit

Permalink
Merge pull request #55 from TrustyFund/54-wait-broadcast
Browse files Browse the repository at this point in the history
Add fill_or_kill true to sell orders
  • Loading branch information
roma219 authored Apr 2, 2018
2 parents e1952d6 + f45fa0f commit 7f0bcd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/services/api/market.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ class Market {
asset_id: this.base,
amount: toReceive
},
userId
userId,
fillOrKill: true
};
const order = utils.createOrder(orderObject);

Expand Down
4 changes: 2 additions & 2 deletions src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,15 @@ export const distributionSampling = (proportions, accuracy) => {
);
};

export const createOrder = ({ sell, receive, userId }) => {
export const createOrder = ({ sell, receive, userId, fillOrKill = false }) => {
const expiration = new Date();
expiration.setYear(expiration.getFullYear() + 5);
return {
seller: userId,
amount_to_sell: sell,
min_to_receive: receive,
expiration,
fill_or_kill: false
fill_or_kill: fillOrKill
};
};

Expand Down

0 comments on commit 7f0bcd8

Please sign in to comment.