Skip to content

Commit

Permalink
move default min costs to this.options merge #3032
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Jun 5, 2018
1 parent 6fdfb6e commit d293962
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions js/gateio.js
Expand Up @@ -113,6 +113,17 @@ module.exports = class gateio extends Exchange {
'20': 'Your order size is too small',
'21': 'You don\'t have enough fund',
},
'options': {
'limits': {
'cost': {
'min': {
'BTC': 0.0001,
'ETH': 0.001,
'USDT': 1,
},
},
},
},
});
}

Expand Down Expand Up @@ -145,16 +156,10 @@ module.exports = class gateio extends Exchange {
'min': Math.pow (10, -details['decimal_places']),
'max': undefined,
};
let minimumCost = {
'USDT': 1,
'ETH': 0.001,
'BTC': 0.0001,
}[quote];
if (typeof minimumCost === 'undefined') {
minimumCost = amountLimits['min'] * priceLimits['min'];
}
let defaultCost = amountLimits['min'] * priceLimits['min'];
let minCost = this.safeFloat (this.options['limits']['cost']['min'], quote, defaultCost);
let costLimits = {
'min': minimumCost,
'min': minCost,
'max': undefined,
};
let limits = {
Expand Down

0 comments on commit d293962

Please sign in to comment.