Skip to content

Commit

Permalink
bittrex ceiling order type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Jan 19, 2021
1 parent ed5b84f commit caf9129
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/bittrex.js
Expand Up @@ -763,10 +763,8 @@ module.exports = class bittrex extends Exchange {
if (isCeilingLimit) {
request['limit'] = this.priceToPrecision (symbol, price);
cost = this.safeFloat2 (params, 'ceiling', 'cost', amount);
params = this.omit (params, [ 'ceiling', 'cost' ]);
} else if (isCeilingMarket) {
cost = this.safeFloat2 (params, 'ceiling', 'cost');
params = this.omit (params, [ 'ceiling', 'cost' ]);
if (cost === undefined) {
if (price === undefined) {
cost = amount;
Expand All @@ -775,6 +773,7 @@ module.exports = class bittrex extends Exchange {
}
}
}
params = this.omit (params, [ 'ceiling', 'cost' ]);
request['ceiling'] = this.costToPrecision (symbol, cost);
// bittrex only accepts IMMEDIATE_OR_CANCEL or FILL_OR_KILL for ceiling orders
request['timeInForce'] = 'IMMEDIATE_OR_CANCEL';
Expand Down

0 comments on commit caf9129

Please sign in to comment.