Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/bradrisse/ccxt into bradr…
Browse files Browse the repository at this point in the history
…isse-master
  • Loading branch information
kroitor committed May 31, 2018
2 parents 66d903e + 348472d commit c153dbc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions js/base/errors.js
Expand Up @@ -25,6 +25,7 @@ module.exports = subclass (
'OrderNotFound': {},
'OrderNotCached': {},
'CancelPending': {},
'AccountFrozen': {},
},
'NotSupported': {},
},
Expand Down
4 changes: 3 additions & 1 deletion js/poloniex.js
Expand Up @@ -3,7 +3,7 @@
// ---------------------------------------------------------------------------

const Exchange = require ('./base/Exchange');
const { ExchangeError, ExchangeNotAvailable, RequestTimeout, AuthenticationError, DDoSProtection, InsufficientFunds, OrderNotFound, OrderNotCached, InvalidOrder, CancelPending, InvalidNonce } = require ('./base/errors');
const { ExchangeError, ExchangeNotAvailable, RequestTimeout, AuthenticationError, DDoSProtection, InsufficientFunds, OrderNotFound, OrderNotCached, InvalidOrder, AccountFrozen, CancelPending, InvalidNonce } = require ('./base/errors');

// ---------------------------------------------------------------------------

Expand Down Expand Up @@ -843,6 +843,8 @@ module.exports = class poloniex extends Exchange {
throw new DDoSProtection (feedback);
} else if (error.indexOf ('Total must be at least') >= 0) {
throw new InvalidOrder (feedback);
} else if (error.indexOf('This account is frozen.') >= 0) {
throw new AccountFrozen (feedback);
} else if (error.indexOf ('Not enough') >= 0) {
throw new InsufficientFunds (feedback);
} else if (error.indexOf ('Nonce must be greater') >= 0) {
Expand Down

0 comments on commit c153dbc

Please sign in to comment.