IPC removed, replaced by WS

This commit is contained in:
Luis Fernando Molina committed 2020-04-06 08:33:07 +02:00
1 parent ba4217fb24
commit 656c193511
503 files changed
+28128 -34498

No files matched your search

+11 -13
View File
@@ -3,7 +3,7 @@
// ---------------------------------------------------------------------------
const Exchange = require ('./base/Exchange');
const { BadSymbol, ExchangeError, AuthenticationError, ArgumentsRequired, ExchangeNotAvailable } = require ('./base/errors');
const { RateLimitExceeded, BadSymbol, OrderNotFound, ExchangeError, AuthenticationError, ArgumentsRequired, ExchangeNotAvailable } = require ('./base/errors');
// ---------------------------------------------------------------------------
@@ -77,18 +77,10 @@ module.exports = class bw extends Exchange {
},
'fees': {
'trading': {
'tierBased': true,
'tierBased': false,
'percentage': true,
'taker': 0.2 / 100,
'maker': 0.2 / 100,
'tiers': {
'taker': [
[ 0, 0.2 / 100 ],
],
'maker': [
[ 0, 0.2 / 100 ],
],
},
},
'funding': {
},
@@ -97,7 +89,9 @@ module.exports = class bw extends Exchange {
'exact': {
'999': AuthenticationError,
'1000': ExchangeNotAvailable, // {"datas":null,"resMsg":{"message":"getKlines error:data not exitsts\uff0cplease wait ,dataType=4002_KLINE_1M","method":null,"code":"1000"}}
'2012': OrderNotFound, // {"datas":null,"resMsg":{"message":"entrust not exists or on dealing with system","method":null,"code":"2012"}}
'5017': BadSymbol, // {"datas":null,"resMsg":{"message":"market not exist","method":null,"code":"5017"}}
'10001': RateLimitExceeded, // {"resMsg":{"code":"10001","message":"API frequency limit"}}
},
},
'api': {
@@ -314,7 +308,7 @@ module.exports = class bw extends Exchange {
},
'withdraw': {
'min': undefined,
'max': parseFloat (this.safeInteger (currency, 'onceDrawLimit')),
'max': this.safeFloat (currency, 'onceDrawLimit'),
},
},
};
@@ -343,8 +337,10 @@ module.exports = class bw extends Exchange {
if (marketId in this.markets_by_id) {
market = this.markets_by_id[marketId];
}
if ((symbol === undefined) && (market !== undefined)) {
if (market !== undefined) {
symbol = market['symbol'];
} else {
symbol = marketId;
}
const timestamp = this.milliseconds ();
const close = parseFloat (this.safeValue (ticker, 1));
@@ -614,7 +610,7 @@ module.exports = class bw extends Exchange {
const result = { 'info': response };
for (let i = 0; i < balances.length; i++) {
const balance = balances[i];
const currencyId = this.safeInteger (balance, 'currencyTypeId');
const currencyId = this.safeString (balance, 'currencyTypeId');
const code = this.safeCurrencyCode (currencyId);
const account = this.account ();
account['free'] = this.safeFloat (balance, 'amount');
@@ -670,6 +666,7 @@ module.exports = class bw extends Exchange {
'status': 'open',
'fee': undefined,
'trades': undefined,
'clientOrderId': undefined,
};
}
@@ -739,6 +736,7 @@ module.exports = class bw extends Exchange {
return {
'info': order,
'id': this.safeString (order, 'entrustId'),
'clientOrderId': undefined,
'timestamp': timestamp,
'datetime': this.iso8601 (timestamp),
'lastTradeTimestamp': undefined,