Skip to content

Commit

Permalink
gdax price too precise → InvalidOrder fix ccxt#427
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Oct 31, 2017
1 parent ed47851 commit b124f57
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/gdax.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,12 @@ module.exports = class gdax extends Exchange {

async request (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
let response = await this.fetch2 (path, api, method, params, headers, body);
if ('message' in response)
if ('message' in response) {
if (response['message'].indexOf ('price too precise') >= 0) {
throw new InvalidOrder (this.id + ' ' + this.json (response));
}
throw new ExchangeError (this.id + ' ' + this.json (response));
}
return response;
}
}

0 comments on commit b124f57

Please sign in to comment.