ccxt 4.1.17 → 4.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/build.sh +2 -0
- package/dist/ccxt.browser.js +501 -261
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +2 -5
- package/dist/cjs/src/base/Exchange.js +100 -2
- package/dist/cjs/src/base/functions/type.js +1 -1
- package/dist/cjs/src/bigone.js +1 -1
- package/dist/cjs/src/binance.js +4 -3
- package/dist/cjs/src/bit2c.js +4 -4
- package/dist/cjs/src/bitfinex.js +1 -1
- package/dist/cjs/src/bitfinex2.js +1 -1
- package/dist/cjs/src/bitget.js +160 -27
- package/dist/cjs/src/bithumb.js +1 -1
- package/dist/cjs/src/bitmart.js +6 -7
- package/dist/cjs/src/bitmex.js +1 -1
- package/dist/cjs/src/bitpanda.js +1 -1
- package/dist/cjs/src/bitstamp.js +2 -3
- package/dist/cjs/src/bitstamp1.js +12 -12
- package/dist/cjs/src/bittrex.js +3 -3
- package/dist/cjs/src/bl3p.js +1 -1
- package/dist/cjs/src/btcalpha.js +2 -3
- package/dist/cjs/src/btcbox.js +4 -4
- package/dist/cjs/src/btctradeua.js +17 -17
- package/dist/cjs/src/bybit.js +1 -1
- package/dist/cjs/src/cex.js +1 -1
- package/dist/cjs/src/coinbase.js +5 -6
- package/dist/cjs/src/coinbasepro.js +1 -1
- package/dist/cjs/src/coincheck.js +5 -5
- package/dist/cjs/src/coinex.js +1 -1
- package/dist/cjs/src/coinfalcon.js +1 -1
- package/dist/cjs/src/coinmate.js +2 -2
- package/dist/cjs/src/coinone.js +1 -1
- package/dist/cjs/src/coinsph.js +1 -0
- package/dist/cjs/src/coinspot.js +15 -15
- package/dist/cjs/src/delta.js +1 -1
- package/dist/cjs/src/deribit.js +1 -1
- package/dist/cjs/src/digifinex.js +8 -9
- package/dist/cjs/src/exmo.js +3 -4
- package/dist/cjs/src/gate.js +2 -1
- package/dist/cjs/src/gemini.js +8 -1
- package/dist/cjs/src/hitbtc.js +1 -1
- package/dist/cjs/src/hollaex.js +1 -1
- package/dist/cjs/src/huobi.js +13 -19
- package/dist/cjs/src/huobijp.js +3 -3
- package/dist/cjs/src/indodax.js +2 -1
- package/dist/cjs/src/kraken.js +3 -2
- package/dist/cjs/src/krakenfutures.js +6 -6
- package/dist/cjs/src/kucoin.js +3 -2
- package/dist/cjs/src/kucoinfutures.js +2 -2
- package/dist/cjs/src/kuna.js +1 -1
- package/dist/cjs/src/lbank.js +2 -2
- package/dist/cjs/src/lbank2.js +11 -8
- package/dist/cjs/src/luno.js +1 -1
- package/dist/cjs/src/lykke.js +2 -2
- package/dist/cjs/src/mexc.js +7 -8
- package/dist/cjs/src/novadax.js +1 -1
- package/dist/cjs/src/oceanex.js +1 -1
- package/dist/cjs/src/okcoin.js +4 -5
- package/dist/cjs/src/okx.js +18 -10
- package/dist/cjs/src/paymium.js +1 -1
- package/dist/cjs/src/poloniex.js +5 -5
- package/dist/cjs/src/poloniexfutures.js +2 -2
- package/dist/cjs/src/tidex.js +1 -1
- package/dist/cjs/src/upbit.js +1 -1
- package/dist/cjs/src/wazirx.js +1 -1
- package/dist/cjs/src/whitebit.js +1 -1
- package/dist/cjs/src/woo.js +3 -1
- package/dist/cjs/src/yobit.js +1 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/binance.d.ts +1 -0
- package/js/src/abstract/binancecoinm.d.ts +1 -0
- package/js/src/abstract/binanceus.d.ts +1 -0
- package/js/src/abstract/binanceusdm.d.ts +1 -0
- package/js/src/abstract/okex.d.ts +9 -0
- package/js/src/abstract/okex5.d.ts +9 -0
- package/js/src/abstract/okx.d.ts +9 -0
- package/js/src/ace.d.ts +2 -2
- package/js/src/ace.js +2 -5
- package/js/src/ascendex.d.ts +7 -7
- package/js/src/base/Exchange.d.ts +3 -0
- package/js/src/base/Exchange.js +100 -2
- package/js/src/base/functions/type.js +1 -1
- package/js/src/base/types.d.ts +3 -0
- package/js/src/bigone.d.ts +1 -1
- package/js/src/bigone.js +1 -1
- package/js/src/binance.d.ts +1 -1
- package/js/src/binance.js +4 -3
- package/js/src/bit2c.js +4 -4
- package/js/src/bitfinex.d.ts +1 -1
- package/js/src/bitfinex.js +1 -1
- package/js/src/bitfinex2.d.ts +3 -3
- package/js/src/bitfinex2.js +1 -1
- package/js/src/bitflyer.d.ts +7 -7
- package/js/src/bitget.d.ts +1 -1
- package/js/src/bitget.js +160 -27
- package/js/src/bithumb.d.ts +1 -1
- package/js/src/bithumb.js +1 -1
- package/js/src/bitmart.d.ts +2 -2
- package/js/src/bitmart.js +6 -7
- package/js/src/bitmex.d.ts +4 -4
- package/js/src/bitmex.js +1 -1
- package/js/src/bitopro.d.ts +2 -2
- package/js/src/bitpanda.d.ts +1 -1
- package/js/src/bitpanda.js +1 -1
- package/js/src/bitstamp.d.ts +1 -1
- package/js/src/bitstamp.js +2 -3
- package/js/src/bitstamp1.js +12 -12
- package/js/src/bittrex.d.ts +2 -2
- package/js/src/bittrex.js +3 -3
- package/js/src/bl3p.js +1 -1
- package/js/src/btcalpha.d.ts +1 -1
- package/js/src/btcalpha.js +2 -3
- package/js/src/btcbox.js +4 -4
- package/js/src/btcmarkets.d.ts +7 -7
- package/js/src/btctradeua.js +17 -17
- package/js/src/btcturk.d.ts +6 -6
- package/js/src/bybit.d.ts +2 -2
- package/js/src/bybit.js +1 -1
- package/js/src/cex.d.ts +9 -9
- package/js/src/cex.js +1 -1
- package/js/src/coinbase.d.ts +5 -5
- package/js/src/coinbase.js +5 -6
- package/js/src/coinbasepro.d.ts +1 -1
- package/js/src/coinbasepro.js +1 -1
- package/js/src/coincheck.d.ts +4 -4
- package/js/src/coincheck.js +5 -5
- package/js/src/coinex.d.ts +1 -1
- package/js/src/coinex.js +1 -1
- package/js/src/coinfalcon.d.ts +4 -4
- package/js/src/coinfalcon.js +1 -1
- package/js/src/coinmate.d.ts +1 -22
- package/js/src/coinmate.js +2 -2
- package/js/src/coinone.d.ts +1 -1
- package/js/src/coinone.js +1 -1
- package/js/src/coinsph.js +1 -0
- package/js/src/coinspot.d.ts +1 -1
- package/js/src/coinspot.js +15 -15
- package/js/src/cryptocom.d.ts +4 -4
- package/js/src/delta.d.ts +1 -1
- package/js/src/delta.js +1 -1
- package/js/src/deribit.d.ts +4 -4
- package/js/src/deribit.js +1 -1
- package/js/src/digifinex.d.ts +2 -2
- package/js/src/digifinex.js +8 -9
- package/js/src/exmo.d.ts +14 -14
- package/js/src/exmo.js +3 -4
- package/js/src/gate.d.ts +10 -12
- package/js/src/gate.js +2 -1
- package/js/src/gemini.d.ts +7 -7
- package/js/src/gemini.js +8 -1
- package/js/src/hitbtc.d.ts +23 -23
- package/js/src/hitbtc.js +1 -1
- package/js/src/hollaex.d.ts +5 -5
- package/js/src/hollaex.js +1 -1
- package/js/src/huobi.d.ts +8 -27
- package/js/src/huobi.js +13 -19
- package/js/src/huobijp.d.ts +15 -34
- package/js/src/huobijp.js +3 -3
- package/js/src/idex.d.ts +9 -9
- package/js/src/indodax.d.ts +6 -6
- package/js/src/indodax.js +2 -1
- package/js/src/kraken.d.ts +7 -7
- package/js/src/kraken.js +3 -2
- package/js/src/krakenfutures.d.ts +2 -2
- package/js/src/krakenfutures.js +6 -6
- package/js/src/kucoin.d.ts +3 -7
- package/js/src/kucoin.js +3 -2
- package/js/src/kucoinfutures.d.ts +1 -24
- package/js/src/kucoinfutures.js +2 -2
- package/js/src/kuna.d.ts +3 -3
- package/js/src/kuna.js +1 -1
- package/js/src/lbank.d.ts +7 -7
- package/js/src/lbank.js +3 -3
- package/js/src/lbank2.d.ts +6 -6
- package/js/src/lbank2.js +11 -8
- package/js/src/luno.d.ts +1 -1
- package/js/src/luno.js +1 -1
- package/js/src/lykke.d.ts +1 -20
- package/js/src/lykke.js +2 -2
- package/js/src/mercado.d.ts +4 -4
- package/js/src/mexc.d.ts +4 -4
- package/js/src/mexc.js +7 -8
- package/js/src/ndax.d.ts +3 -3
- package/js/src/novadax.d.ts +1 -1
- package/js/src/novadax.js +1 -1
- package/js/src/oceanex.d.ts +14 -14
- package/js/src/oceanex.js +1 -1
- package/js/src/okcoin.d.ts +10 -10
- package/js/src/okcoin.js +4 -5
- package/js/src/okx.d.ts +2 -2
- package/js/src/okx.js +18 -10
- package/js/src/paymium.js +1 -1
- package/js/src/phemex.d.ts +3 -8
- package/js/src/poloniex.d.ts +4 -4
- package/js/src/poloniex.js +5 -5
- package/js/src/poloniexfutures.d.ts +4 -26
- package/js/src/poloniexfutures.js +2 -2
- package/js/src/tidex.d.ts +6 -6
- package/js/src/tidex.js +1 -1
- package/js/src/upbit.d.ts +6 -6
- package/js/src/upbit.js +1 -1
- package/js/src/wavesexchange.d.ts +2 -2
- package/js/src/wazirx.d.ts +1 -1
- package/js/src/wazirx.js +1 -1
- package/js/src/whitebit.d.ts +10 -10
- package/js/src/whitebit.js +1 -1
- package/js/src/woo.d.ts +1 -1
- package/js/src/woo.js +3 -1
- package/js/src/yobit.d.ts +9 -9
- package/js/src/yobit.js +1 -1
- package/js/src/zonda.d.ts +5 -5
- package/package.json +4 -3
- package/skip-tests.json +10 -2
package/dist/ccxt.browser.js
CHANGED
|
@@ -1805,7 +1805,7 @@ class ace extends _abstract_ace_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
1805
1805
|
const ticker = this.parseTicker(rawTicker, market);
|
|
1806
1806
|
tickers.push(ticker);
|
|
1807
1807
|
}
|
|
1808
|
-
return this.
|
|
1808
|
+
return this.filterByArrayTickers(tickers, 'symbol', symbols);
|
|
1809
1809
|
}
|
|
1810
1810
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
1811
1811
|
/**
|
|
@@ -2346,10 +2346,7 @@ class ace extends _abstract_ace_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
2346
2346
|
// }
|
|
2347
2347
|
//
|
|
2348
2348
|
const data = this.safeValue(response, 'attachment');
|
|
2349
|
-
const trades = this.safeValue(data, 'trades');
|
|
2350
|
-
if (trades === undefined) {
|
|
2351
|
-
return trades;
|
|
2352
|
-
}
|
|
2349
|
+
const trades = this.safeValue(data, 'trades', []);
|
|
2353
2350
|
return this.parseTrades(trades, market, since, limit);
|
|
2354
2351
|
}
|
|
2355
2352
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -7508,11 +7505,17 @@ class Exchange {
|
|
|
7508
7505
|
// V
|
|
7509
7506
|
client.throttle(cost).then(() => {
|
|
7510
7507
|
client.send(message);
|
|
7511
|
-
}).catch((e) => {
|
|
7508
|
+
}).catch((e) => {
|
|
7509
|
+
delete client.subscriptions[subscribeHash];
|
|
7510
|
+
future.reject(e);
|
|
7511
|
+
});
|
|
7512
7512
|
}
|
|
7513
7513
|
else {
|
|
7514
7514
|
client.send(message)
|
|
7515
|
-
.catch((e) => {
|
|
7515
|
+
.catch((e) => {
|
|
7516
|
+
delete client.subscriptions[subscribeHash];
|
|
7517
|
+
future.reject(e);
|
|
7518
|
+
});
|
|
7516
7519
|
}
|
|
7517
7520
|
}
|
|
7518
7521
|
}).catch((e) => {
|
|
@@ -8051,6 +8054,87 @@ class Exchange {
|
|
|
8051
8054
|
},
|
|
8052
8055
|
}, currency);
|
|
8053
8056
|
}
|
|
8057
|
+
safeMarketStructure(market = undefined) {
|
|
8058
|
+
const cleanStructure = {
|
|
8059
|
+
'id': undefined,
|
|
8060
|
+
'lowercaseId': undefined,
|
|
8061
|
+
'symbol': undefined,
|
|
8062
|
+
'base': undefined,
|
|
8063
|
+
'quote': undefined,
|
|
8064
|
+
'settle': undefined,
|
|
8065
|
+
'baseId': undefined,
|
|
8066
|
+
'quoteId': undefined,
|
|
8067
|
+
'settleId': undefined,
|
|
8068
|
+
'type': undefined,
|
|
8069
|
+
'spot': undefined,
|
|
8070
|
+
'margin': undefined,
|
|
8071
|
+
'swap': undefined,
|
|
8072
|
+
'future': undefined,
|
|
8073
|
+
'option': undefined,
|
|
8074
|
+
'index': undefined,
|
|
8075
|
+
'active': undefined,
|
|
8076
|
+
'contract': undefined,
|
|
8077
|
+
'linear': undefined,
|
|
8078
|
+
'inverse': undefined,
|
|
8079
|
+
'taker': undefined,
|
|
8080
|
+
'maker': undefined,
|
|
8081
|
+
'contractSize': undefined,
|
|
8082
|
+
'expiry': undefined,
|
|
8083
|
+
'expiryDatetime': undefined,
|
|
8084
|
+
'strike': undefined,
|
|
8085
|
+
'optionType': undefined,
|
|
8086
|
+
'precision': {
|
|
8087
|
+
'amount': undefined,
|
|
8088
|
+
'price': undefined,
|
|
8089
|
+
'cost': undefined,
|
|
8090
|
+
'base': undefined,
|
|
8091
|
+
'quote': undefined,
|
|
8092
|
+
},
|
|
8093
|
+
'limits': {
|
|
8094
|
+
'leverage': {
|
|
8095
|
+
'min': undefined,
|
|
8096
|
+
'max': undefined,
|
|
8097
|
+
},
|
|
8098
|
+
'amount': {
|
|
8099
|
+
'min': undefined,
|
|
8100
|
+
'max': undefined,
|
|
8101
|
+
},
|
|
8102
|
+
'price': {
|
|
8103
|
+
'min': undefined,
|
|
8104
|
+
'max': undefined,
|
|
8105
|
+
},
|
|
8106
|
+
'cost': {
|
|
8107
|
+
'min': undefined,
|
|
8108
|
+
'max': undefined,
|
|
8109
|
+
},
|
|
8110
|
+
},
|
|
8111
|
+
'created': undefined,
|
|
8112
|
+
'info': undefined,
|
|
8113
|
+
};
|
|
8114
|
+
if (market !== undefined) {
|
|
8115
|
+
const result = this.extend(cleanStructure, market);
|
|
8116
|
+
// set undefined swap/future/etc
|
|
8117
|
+
if (result['spot']) {
|
|
8118
|
+
if (result['contract'] === undefined) {
|
|
8119
|
+
result['contract'] = false;
|
|
8120
|
+
}
|
|
8121
|
+
if (result['swap'] === undefined) {
|
|
8122
|
+
result['swap'] = false;
|
|
8123
|
+
}
|
|
8124
|
+
if (result['future'] === undefined) {
|
|
8125
|
+
result['future'] = false;
|
|
8126
|
+
}
|
|
8127
|
+
if (result['option'] === undefined) {
|
|
8128
|
+
result['option'] = false;
|
|
8129
|
+
}
|
|
8130
|
+
if (result['index'] === undefined) {
|
|
8131
|
+
result['index'] = false;
|
|
8132
|
+
}
|
|
8133
|
+
}
|
|
8134
|
+
return result;
|
|
8135
|
+
}
|
|
8136
|
+
return cleanStructure;
|
|
8137
|
+
}
|
|
8054
8138
|
setMarkets(markets, currencies = undefined) {
|
|
8055
8139
|
const values = [];
|
|
8056
8140
|
this.markets_by_id = {};
|
|
@@ -9745,6 +9829,9 @@ class Exchange {
|
|
|
9745
9829
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
9746
9830
|
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' fetchTickers() is not supported yet');
|
|
9747
9831
|
}
|
|
9832
|
+
async fetchOrderBooks(symbols = undefined, limit = undefined, params = {}) {
|
|
9833
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' fetchOrderBooks() is not supported yet');
|
|
9834
|
+
}
|
|
9748
9835
|
async watchTickers(symbols = undefined, params = {}) {
|
|
9749
9836
|
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' watchTickers() is not supported yet');
|
|
9750
9837
|
}
|
|
@@ -10626,6 +10713,14 @@ class Exchange {
|
|
|
10626
10713
|
*/
|
|
10627
10714
|
return this.filterByArray(objects, key, values, indexed);
|
|
10628
10715
|
}
|
|
10716
|
+
filterByArrayTickers(objects, key, values = undefined, indexed = true) {
|
|
10717
|
+
/**
|
|
10718
|
+
* @ignore
|
|
10719
|
+
* @method
|
|
10720
|
+
* @description Typed wrapper for filterByArray that returns a dictionary of tickers
|
|
10721
|
+
*/
|
|
10722
|
+
return this.filterByArray(objects, key, values, indexed);
|
|
10723
|
+
}
|
|
10629
10724
|
resolvePromiseIfMessagehashMatches(client, prefix, symbol, data) {
|
|
10630
10725
|
const messageHashes = this.findMessageHashes(client, prefix);
|
|
10631
10726
|
for (let i = 0; i < messageHashes.length; i++) {
|
|
@@ -12910,7 +13005,7 @@ const safeInteger = (o, k, $default) => {
|
|
|
12910
13005
|
return isNumber(n) ? n : $default;
|
|
12911
13006
|
};
|
|
12912
13007
|
const safeIntegerProduct = (o, k, $factor, $default) => {
|
|
12913
|
-
const n =
|
|
13008
|
+
const n = asFloat(prop(o, k));
|
|
12914
13009
|
return isNumber(n) ? parseInt(n * $factor) : $default;
|
|
12915
13010
|
};
|
|
12916
13011
|
const safeTimestamp = (o, k, $default) => {
|
|
@@ -14794,7 +14889,7 @@ class bigone extends _abstract_bigone_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
14794
14889
|
const symbol = ticker['symbol'];
|
|
14795
14890
|
result[symbol] = ticker;
|
|
14796
14891
|
}
|
|
14797
|
-
return this.
|
|
14892
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
14798
14893
|
}
|
|
14799
14894
|
async fetchTime(params = {}) {
|
|
14800
14895
|
/**
|
|
@@ -16665,6 +16760,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
16665
16760
|
},
|
|
16666
16761
|
'dapiData': {
|
|
16667
16762
|
'get': {
|
|
16763
|
+
'delivery-price': 1,
|
|
16668
16764
|
'openInterestHist': 1,
|
|
16669
16765
|
'topLongShortAccountRatio': 1,
|
|
16670
16766
|
'topLongShortPositionRatio': 1,
|
|
@@ -16887,8 +16983,8 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
16887
16983
|
'get': {
|
|
16888
16984
|
'ping': 0.2,
|
|
16889
16985
|
'time': 0.2,
|
|
16890
|
-
'depth': { 'cost':
|
|
16891
|
-
'trades':
|
|
16986
|
+
'depth': { 'cost': 1, 'byLimit': [[100, 1], [500, 5], [1000, 10], [5000, 50]] },
|
|
16987
|
+
'trades': 2,
|
|
16892
16988
|
'aggTrades': 0.4,
|
|
16893
16989
|
'historicalTrades': 2,
|
|
16894
16990
|
'klines': 0.4,
|
|
@@ -16985,7 +17081,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
16985
17081
|
'margin/marginInterestHistory': 1,
|
|
16986
17082
|
'portfolio/interest-history': 50,
|
|
16987
17083
|
'um/income': 30,
|
|
16988
|
-
'cm/income
|
|
17084
|
+
'cm/income': 30,
|
|
16989
17085
|
'um/account': 5,
|
|
16990
17086
|
'cm/account': 5,
|
|
16991
17087
|
'portfolio/repay-futures-switch': 3,
|
|
@@ -28941,10 +29037,10 @@ class bit2c extends _abstract_bit2c_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
28941
29037
|
},
|
|
28942
29038
|
},
|
|
28943
29039
|
'markets': {
|
|
28944
|
-
'BTC/NIS': { 'id': 'BtcNis', 'symbol': 'BTC/NIS', 'base': 'BTC', 'quote': 'NIS', 'baseId': 'Btc', 'quoteId': 'Nis', 'type': 'spot', 'spot': true },
|
|
28945
|
-
'ETH/NIS': { 'id': 'EthNis', 'symbol': 'ETH/NIS', 'base': 'ETH', 'quote': 'NIS', 'baseId': 'Eth', 'quoteId': 'Nis', 'type': 'spot', 'spot': true },
|
|
28946
|
-
'LTC/NIS': { 'id': 'LtcNis', 'symbol': 'LTC/NIS', 'base': 'LTC', 'quote': 'NIS', 'baseId': 'Ltc', 'quoteId': 'Nis', 'type': 'spot', 'spot': true },
|
|
28947
|
-
'USDC/NIS': { 'id': 'UsdcNis', 'symbol': 'USDC/NIS', 'base': 'USDC', 'quote': 'NIS', 'baseId': 'Usdc', 'quoteId': 'Nis', 'type': 'spot', 'spot': true },
|
|
29040
|
+
'BTC/NIS': this.safeMarketStructure({ 'id': 'BtcNis', 'symbol': 'BTC/NIS', 'base': 'BTC', 'quote': 'NIS', 'baseId': 'Btc', 'quoteId': 'Nis', 'type': 'spot', 'spot': true }),
|
|
29041
|
+
'ETH/NIS': this.safeMarketStructure({ 'id': 'EthNis', 'symbol': 'ETH/NIS', 'base': 'ETH', 'quote': 'NIS', 'baseId': 'Eth', 'quoteId': 'Nis', 'type': 'spot', 'spot': true }),
|
|
29042
|
+
'LTC/NIS': this.safeMarketStructure({ 'id': 'LtcNis', 'symbol': 'LTC/NIS', 'base': 'LTC', 'quote': 'NIS', 'baseId': 'Ltc', 'quoteId': 'Nis', 'type': 'spot', 'spot': true }),
|
|
29043
|
+
'USDC/NIS': this.safeMarketStructure({ 'id': 'UsdcNis', 'symbol': 'USDC/NIS', 'base': 'USDC', 'quote': 'NIS', 'baseId': 'Usdc', 'quoteId': 'Nis', 'type': 'spot', 'spot': true }),
|
|
28948
29044
|
},
|
|
28949
29045
|
'fees': {
|
|
28950
29046
|
'trading': {
|
|
@@ -32881,7 +32977,7 @@ class bitfinex extends _abstract_bitfinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
32881
32977
|
const symbol = ticker['symbol'];
|
|
32882
32978
|
result[symbol] = ticker;
|
|
32883
32979
|
}
|
|
32884
|
-
return this.
|
|
32980
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
32885
32981
|
}
|
|
32886
32982
|
async fetchTicker(symbol, params = {}) {
|
|
32887
32983
|
/**
|
|
@@ -34861,7 +34957,7 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
34861
34957
|
const symbol = market['symbol'];
|
|
34862
34958
|
result[symbol] = this.parseTicker(ticker, market);
|
|
34863
34959
|
}
|
|
34864
|
-
return this.
|
|
34960
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
34865
34961
|
}
|
|
34866
34962
|
async fetchTicker(symbol, params = {}) {
|
|
34867
34963
|
/**
|
|
@@ -41515,10 +41611,26 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
41515
41611
|
// "cTime": "1652745674488"
|
|
41516
41612
|
// }
|
|
41517
41613
|
//
|
|
41614
|
+
// swap, isolated and cross margin: cancelOrder
|
|
41615
|
+
//
|
|
41616
|
+
// {
|
|
41617
|
+
// "orderId": "1098749943604719616",
|
|
41618
|
+
// "clientOid": "0ec8d262b3d2436aa651095a745b9b8d"
|
|
41619
|
+
// }
|
|
41620
|
+
//
|
|
41621
|
+
// spot: cancelOrder
|
|
41622
|
+
//
|
|
41623
|
+
// {
|
|
41624
|
+
// "code": "00000",
|
|
41625
|
+
// "msg": "success",
|
|
41626
|
+
// "requestTime": 1697689270716,
|
|
41627
|
+
// "data": "1098753830701928448"
|
|
41628
|
+
// }
|
|
41629
|
+
//
|
|
41518
41630
|
const marketId = this.safeString(order, 'symbol');
|
|
41519
41631
|
market = this.safeMarket(marketId, market);
|
|
41520
41632
|
const symbol = market['symbol'];
|
|
41521
|
-
const id = this.
|
|
41633
|
+
const id = this.safeString2(order, 'orderId', 'data');
|
|
41522
41634
|
const price = this.safeString2(order, 'price', 'executePrice');
|
|
41523
41635
|
const amount = this.safeString2(order, 'quantity', 'size');
|
|
41524
41636
|
const filled = this.safeString2(order, 'fillQuantity', 'filledQty');
|
|
@@ -41937,44 +42049,130 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
41937
42049
|
* @see https://bitgetlimited.github.io/apidoc/en/spot/#cancel-plan-order
|
|
41938
42050
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#cancel-order
|
|
41939
42051
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#cancel-plan-order-tpsl
|
|
42052
|
+
* @see https://bitgetlimited.github.io/apidoc/en/margin/#isolated-cancel-order
|
|
42053
|
+
* @see https://bitgetlimited.github.io/apidoc/en/margin/#cross-cancel-order
|
|
41940
42054
|
* @param {string} id order id
|
|
41941
42055
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
41942
42056
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
42057
|
+
* @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
|
|
41943
42058
|
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
41944
42059
|
*/
|
|
41945
42060
|
this.checkRequiredSymbol('cancelOrder', symbol);
|
|
41946
42061
|
await this.loadMarkets();
|
|
41947
42062
|
const market = this.market(symbol);
|
|
41948
|
-
|
|
41949
|
-
let
|
|
41950
|
-
|
|
41951
|
-
|
|
41952
|
-
|
|
41953
|
-
|
|
42063
|
+
let marketType = undefined;
|
|
42064
|
+
let marginMode = undefined;
|
|
42065
|
+
let response = undefined;
|
|
42066
|
+
[marketType, params] = this.handleMarketTypeAndParams('cancelOrder', market, params);
|
|
42067
|
+
[marginMode, params] = this.handleMarginModeAndParams('cancelOrder', params);
|
|
42068
|
+
const symbolRequest = (marginMode !== undefined) ? (market['info']['symbolName']) : (market['id']);
|
|
41954
42069
|
const request = {
|
|
41955
|
-
'symbol':
|
|
42070
|
+
'symbol': symbolRequest,
|
|
41956
42071
|
'orderId': id,
|
|
41957
42072
|
};
|
|
41958
|
-
const stop = this.safeValue(
|
|
41959
|
-
|
|
41960
|
-
|
|
41961
|
-
|
|
41962
|
-
|
|
41963
|
-
|
|
41964
|
-
const planType = this.safeString(params, 'planType');
|
|
42073
|
+
const stop = this.safeValue(params, 'stop');
|
|
42074
|
+
const planType = this.safeString(params, 'planType');
|
|
42075
|
+
params = this.omit(params, ['stop', 'planType']);
|
|
42076
|
+
if ((marketType === 'swap') || (marketType === 'future')) {
|
|
42077
|
+
request['marginCoin'] = market['settleId'];
|
|
42078
|
+
if (stop) {
|
|
41965
42079
|
if (planType === undefined) {
|
|
41966
42080
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + ' cancelOrder() requires a planType parameter for stop orders, either normal_plan, profit_plan or loss_plan');
|
|
41967
42081
|
}
|
|
41968
42082
|
request['planType'] = planType;
|
|
41969
|
-
|
|
42083
|
+
response = await this.privateMixPostPlanCancelPlan(this.extend(request, params));
|
|
42084
|
+
}
|
|
42085
|
+
else {
|
|
42086
|
+
response = await this.privateMixPostOrderCancelOrder(this.extend(request, params));
|
|
41970
42087
|
}
|
|
41971
42088
|
}
|
|
41972
|
-
if (marketType === '
|
|
41973
|
-
|
|
42089
|
+
else if (marketType === 'spot') {
|
|
42090
|
+
if (marginMode !== undefined) {
|
|
42091
|
+
if (marginMode === 'isolated') {
|
|
42092
|
+
response = await this.privateMarginPostIsolatedOrderCancelOrder(this.extend(request, params));
|
|
42093
|
+
}
|
|
42094
|
+
else if (marginMode === 'cross') {
|
|
42095
|
+
response = await this.privateMarginPostCrossOrderCancelOrder(this.extend(request, params));
|
|
42096
|
+
}
|
|
42097
|
+
}
|
|
42098
|
+
else {
|
|
42099
|
+
if (stop) {
|
|
42100
|
+
response = await this.privateSpotPostPlanCancelPlan(this.extend(request, params));
|
|
42101
|
+
}
|
|
42102
|
+
else {
|
|
42103
|
+
response = await this.privateSpotPostTradeCancelOrder(this.extend(request, params));
|
|
42104
|
+
}
|
|
42105
|
+
}
|
|
41974
42106
|
}
|
|
41975
|
-
|
|
41976
|
-
|
|
41977
|
-
|
|
42107
|
+
else {
|
|
42108
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NotSupported(this.id + ' cancelOrder() does not support ' + marketType + ' orders');
|
|
42109
|
+
}
|
|
42110
|
+
//
|
|
42111
|
+
// spot
|
|
42112
|
+
//
|
|
42113
|
+
// {
|
|
42114
|
+
// "code": "00000",
|
|
42115
|
+
// "msg": "success",
|
|
42116
|
+
// "requestTime": 1697689270716,
|
|
42117
|
+
// "data": "1098753830701928448"
|
|
42118
|
+
// }
|
|
42119
|
+
//
|
|
42120
|
+
// isolated margin
|
|
42121
|
+
//
|
|
42122
|
+
// {
|
|
42123
|
+
// "code": "00000",
|
|
42124
|
+
// "msg": "success",
|
|
42125
|
+
// "requestTime": 1697688367859,
|
|
42126
|
+
// "data": {
|
|
42127
|
+
// "resultList": [
|
|
42128
|
+
// {
|
|
42129
|
+
// "orderId": "1098749943604719616",
|
|
42130
|
+
// "clientOid": "0ec8d262b3d2436aa651095a745b9b8d"
|
|
42131
|
+
// }
|
|
42132
|
+
// ],
|
|
42133
|
+
// "failure": []
|
|
42134
|
+
// }
|
|
42135
|
+
// }
|
|
42136
|
+
//
|
|
42137
|
+
// cross margin
|
|
42138
|
+
//
|
|
42139
|
+
// {
|
|
42140
|
+
// "code": "00000",
|
|
42141
|
+
// "msg": "success",
|
|
42142
|
+
// "requestTime": :1697689028972,
|
|
42143
|
+
// "data": {
|
|
42144
|
+
// "resultList": [
|
|
42145
|
+
// {
|
|
42146
|
+
// "orderId": "1098751730051067906",
|
|
42147
|
+
// "clientOid": "ecb50ca373374c5bb814bc724e36b0eb"
|
|
42148
|
+
// }
|
|
42149
|
+
// ],
|
|
42150
|
+
// "failure": []
|
|
42151
|
+
// }
|
|
42152
|
+
// }
|
|
42153
|
+
//
|
|
42154
|
+
// swap
|
|
42155
|
+
//
|
|
42156
|
+
// {
|
|
42157
|
+
// "code": "00000",
|
|
42158
|
+
// "msg": "success",
|
|
42159
|
+
// "requestTime": 1697690413177,
|
|
42160
|
+
// "data": {
|
|
42161
|
+
// "orderId": "1098758604547850241",
|
|
42162
|
+
// "clientOid": "1098758604585598977"
|
|
42163
|
+
// }
|
|
42164
|
+
// }
|
|
42165
|
+
//
|
|
42166
|
+
let order = response;
|
|
42167
|
+
if ((marketType === 'swap') || (marketType === 'future')) {
|
|
42168
|
+
order = this.safeValue(response, 'data', {});
|
|
42169
|
+
}
|
|
42170
|
+
else if (marginMode !== undefined) {
|
|
42171
|
+
const data = this.safeValue(response, 'data', {});
|
|
42172
|
+
const resultList = this.safeValue(data, 'resultList', []);
|
|
42173
|
+
order = resultList[0];
|
|
42174
|
+
}
|
|
42175
|
+
return this.parseOrder(order, market);
|
|
41978
42176
|
}
|
|
41979
42177
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
41980
42178
|
/**
|
|
@@ -41983,30 +42181,44 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
41983
42181
|
* @description cancel multiple orders
|
|
41984
42182
|
* @see https://bitgetlimited.github.io/apidoc/en/spot/#cancel-order-in-batch-v2-single-instruments
|
|
41985
42183
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#batch-cancel-order
|
|
42184
|
+
* @see https://bitgetlimited.github.io/apidoc/en/margin/#isolated-batch-cancel-orders
|
|
42185
|
+
* @see https://bitgetlimited.github.io/apidoc/en/margin/#cross-batch-cancel-order
|
|
41986
42186
|
* @param {string[]} ids order ids
|
|
41987
42187
|
* @param {string} symbol unified market symbol, default is undefined
|
|
41988
42188
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
42189
|
+
* @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
|
|
41989
42190
|
* @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
41990
42191
|
*/
|
|
41991
42192
|
this.checkRequiredSymbol('cancelOrders', symbol);
|
|
41992
42193
|
await this.loadMarkets();
|
|
41993
42194
|
const market = this.market(symbol);
|
|
41994
42195
|
let type = undefined;
|
|
42196
|
+
let marginMode = undefined;
|
|
42197
|
+
[marginMode, params] = this.handleMarginModeAndParams('cancelOrders', params);
|
|
41995
42198
|
[type, params] = this.handleMarketTypeAndParams('cancelOrders', market, params);
|
|
41996
42199
|
const request = {};
|
|
41997
|
-
let
|
|
42200
|
+
let response = undefined;
|
|
41998
42201
|
if (type === 'spot') {
|
|
41999
|
-
|
|
42000
|
-
request['symbol'] = market['id'];
|
|
42202
|
+
request['symbol'] = market['info']['symbolName']; // regular id like LTCUSDT_SPBL does not work here
|
|
42001
42203
|
request['orderIds'] = ids;
|
|
42204
|
+
if (marginMode !== undefined) {
|
|
42205
|
+
if (marginMode === 'cross') {
|
|
42206
|
+
response = await this.privateMarginPostCrossOrderBatchCancelOrder(this.extend(request, params));
|
|
42207
|
+
}
|
|
42208
|
+
else {
|
|
42209
|
+
response = await this.privateMarginPostIsolatedOrderBatchCancelOrder(this.extend(request, params));
|
|
42210
|
+
}
|
|
42211
|
+
}
|
|
42212
|
+
else {
|
|
42213
|
+
response = await this.privateSpotPostTradeCancelBatchOrdersV2(this.extend(request, params));
|
|
42214
|
+
}
|
|
42002
42215
|
}
|
|
42003
42216
|
else {
|
|
42004
|
-
method = 'privateMixPostOrderCancelBatchOrders';
|
|
42005
42217
|
request['symbol'] = market['id'];
|
|
42006
42218
|
request['marginCoin'] = market['quote'];
|
|
42007
42219
|
request['orderIds'] = ids;
|
|
42220
|
+
response = await this.privateMixPostOrderCancelBatchOrders(this.extend(request, params));
|
|
42008
42221
|
}
|
|
42009
|
-
const response = await this[method](this.extend(request, params));
|
|
42010
42222
|
//
|
|
42011
42223
|
// spot
|
|
42012
42224
|
//
|
|
@@ -42052,8 +42264,11 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
42052
42264
|
* @description cancel all open orders
|
|
42053
42265
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#cancel-all-order
|
|
42054
42266
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#cancel-all-trigger-order-tpsl
|
|
42267
|
+
* @see https://bitgetlimited.github.io/apidoc/en/margin/#isolated-batch-cancel-orders
|
|
42268
|
+
* @see https://bitgetlimited.github.io/apidoc/en/margin/#cross-batch-cancel-order
|
|
42055
42269
|
* @param {string} symbol unified market symbol
|
|
42056
42270
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
42271
|
+
* @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
|
|
42057
42272
|
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
42058
42273
|
*/
|
|
42059
42274
|
const sandboxMode = this.safeValue(this.options, 'sandboxMode', false);
|
|
@@ -42070,8 +42285,22 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
42070
42285
|
}
|
|
42071
42286
|
let marketType = undefined;
|
|
42072
42287
|
[marketType, params] = this.handleMarketTypeAndParams('cancelAllOrders', market, params);
|
|
42288
|
+
let marginMode = undefined;
|
|
42289
|
+
[marginMode, params] = this.handleMarginModeAndParams('cancelAllOrders', params);
|
|
42073
42290
|
if (marketType === 'spot') {
|
|
42074
|
-
|
|
42291
|
+
if (marginMode === undefined) {
|
|
42292
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NotSupported(this.id + ' cancelAllOrders () does not support spot markets, only spot-margin');
|
|
42293
|
+
}
|
|
42294
|
+
this.checkRequiredSymbol('cancelAllOrders', symbol);
|
|
42295
|
+
const spotMarginRequest = {
|
|
42296
|
+
'symbol': market['info']['symbolName'], // regular id like LTCUSDT_SPBL does not work here
|
|
42297
|
+
};
|
|
42298
|
+
if (marginMode === 'cross') {
|
|
42299
|
+
return await this.privateMarginPostCrossOrderBatchCancelOrder(this.extend(spotMarginRequest, params));
|
|
42300
|
+
}
|
|
42301
|
+
else {
|
|
42302
|
+
return await this.privateMarginPostIsolatedOrderBatchCancelOrder(this.extend(spotMarginRequest, params));
|
|
42303
|
+
}
|
|
42075
42304
|
}
|
|
42076
42305
|
const request = {
|
|
42077
42306
|
'productType': productType,
|
|
@@ -44685,7 +44914,7 @@ class bithumb extends _abstract_bithumb_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
44685
44914
|
result[symbol] = this.parseTicker(ticker, market);
|
|
44686
44915
|
}
|
|
44687
44916
|
}
|
|
44688
|
-
return this.
|
|
44917
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
44689
44918
|
}
|
|
44690
44919
|
async fetchTicker(symbol, params = {}) {
|
|
44691
44920
|
/**
|
|
@@ -46564,7 +46793,7 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
46564
46793
|
const symbol = ticker['symbol'];
|
|
46565
46794
|
result[symbol] = ticker;
|
|
46566
46795
|
}
|
|
46567
|
-
return this.
|
|
46796
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
46568
46797
|
}
|
|
46569
46798
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
46570
46799
|
/**
|
|
@@ -47545,12 +47774,11 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
47545
47774
|
//
|
|
47546
47775
|
const data = this.safeValue(response, 'data', {});
|
|
47547
47776
|
const order = this.parseOrder(data, market);
|
|
47548
|
-
|
|
47549
|
-
|
|
47550
|
-
|
|
47551
|
-
|
|
47552
|
-
|
|
47553
|
-
});
|
|
47777
|
+
order['type'] = type;
|
|
47778
|
+
order['side'] = side;
|
|
47779
|
+
order['amount'] = amount;
|
|
47780
|
+
order['price'] = price;
|
|
47781
|
+
return order;
|
|
47554
47782
|
}
|
|
47555
47783
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
47556
47784
|
/**
|
|
@@ -50807,7 +51035,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
50807
51035
|
result[symbol] = ticker;
|
|
50808
51036
|
}
|
|
50809
51037
|
}
|
|
50810
|
-
return this.
|
|
51038
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
50811
51039
|
}
|
|
50812
51040
|
parseTicker(ticker, market = undefined) {
|
|
50813
51041
|
// see response sample under "fetchMarkets" because same endpoint is being used here
|
|
@@ -54641,7 +54869,7 @@ class bitpanda extends _abstract_bitpanda_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
54641
54869
|
const symbol = ticker['symbol'];
|
|
54642
54870
|
result[symbol] = ticker;
|
|
54643
54871
|
}
|
|
54644
|
-
return this.
|
|
54872
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
54645
54873
|
}
|
|
54646
54874
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
54647
54875
|
/**
|
|
@@ -61148,9 +61376,8 @@ class bitstamp extends _abstract_bitstamp_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
61148
61376
|
}
|
|
61149
61377
|
const response = await this[method](this.extend(request, params));
|
|
61150
61378
|
const order = this.parseOrder(response, market);
|
|
61151
|
-
|
|
61152
|
-
|
|
61153
|
-
});
|
|
61379
|
+
order['type'] = type;
|
|
61380
|
+
return order;
|
|
61154
61381
|
}
|
|
61155
61382
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
61156
61383
|
/**
|
|
@@ -62066,18 +62293,18 @@ class bitstamp1 extends _abstract_bitstamp1_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
62066
62293
|
},
|
|
62067
62294
|
'precisionMode': _base_functions_number_js__WEBPACK_IMPORTED_MODULE_1__/* .TICK_SIZE */ .sh,
|
|
62068
62295
|
'markets': {
|
|
62069
|
-
'BTC/USD': { 'id': 'btcusd', 'symbol': 'BTC/USD', 'base': 'BTC', 'quote': 'USD', 'baseId': 'btc', 'quoteId': 'usd', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true },
|
|
62070
|
-
'BTC/EUR': { 'id': 'btceur', 'symbol': 'BTC/EUR', 'base': 'BTC', 'quote': 'EUR', 'baseId': 'btc', 'quoteId': 'eur', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true },
|
|
62071
|
-
'EUR/USD': { 'id': 'eurusd', 'symbol': 'EUR/USD', 'base': 'EUR', 'quote': 'USD', 'baseId': 'eur', 'quoteId': 'usd', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true },
|
|
62072
|
-
'XRP/USD': { 'id': 'xrpusd', 'symbol': 'XRP/USD', 'base': 'XRP', 'quote': 'USD', 'baseId': 'xrp', 'quoteId': 'usd', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true },
|
|
62073
|
-
'XRP/EUR': { 'id': 'xrpeur', 'symbol': 'XRP/EUR', 'base': 'XRP', 'quote': 'EUR', 'baseId': 'xrp', 'quoteId': 'eur', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true },
|
|
62074
|
-
'XRP/BTC': { 'id': 'xrpbtc', 'symbol': 'XRP/BTC', 'base': 'XRP', 'quote': 'BTC', 'baseId': 'xrp', 'quoteId': 'btc', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true },
|
|
62075
|
-
'LTC/USD': { 'id': 'ltcusd', 'symbol': 'LTC/USD', 'base': 'LTC', 'quote': 'USD', 'baseId': 'ltc', 'quoteId': 'usd', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true },
|
|
62076
|
-
'LTC/EUR': { 'id': 'ltceur', 'symbol': 'LTC/EUR', 'base': 'LTC', 'quote': 'EUR', 'baseId': 'ltc', 'quoteId': 'eur', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true },
|
|
62077
|
-
'LTC/BTC': { 'id': 'ltcbtc', 'symbol': 'LTC/BTC', 'base': 'LTC', 'quote': 'BTC', 'baseId': 'ltc', 'quoteId': 'btc', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true },
|
|
62078
|
-
'ETH/USD': { 'id': 'ethusd', 'symbol': 'ETH/USD', 'base': 'ETH', 'quote': 'USD', 'baseId': 'eth', 'quoteId': 'usd', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true },
|
|
62079
|
-
'ETH/EUR': { 'id': 'etheur', 'symbol': 'ETH/EUR', 'base': 'ETH', 'quote': 'EUR', 'baseId': 'eth', 'quoteId': 'eur', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true },
|
|
62080
|
-
'ETH/BTC': { 'id': 'ethbtc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC', 'baseId': 'eth', 'quoteId': 'btc', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true },
|
|
62296
|
+
'BTC/USD': this.safeMarketStructure({ 'id': 'btcusd', 'symbol': 'BTC/USD', 'base': 'BTC', 'quote': 'USD', 'baseId': 'btc', 'quoteId': 'usd', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true }),
|
|
62297
|
+
'BTC/EUR': this.safeMarketStructure({ 'id': 'btceur', 'symbol': 'BTC/EUR', 'base': 'BTC', 'quote': 'EUR', 'baseId': 'btc', 'quoteId': 'eur', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true }),
|
|
62298
|
+
'EUR/USD': this.safeMarketStructure({ 'id': 'eurusd', 'symbol': 'EUR/USD', 'base': 'EUR', 'quote': 'USD', 'baseId': 'eur', 'quoteId': 'usd', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true }),
|
|
62299
|
+
'XRP/USD': this.safeMarketStructure({ 'id': 'xrpusd', 'symbol': 'XRP/USD', 'base': 'XRP', 'quote': 'USD', 'baseId': 'xrp', 'quoteId': 'usd', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true }),
|
|
62300
|
+
'XRP/EUR': this.safeMarketStructure({ 'id': 'xrpeur', 'symbol': 'XRP/EUR', 'base': 'XRP', 'quote': 'EUR', 'baseId': 'xrp', 'quoteId': 'eur', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true }),
|
|
62301
|
+
'XRP/BTC': this.safeMarketStructure({ 'id': 'xrpbtc', 'symbol': 'XRP/BTC', 'base': 'XRP', 'quote': 'BTC', 'baseId': 'xrp', 'quoteId': 'btc', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true }),
|
|
62302
|
+
'LTC/USD': this.safeMarketStructure({ 'id': 'ltcusd', 'symbol': 'LTC/USD', 'base': 'LTC', 'quote': 'USD', 'baseId': 'ltc', 'quoteId': 'usd', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true }),
|
|
62303
|
+
'LTC/EUR': this.safeMarketStructure({ 'id': 'ltceur', 'symbol': 'LTC/EUR', 'base': 'LTC', 'quote': 'EUR', 'baseId': 'ltc', 'quoteId': 'eur', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true }),
|
|
62304
|
+
'LTC/BTC': this.safeMarketStructure({ 'id': 'ltcbtc', 'symbol': 'LTC/BTC', 'base': 'LTC', 'quote': 'BTC', 'baseId': 'ltc', 'quoteId': 'btc', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true }),
|
|
62305
|
+
'ETH/USD': this.safeMarketStructure({ 'id': 'ethusd', 'symbol': 'ETH/USD', 'base': 'ETH', 'quote': 'USD', 'baseId': 'eth', 'quoteId': 'usd', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true }),
|
|
62306
|
+
'ETH/EUR': this.safeMarketStructure({ 'id': 'etheur', 'symbol': 'ETH/EUR', 'base': 'ETH', 'quote': 'EUR', 'baseId': 'eth', 'quoteId': 'eur', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true }),
|
|
62307
|
+
'ETH/BTC': this.safeMarketStructure({ 'id': 'ethbtc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC', 'baseId': 'eth', 'quoteId': 'btc', 'maker': 0.005, 'taker': 0.005, 'type': 'spot', 'spot': true }),
|
|
62081
62308
|
},
|
|
62082
62309
|
});
|
|
62083
62310
|
}
|
|
@@ -63007,7 +63234,7 @@ class bittrex extends _abstract_bittrex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
63007
63234
|
const ticker = this.parseTicker(response[i]);
|
|
63008
63235
|
tickers.push(ticker);
|
|
63009
63236
|
}
|
|
63010
|
-
return this.
|
|
63237
|
+
return this.filterByArrayTickers(tickers, 'symbol', symbols);
|
|
63011
63238
|
}
|
|
63012
63239
|
async fetchTicker(symbol, params = {}) {
|
|
63013
63240
|
/**
|
|
@@ -64296,8 +64523,8 @@ class bittrex extends _abstract_bittrex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
64296
64523
|
request['marketSymbol'] = market['id'];
|
|
64297
64524
|
}
|
|
64298
64525
|
const response = await this.privateGetExecutions(this.extend(request, params));
|
|
64299
|
-
const trades = this.parseTrades(response, market);
|
|
64300
|
-
return
|
|
64526
|
+
const trades = this.parseTrades(response, market, since, limit);
|
|
64527
|
+
return trades;
|
|
64301
64528
|
}
|
|
64302
64529
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
64303
64530
|
/**
|
|
@@ -66708,7 +66935,7 @@ class bl3p extends _abstract_bl3p_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
66708
66935
|
},
|
|
66709
66936
|
},
|
|
66710
66937
|
'markets': {
|
|
66711
|
-
'BTC/EUR': { 'id': 'BTCEUR', 'symbol': 'BTC/EUR', 'base': 'BTC', 'quote': 'EUR', 'baseId': 'BTC', 'quoteId': 'EUR', 'maker': 0.0025, 'taker': 0.0025, 'type': 'spot', 'spot': true },
|
|
66938
|
+
'BTC/EUR': this.safeMarketStructure({ 'id': 'BTCEUR', 'symbol': 'BTC/EUR', 'base': 'BTC', 'quote': 'EUR', 'baseId': 'BTC', 'quoteId': 'EUR', 'maker': 0.0025, 'taker': 0.0025, 'type': 'spot', 'spot': true }),
|
|
66712
66939
|
},
|
|
66713
66940
|
'precisionMode': _base_functions_number_js__WEBPACK_IMPORTED_MODULE_1__/* .TICK_SIZE */ .sh,
|
|
66714
66941
|
});
|
|
@@ -69013,9 +69240,8 @@ class btcalpha extends _abstract_btcalpha_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
69013
69240
|
const order = this.parseOrder(response, market);
|
|
69014
69241
|
const orderAmount = order['amount'].toString();
|
|
69015
69242
|
amount = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringGt */ .O.stringGt(orderAmount, '0') ? order['amount'] : amount;
|
|
69016
|
-
|
|
69017
|
-
|
|
69018
|
-
});
|
|
69243
|
+
order['amount'] = this.parseNumber(amount);
|
|
69244
|
+
return order;
|
|
69019
69245
|
}
|
|
69020
69246
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
69021
69247
|
/**
|
|
@@ -69303,10 +69529,10 @@ class btcbox extends _abstract_btcbox_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
69303
69529
|
},
|
|
69304
69530
|
},
|
|
69305
69531
|
'markets': {
|
|
69306
|
-
'BTC/JPY': { 'id': 'btc', 'symbol': 'BTC/JPY', 'base': 'BTC', 'quote': 'JPY', 'baseId': 'btc', 'quoteId': 'jpy', 'taker': this.parseNumber('0.0005'), 'maker': this.parseNumber('0.0005'), 'type': 'spot', 'spot': true },
|
|
69307
|
-
'ETH/JPY': { 'id': 'eth', 'symbol': 'ETH/JPY', 'base': 'ETH', 'quote': 'JPY', 'baseId': 'eth', 'quoteId': 'jpy', 'taker': this.parseNumber('0.0010'), 'maker': this.parseNumber('0.0010'), 'type': 'spot', 'spot': true },
|
|
69308
|
-
'LTC/JPY': { 'id': 'ltc', 'symbol': 'LTC/JPY', 'base': 'LTC', 'quote': 'JPY', 'baseId': 'ltc', 'quoteId': 'jpy', 'taker': this.parseNumber('0.0010'), 'maker': this.parseNumber('0.0010'), 'type': 'spot', 'spot': true },
|
|
69309
|
-
'BCH/JPY': { 'id': 'bch', 'symbol': 'BCH/JPY', 'base': 'BCH', 'quote': 'JPY', 'baseId': 'bch', 'quoteId': 'jpy', 'taker': this.parseNumber('0.0010'), 'maker': this.parseNumber('0.0010'), 'type': 'spot', 'spot': true },
|
|
69532
|
+
'BTC/JPY': this.safeMarketStructure({ 'id': 'btc', 'symbol': 'BTC/JPY', 'base': 'BTC', 'quote': 'JPY', 'baseId': 'btc', 'quoteId': 'jpy', 'taker': this.parseNumber('0.0005'), 'maker': this.parseNumber('0.0005'), 'type': 'spot', 'spot': true }),
|
|
69533
|
+
'ETH/JPY': this.safeMarketStructure({ 'id': 'eth', 'symbol': 'ETH/JPY', 'base': 'ETH', 'quote': 'JPY', 'baseId': 'eth', 'quoteId': 'jpy', 'taker': this.parseNumber('0.0010'), 'maker': this.parseNumber('0.0010'), 'type': 'spot', 'spot': true }),
|
|
69534
|
+
'LTC/JPY': this.safeMarketStructure({ 'id': 'ltc', 'symbol': 'LTC/JPY', 'base': 'LTC', 'quote': 'JPY', 'baseId': 'ltc', 'quoteId': 'jpy', 'taker': this.parseNumber('0.0010'), 'maker': this.parseNumber('0.0010'), 'type': 'spot', 'spot': true }),
|
|
69535
|
+
'BCH/JPY': this.safeMarketStructure({ 'id': 'bch', 'symbol': 'BCH/JPY', 'base': 'BCH', 'quote': 'JPY', 'baseId': 'bch', 'quoteId': 'jpy', 'taker': this.parseNumber('0.0010'), 'maker': this.parseNumber('0.0010'), 'type': 'spot', 'spot': true }),
|
|
69310
69536
|
},
|
|
69311
69537
|
'precisionMode': _base_functions_number_js__WEBPACK_IMPORTED_MODULE_1__/* .TICK_SIZE */ .sh,
|
|
69312
69538
|
'exceptions': {
|
|
@@ -71120,23 +71346,23 @@ class btctradeua extends _abstract_btctradeua_js__WEBPACK_IMPORTED_MODULE_0__/*
|
|
|
71120
71346
|
},
|
|
71121
71347
|
'precisionMode': _base_functions_number_js__WEBPACK_IMPORTED_MODULE_1__/* .TICK_SIZE */ .sh,
|
|
71122
71348
|
'markets': {
|
|
71123
|
-
'BCH/UAH': { 'id': 'bch_uah', 'symbol': 'BCH/UAH', 'base': 'BCH', 'quote': 'UAH', 'baseId': 'bch', 'quoteId': 'uah', 'type': 'spot', 'spot': true },
|
|
71124
|
-
'BTC/UAH': { 'id': 'btc_uah', 'symbol': 'BTC/UAH', 'base': 'BTC', 'quote': 'UAH', 'baseId': 'btc', 'quoteId': 'uah', 'precision': { 'price': this.parseNumber('1e-1') }, 'limits': { 'amount': { 'min': this.parseNumber('1e-10') } }, 'type': 'spot', 'spot': true },
|
|
71125
|
-
'DASH/BTC': { 'id': 'dash_btc', 'symbol': 'DASH/BTC', 'base': 'DASH', 'quote': 'BTC', 'baseId': 'dash', 'quoteId': 'btc', 'type': 'spot', 'spot': true },
|
|
71126
|
-
'DASH/UAH': { 'id': 'dash_uah', 'symbol': 'DASH/UAH', 'base': 'DASH', 'quote': 'UAH', 'baseId': 'dash', 'quoteId': 'uah', 'type': 'spot', 'spot': true },
|
|
71127
|
-
'DOGE/BTC': { 'id': 'doge_btc', 'symbol': 'DOGE/BTC', 'base': 'DOGE', 'quote': 'BTC', 'baseId': 'doge', 'quoteId': 'btc', 'type': 'spot', 'spot': true },
|
|
71128
|
-
'DOGE/UAH': { 'id': 'doge_uah', 'symbol': 'DOGE/UAH', 'base': 'DOGE', 'quote': 'UAH', 'baseId': 'doge', 'quoteId': 'uah', 'type': 'spot', 'spot': true },
|
|
71129
|
-
'ETH/UAH': { 'id': 'eth_uah', 'symbol': 'ETH/UAH', 'base': 'ETH', 'quote': 'UAH', 'baseId': 'eth', 'quoteId': 'uah', 'type': 'spot', 'spot': true },
|
|
71130
|
-
'ITI/UAH': { 'id': 'iti_uah', 'symbol': 'ITI/UAH', 'base': 'ITI', 'quote': 'UAH', 'baseId': 'iti', 'quoteId': 'uah', 'type': 'spot', 'spot': true },
|
|
71131
|
-
'KRB/UAH': { 'id': 'krb_uah', 'symbol': 'KRB/UAH', 'base': 'KRB', 'quote': 'UAH', 'baseId': 'krb', 'quoteId': 'uah', 'type': 'spot', 'spot': true },
|
|
71132
|
-
'LTC/BTC': { 'id': 'ltc_btc', 'symbol': 'LTC/BTC', 'base': 'LTC', 'quote': 'BTC', 'baseId': 'ltc', 'quoteId': 'btc', 'type': 'spot', 'spot': true },
|
|
71133
|
-
'LTC/UAH': { 'id': 'ltc_uah', 'symbol': 'LTC/UAH', 'base': 'LTC', 'quote': 'UAH', 'baseId': 'ltc', 'quoteId': 'uah', 'type': 'spot', 'spot': true },
|
|
71134
|
-
'NVC/BTC': { 'id': 'nvc_btc', 'symbol': 'NVC/BTC', 'base': 'NVC', 'quote': 'BTC', 'baseId': 'nvc', 'quoteId': 'btc', 'type': 'spot', 'spot': true },
|
|
71135
|
-
'NVC/UAH': { 'id': 'nvc_uah', 'symbol': 'NVC/UAH', 'base': 'NVC', 'quote': 'UAH', 'baseId': 'nvc', 'quoteId': 'uah', 'type': 'spot', 'spot': true },
|
|
71136
|
-
'PPC/BTC': { 'id': 'ppc_btc', 'symbol': 'PPC/BTC', 'base': 'PPC', 'quote': 'BTC', 'baseId': 'ppc', 'quoteId': 'btc', 'type': 'spot', 'spot': true },
|
|
71137
|
-
'SIB/UAH': { 'id': 'sib_uah', 'symbol': 'SIB/UAH', 'base': 'SIB', 'quote': 'UAH', 'baseId': 'sib', 'quoteId': 'uah', 'type': 'spot', 'spot': true },
|
|
71138
|
-
'XMR/UAH': { 'id': 'xmr_uah', 'symbol': 'XMR/UAH', 'base': 'XMR', 'quote': 'UAH', 'baseId': 'xmr', 'quoteId': 'uah', 'type': 'spot', 'spot': true },
|
|
71139
|
-
'ZEC/UAH': { 'id': 'zec_uah', 'symbol': 'ZEC/UAH', 'base': 'ZEC', 'quote': 'UAH', 'baseId': 'zec', 'quoteId': 'uah', 'type': 'spot', 'spot': true },
|
|
71349
|
+
'BCH/UAH': this.safeMarketStructure({ 'id': 'bch_uah', 'symbol': 'BCH/UAH', 'base': 'BCH', 'quote': 'UAH', 'baseId': 'bch', 'quoteId': 'uah', 'type': 'spot', 'spot': true }),
|
|
71350
|
+
'BTC/UAH': this.safeMarketStructure({ 'id': 'btc_uah', 'symbol': 'BTC/UAH', 'base': 'BTC', 'quote': 'UAH', 'baseId': 'btc', 'quoteId': 'uah', 'precision': { 'price': this.parseNumber('1e-1') }, 'limits': { 'amount': { 'min': this.parseNumber('1e-10') } }, 'type': 'spot', 'spot': true }),
|
|
71351
|
+
'DASH/BTC': this.safeMarketStructure({ 'id': 'dash_btc', 'symbol': 'DASH/BTC', 'base': 'DASH', 'quote': 'BTC', 'baseId': 'dash', 'quoteId': 'btc', 'type': 'spot', 'spot': true }),
|
|
71352
|
+
'DASH/UAH': this.safeMarketStructure({ 'id': 'dash_uah', 'symbol': 'DASH/UAH', 'base': 'DASH', 'quote': 'UAH', 'baseId': 'dash', 'quoteId': 'uah', 'type': 'spot', 'spot': true }),
|
|
71353
|
+
'DOGE/BTC': this.safeMarketStructure({ 'id': 'doge_btc', 'symbol': 'DOGE/BTC', 'base': 'DOGE', 'quote': 'BTC', 'baseId': 'doge', 'quoteId': 'btc', 'type': 'spot', 'spot': true }),
|
|
71354
|
+
'DOGE/UAH': this.safeMarketStructure({ 'id': 'doge_uah', 'symbol': 'DOGE/UAH', 'base': 'DOGE', 'quote': 'UAH', 'baseId': 'doge', 'quoteId': 'uah', 'type': 'spot', 'spot': true }),
|
|
71355
|
+
'ETH/UAH': this.safeMarketStructure({ 'id': 'eth_uah', 'symbol': 'ETH/UAH', 'base': 'ETH', 'quote': 'UAH', 'baseId': 'eth', 'quoteId': 'uah', 'type': 'spot', 'spot': true }),
|
|
71356
|
+
'ITI/UAH': this.safeMarketStructure({ 'id': 'iti_uah', 'symbol': 'ITI/UAH', 'base': 'ITI', 'quote': 'UAH', 'baseId': 'iti', 'quoteId': 'uah', 'type': 'spot', 'spot': true }),
|
|
71357
|
+
'KRB/UAH': this.safeMarketStructure({ 'id': 'krb_uah', 'symbol': 'KRB/UAH', 'base': 'KRB', 'quote': 'UAH', 'baseId': 'krb', 'quoteId': 'uah', 'type': 'spot', 'spot': true }),
|
|
71358
|
+
'LTC/BTC': this.safeMarketStructure({ 'id': 'ltc_btc', 'symbol': 'LTC/BTC', 'base': 'LTC', 'quote': 'BTC', 'baseId': 'ltc', 'quoteId': 'btc', 'type': 'spot', 'spot': true }),
|
|
71359
|
+
'LTC/UAH': this.safeMarketStructure({ 'id': 'ltc_uah', 'symbol': 'LTC/UAH', 'base': 'LTC', 'quote': 'UAH', 'baseId': 'ltc', 'quoteId': 'uah', 'type': 'spot', 'spot': true }),
|
|
71360
|
+
'NVC/BTC': this.safeMarketStructure({ 'id': 'nvc_btc', 'symbol': 'NVC/BTC', 'base': 'NVC', 'quote': 'BTC', 'baseId': 'nvc', 'quoteId': 'btc', 'type': 'spot', 'spot': true }),
|
|
71361
|
+
'NVC/UAH': this.safeMarketStructure({ 'id': 'nvc_uah', 'symbol': 'NVC/UAH', 'base': 'NVC', 'quote': 'UAH', 'baseId': 'nvc', 'quoteId': 'uah', 'type': 'spot', 'spot': true }),
|
|
71362
|
+
'PPC/BTC': this.safeMarketStructure({ 'id': 'ppc_btc', 'symbol': 'PPC/BTC', 'base': 'PPC', 'quote': 'BTC', 'baseId': 'ppc', 'quoteId': 'btc', 'type': 'spot', 'spot': true }),
|
|
71363
|
+
'SIB/UAH': this.safeMarketStructure({ 'id': 'sib_uah', 'symbol': 'SIB/UAH', 'base': 'SIB', 'quote': 'UAH', 'baseId': 'sib', 'quoteId': 'uah', 'type': 'spot', 'spot': true }),
|
|
71364
|
+
'XMR/UAH': this.safeMarketStructure({ 'id': 'xmr_uah', 'symbol': 'XMR/UAH', 'base': 'XMR', 'quote': 'UAH', 'baseId': 'xmr', 'quoteId': 'uah', 'type': 'spot', 'spot': true }),
|
|
71365
|
+
'ZEC/UAH': this.safeMarketStructure({ 'id': 'zec_uah', 'symbol': 'ZEC/UAH', 'base': 'ZEC', 'quote': 'UAH', 'baseId': 'zec', 'quoteId': 'uah', 'type': 'spot', 'spot': true }),
|
|
71140
71366
|
},
|
|
71141
71367
|
'fees': {
|
|
71142
71368
|
'trading': {
|
|
@@ -74894,7 +75120,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
74894
75120
|
tickers[symbol] = ticker;
|
|
74895
75121
|
}
|
|
74896
75122
|
}
|
|
74897
|
-
return this.
|
|
75123
|
+
return this.filterByArrayTickers(tickers, 'symbol', symbols);
|
|
74898
75124
|
}
|
|
74899
75125
|
parseOHLCV(ohlcv, market = undefined) {
|
|
74900
75126
|
//
|
|
@@ -80720,7 +80946,7 @@ class cex extends _abstract_cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
80720
80946
|
const symbol = market['symbol'];
|
|
80721
80947
|
result[symbol] = this.parseTicker(ticker, market);
|
|
80722
80948
|
}
|
|
80723
|
-
return this.
|
|
80949
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
80724
80950
|
}
|
|
80725
80951
|
async fetchTicker(symbol, params = {}) {
|
|
80726
80952
|
/**
|
|
@@ -82947,7 +83173,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
82947
83173
|
const symbol = market['symbol'];
|
|
82948
83174
|
result[symbol] = this.parseTicker(rates[baseId], market);
|
|
82949
83175
|
}
|
|
82950
|
-
return this.
|
|
83176
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
82951
83177
|
}
|
|
82952
83178
|
async fetchTickersV3(symbols = undefined, params = {}) {
|
|
82953
83179
|
await this.loadMarkets();
|
|
@@ -82999,7 +83225,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
82999
83225
|
const symbol = market['symbol'];
|
|
83000
83226
|
result[symbol] = this.parseTicker(entry, market);
|
|
83001
83227
|
}
|
|
83002
|
-
return this.
|
|
83228
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
83003
83229
|
}
|
|
83004
83230
|
async fetchTicker(symbol, params = {}) {
|
|
83005
83231
|
/**
|
|
@@ -83072,10 +83298,9 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
83072
83298
|
//
|
|
83073
83299
|
const data = this.safeValue(response, 'trades', []);
|
|
83074
83300
|
const ticker = this.parseTicker(data[0], market);
|
|
83075
|
-
|
|
83076
|
-
|
|
83077
|
-
|
|
83078
|
-
});
|
|
83301
|
+
ticker['bid'] = this.safeNumber(response, 'best_bid');
|
|
83302
|
+
ticker['ask'] = this.safeNumber(response, 'best_ask');
|
|
83303
|
+
return ticker;
|
|
83079
83304
|
}
|
|
83080
83305
|
parseTicker(ticker, market = undefined) {
|
|
83081
83306
|
//
|
|
@@ -85439,7 +85664,7 @@ class coinbasepro extends _abstract_coinbasepro_js__WEBPACK_IMPORTED_MODULE_0__/
|
|
|
85439
85664
|
const symbol = market['symbol'];
|
|
85440
85665
|
result[symbol] = this.parseTicker(first, market);
|
|
85441
85666
|
}
|
|
85442
|
-
return this.
|
|
85667
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
85443
85668
|
}
|
|
85444
85669
|
async fetchTicker(symbol, params = {}) {
|
|
85445
85670
|
/**
|
|
@@ -86801,13 +87026,13 @@ class coincheck extends _abstract_coincheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
86801
87026
|
},
|
|
86802
87027
|
},
|
|
86803
87028
|
'markets': {
|
|
86804
|
-
'BTC/JPY': { 'id': 'btc_jpy', 'symbol': 'BTC/JPY', 'base': 'BTC', 'quote': 'JPY', 'baseId': 'btc', 'quoteId': 'jpy', 'type': 'spot', 'spot': true },
|
|
87029
|
+
'BTC/JPY': this.safeMarketStructure({ 'id': 'btc_jpy', 'symbol': 'BTC/JPY', 'base': 'BTC', 'quote': 'JPY', 'baseId': 'btc', 'quoteId': 'jpy', 'type': 'spot', 'spot': true }),
|
|
86805
87030
|
// 'ETH/JPY': { 'id': 'eth_jpy', 'symbol': 'ETH/JPY', 'base': 'ETH', 'quote': 'JPY', 'baseId': 'eth', 'quoteId': 'jpy' },
|
|
86806
|
-
'ETC/JPY': { 'id': 'etc_jpy', 'symbol': 'ETC/JPY', 'base': 'ETC', 'quote': 'JPY', 'baseId': 'etc', 'quoteId': 'jpy', 'type': 'spot', 'spot': true },
|
|
87031
|
+
'ETC/JPY': this.safeMarketStructure({ 'id': 'etc_jpy', 'symbol': 'ETC/JPY', 'base': 'ETC', 'quote': 'JPY', 'baseId': 'etc', 'quoteId': 'jpy', 'type': 'spot', 'spot': true }),
|
|
86807
87032
|
// 'DAO/JPY': { 'id': 'dao_jpy', 'symbol': 'DAO/JPY', 'base': 'DAO', 'quote': 'JPY', 'baseId': 'dao', 'quoteId': 'jpy' },
|
|
86808
87033
|
// 'LSK/JPY': { 'id': 'lsk_jpy', 'symbol': 'LSK/JPY', 'base': 'LSK', 'quote': 'JPY', 'baseId': 'lsk', 'quoteId': 'jpy' },
|
|
86809
|
-
'FCT/JPY': { 'id': 'fct_jpy', 'symbol': 'FCT/JPY', 'base': 'FCT', 'quote': 'JPY', 'baseId': 'fct', 'quoteId': 'jpy', 'type': 'spot', 'spot': true },
|
|
86810
|
-
'MONA/JPY': { 'id': 'mona_jpy', 'symbol': 'MONA/JPY', 'base': 'MONA', 'quote': 'JPY', 'baseId': 'mona', 'quoteId': 'jpy', 'type': 'spot', 'spot': true },
|
|
87034
|
+
'FCT/JPY': this.safeMarketStructure({ 'id': 'fct_jpy', 'symbol': 'FCT/JPY', 'base': 'FCT', 'quote': 'JPY', 'baseId': 'fct', 'quoteId': 'jpy', 'type': 'spot', 'spot': true }),
|
|
87035
|
+
'MONA/JPY': this.safeMarketStructure({ 'id': 'mona_jpy', 'symbol': 'MONA/JPY', 'base': 'MONA', 'quote': 'JPY', 'baseId': 'mona', 'quoteId': 'jpy', 'type': 'spot', 'spot': true }),
|
|
86811
87036
|
// 'XMR/JPY': { 'id': 'xmr_jpy', 'symbol': 'XMR/JPY', 'base': 'XMR', 'quote': 'JPY', 'baseId': 'xmr', 'quoteId': 'jpy' },
|
|
86812
87037
|
// 'REP/JPY': { 'id': 'rep_jpy', 'symbol': 'REP/JPY', 'base': 'REP', 'quote': 'JPY', 'baseId': 'rep', 'quoteId': 'jpy' },
|
|
86813
87038
|
// 'XRP/JPY': { 'id': 'xrp_jpy', 'symbol': 'XRP/JPY', 'base': 'XRP', 'quote': 'JPY', 'baseId': 'xrp', 'quoteId': 'jpy' },
|
|
@@ -86816,7 +87041,7 @@ class coincheck extends _abstract_coincheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
86816
87041
|
// 'LTC/JPY': { 'id': 'ltc_jpy', 'symbol': 'LTC/JPY', 'base': 'LTC', 'quote': 'JPY', 'baseId': 'ltc', 'quoteId': 'jpy' },
|
|
86817
87042
|
// 'DASH/JPY': { 'id': 'dash_jpy', 'symbol': 'DASH/JPY', 'base': 'DASH', 'quote': 'JPY', 'baseId': 'dash', 'quoteId': 'jpy' },
|
|
86818
87043
|
// 'ETH/BTC': { 'id': 'eth_btc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC', 'baseId': 'eth', 'quoteId': 'btc' },
|
|
86819
|
-
'ETC/BTC': { 'id': 'etc_btc', 'symbol': 'ETC/BTC', 'base': 'ETC', 'quote': 'BTC', 'baseId': 'etc', 'quoteId': 'btc', 'type': 'spot', 'spot': true },
|
|
87044
|
+
'ETC/BTC': this.safeMarketStructure({ 'id': 'etc_btc', 'symbol': 'ETC/BTC', 'base': 'ETC', 'quote': 'BTC', 'baseId': 'etc', 'quoteId': 'btc', 'type': 'spot', 'spot': true }),
|
|
86820
87045
|
// 'LSK/BTC': { 'id': 'lsk_btc', 'symbol': 'LSK/BTC', 'base': 'LSK', 'quote': 'BTC', 'baseId': 'lsk', 'quoteId': 'btc' },
|
|
86821
87046
|
// 'FCT/BTC': { 'id': 'fct_btc', 'symbol': 'FCT/BTC', 'base': 'FCT', 'quote': 'BTC', 'baseId': 'fct', 'quoteId': 'btc' },
|
|
86822
87047
|
// 'XMR/BTC': { 'id': 'xmr_btc', 'symbol': 'XMR/BTC', 'base': 'XMR', 'quote': 'BTC', 'baseId': 'xmr', 'quoteId': 'btc' },
|
|
@@ -88403,7 +88628,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
88403
88628
|
ticker['symbol'] = symbol;
|
|
88404
88629
|
result[symbol] = ticker;
|
|
88405
88630
|
}
|
|
88406
|
-
return this.
|
|
88631
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
88407
88632
|
}
|
|
88408
88633
|
async fetchTime(params = {}) {
|
|
88409
88634
|
/**
|
|
@@ -92714,7 +92939,7 @@ class coinfalcon extends _abstract_coinfalcon_js__WEBPACK_IMPORTED_MODULE_0__/*
|
|
|
92714
92939
|
const symbol = ticker['symbol'];
|
|
92715
92940
|
result[symbol] = ticker;
|
|
92716
92941
|
}
|
|
92717
|
-
return this.
|
|
92942
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
92718
92943
|
}
|
|
92719
92944
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
92720
92945
|
/**
|
|
@@ -93786,7 +94011,7 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
93786
94011
|
const ticker = this.safeValue(response, 'data');
|
|
93787
94012
|
const timestamp = this.safeTimestamp(ticker, 'timestamp');
|
|
93788
94013
|
const last = this.safeNumber(ticker, 'last');
|
|
93789
|
-
return {
|
|
94014
|
+
return this.safeTicker({
|
|
93790
94015
|
'symbol': market['symbol'],
|
|
93791
94016
|
'timestamp': timestamp,
|
|
93792
94017
|
'datetime': this.iso8601(timestamp),
|
|
@@ -93807,7 +94032,7 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
93807
94032
|
'baseVolume': this.safeNumber(ticker, 'amount'),
|
|
93808
94033
|
'quoteVolume': undefined,
|
|
93809
94034
|
'info': ticker,
|
|
93810
|
-
};
|
|
94035
|
+
}, market);
|
|
93811
94036
|
}
|
|
93812
94037
|
async fetchDepositsWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
93813
94038
|
/**
|
|
@@ -94733,7 +94958,7 @@ class coinone extends _abstract_coinone_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
94733
94958
|
result[symbol] = this.parseTicker(ticker, market);
|
|
94734
94959
|
result[symbol]['timestamp'] = timestamp;
|
|
94735
94960
|
}
|
|
94736
|
-
return this.
|
|
94961
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
94737
94962
|
}
|
|
94738
94963
|
async fetchTicker(symbol, params = {}) {
|
|
94739
94964
|
/**
|
|
@@ -95953,6 +96178,7 @@ class coinsph extends _abstract_coinsph_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
95953
96178
|
'max': undefined,
|
|
95954
96179
|
},
|
|
95955
96180
|
},
|
|
96181
|
+
'created': undefined,
|
|
95956
96182
|
'info': market,
|
|
95957
96183
|
});
|
|
95958
96184
|
}
|
|
@@ -97418,20 +97644,20 @@ class coinspot extends _abstract_coinspot_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
97418
97644
|
},
|
|
97419
97645
|
},
|
|
97420
97646
|
'markets': {
|
|
97421
|
-
'ADA/AUD': { 'id': 'ada', 'symbol': 'ADA/AUD', 'base': 'ADA', 'quote': 'AUD', 'baseId': 'ada', 'quoteId': 'aud', 'type': 'spot', 'spot': true },
|
|
97422
|
-
'BTC/AUD': { 'id': 'btc', 'symbol': 'BTC/AUD', 'base': 'BTC', 'quote': 'AUD', 'baseId': 'btc', 'quoteId': 'aud', 'type': 'spot', 'spot': true },
|
|
97423
|
-
'ETH/AUD': { 'id': 'eth', 'symbol': 'ETH/AUD', 'base': 'ETH', 'quote': 'AUD', 'baseId': 'eth', 'quoteId': 'aud', 'type': 'spot', 'spot': true },
|
|
97424
|
-
'XRP/AUD': { 'id': 'xrp', 'symbol': 'XRP/AUD', 'base': 'XRP', 'quote': 'AUD', 'baseId': 'xrp', 'quoteId': 'aud', 'type': 'spot', 'spot': true },
|
|
97425
|
-
'LTC/AUD': { 'id': 'ltc', 'symbol': 'LTC/AUD', 'base': 'LTC', 'quote': 'AUD', 'baseId': 'ltc', 'quoteId': 'aud', 'type': 'spot', 'spot': true },
|
|
97426
|
-
'DOGE/AUD': { 'id': 'doge', 'symbol': 'DOGE/AUD', 'base': 'DOGE', 'quote': 'AUD', 'baseId': 'doge', 'quoteId': 'aud', 'type': 'spot', 'spot': true },
|
|
97427
|
-
'RFOX/AUD': { 'id': 'rfox', 'symbol': 'RFOX/AUD', 'base': 'RFOX', 'quote': 'AUD', 'baseId': 'rfox', 'quoteId': 'aud', 'type': 'spot', 'spot': true },
|
|
97428
|
-
'POWR/AUD': { 'id': 'powr', 'symbol': 'POWR/AUD', 'base': 'POWR', 'quote': 'AUD', 'baseId': 'powr', 'quoteId': 'aud', 'type': 'spot', 'spot': true },
|
|
97429
|
-
'NEO/AUD': { 'id': 'neo', 'symbol': 'NEO/AUD', 'base': 'NEO', 'quote': 'AUD', 'baseId': 'neo', 'quoteId': 'aud', 'type': 'spot', 'spot': true },
|
|
97430
|
-
'TRX/AUD': { 'id': 'trx', 'symbol': 'TRX/AUD', 'base': 'TRX', 'quote': 'AUD', 'baseId': 'trx', 'quoteId': 'aud', 'type': 'spot', 'spot': true },
|
|
97431
|
-
'EOS/AUD': { 'id': 'eos', 'symbol': 'EOS/AUD', 'base': 'EOS', 'quote': 'AUD', 'baseId': 'eos', 'quoteId': 'aud', 'type': 'spot', 'spot': true },
|
|
97432
|
-
'XLM/AUD': { 'id': 'xlm', 'symbol': 'XLM/AUD', 'base': 'XLM', 'quote': 'AUD', 'baseId': 'xlm', 'quoteId': 'aud', 'type': 'spot', 'spot': true },
|
|
97433
|
-
'RHOC/AUD': { 'id': 'rhoc', 'symbol': 'RHOC/AUD', 'base': 'RHOC', 'quote': 'AUD', 'baseId': 'rhoc', 'quoteId': 'aud', 'type': 'spot', 'spot': true },
|
|
97434
|
-
'GAS/AUD': { 'id': 'gas', 'symbol': 'GAS/AUD', 'base': 'GAS', 'quote': 'AUD', 'baseId': 'gas', 'quoteId': 'aud', 'type': 'spot', 'spot': true },
|
|
97647
|
+
'ADA/AUD': this.safeMarketStructure({ 'id': 'ada', 'symbol': 'ADA/AUD', 'base': 'ADA', 'quote': 'AUD', 'baseId': 'ada', 'quoteId': 'aud', 'type': 'spot', 'spot': true }),
|
|
97648
|
+
'BTC/AUD': this.safeMarketStructure({ 'id': 'btc', 'symbol': 'BTC/AUD', 'base': 'BTC', 'quote': 'AUD', 'baseId': 'btc', 'quoteId': 'aud', 'type': 'spot', 'spot': true }),
|
|
97649
|
+
'ETH/AUD': this.safeMarketStructure({ 'id': 'eth', 'symbol': 'ETH/AUD', 'base': 'ETH', 'quote': 'AUD', 'baseId': 'eth', 'quoteId': 'aud', 'type': 'spot', 'spot': true }),
|
|
97650
|
+
'XRP/AUD': this.safeMarketStructure({ 'id': 'xrp', 'symbol': 'XRP/AUD', 'base': 'XRP', 'quote': 'AUD', 'baseId': 'xrp', 'quoteId': 'aud', 'type': 'spot', 'spot': true }),
|
|
97651
|
+
'LTC/AUD': this.safeMarketStructure({ 'id': 'ltc', 'symbol': 'LTC/AUD', 'base': 'LTC', 'quote': 'AUD', 'baseId': 'ltc', 'quoteId': 'aud', 'type': 'spot', 'spot': true }),
|
|
97652
|
+
'DOGE/AUD': this.safeMarketStructure({ 'id': 'doge', 'symbol': 'DOGE/AUD', 'base': 'DOGE', 'quote': 'AUD', 'baseId': 'doge', 'quoteId': 'aud', 'type': 'spot', 'spot': true }),
|
|
97653
|
+
'RFOX/AUD': this.safeMarketStructure({ 'id': 'rfox', 'symbol': 'RFOX/AUD', 'base': 'RFOX', 'quote': 'AUD', 'baseId': 'rfox', 'quoteId': 'aud', 'type': 'spot', 'spot': true }),
|
|
97654
|
+
'POWR/AUD': this.safeMarketStructure({ 'id': 'powr', 'symbol': 'POWR/AUD', 'base': 'POWR', 'quote': 'AUD', 'baseId': 'powr', 'quoteId': 'aud', 'type': 'spot', 'spot': true }),
|
|
97655
|
+
'NEO/AUD': this.safeMarketStructure({ 'id': 'neo', 'symbol': 'NEO/AUD', 'base': 'NEO', 'quote': 'AUD', 'baseId': 'neo', 'quoteId': 'aud', 'type': 'spot', 'spot': true }),
|
|
97656
|
+
'TRX/AUD': this.safeMarketStructure({ 'id': 'trx', 'symbol': 'TRX/AUD', 'base': 'TRX', 'quote': 'AUD', 'baseId': 'trx', 'quoteId': 'aud', 'type': 'spot', 'spot': true }),
|
|
97657
|
+
'EOS/AUD': this.safeMarketStructure({ 'id': 'eos', 'symbol': 'EOS/AUD', 'base': 'EOS', 'quote': 'AUD', 'baseId': 'eos', 'quoteId': 'aud', 'type': 'spot', 'spot': true }),
|
|
97658
|
+
'XLM/AUD': this.safeMarketStructure({ 'id': 'xlm', 'symbol': 'XLM/AUD', 'base': 'XLM', 'quote': 'AUD', 'baseId': 'xlm', 'quoteId': 'aud', 'type': 'spot', 'spot': true }),
|
|
97659
|
+
'RHOC/AUD': this.safeMarketStructure({ 'id': 'rhoc', 'symbol': 'RHOC/AUD', 'base': 'RHOC', 'quote': 'AUD', 'baseId': 'rhoc', 'quoteId': 'aud', 'type': 'spot', 'spot': true }),
|
|
97660
|
+
'GAS/AUD': this.safeMarketStructure({ 'id': 'gas', 'symbol': 'GAS/AUD', 'base': 'GAS', 'quote': 'AUD', 'baseId': 'gas', 'quoteId': 'aud', 'type': 'spot', 'spot': true }),
|
|
97435
97661
|
},
|
|
97436
97662
|
'commonCurrencies': {
|
|
97437
97663
|
'DRK': 'DASH',
|
|
@@ -97624,7 +97850,7 @@ class coinspot extends _abstract_coinspot_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
97624
97850
|
result[symbol] = this.parseTicker(ticker, market);
|
|
97625
97851
|
}
|
|
97626
97852
|
}
|
|
97627
|
-
return this.
|
|
97853
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
97628
97854
|
}
|
|
97629
97855
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
97630
97856
|
/**
|
|
@@ -104144,7 +104370,7 @@ class delta extends _abstract_delta_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
104144
104370
|
const symbol = ticker['symbol'];
|
|
104145
104371
|
result[symbol] = ticker;
|
|
104146
104372
|
}
|
|
104147
|
-
return this.
|
|
104373
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
104148
104374
|
}
|
|
104149
104375
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
104150
104376
|
/**
|
|
@@ -107115,7 +107341,7 @@ class deribit extends _abstract_deribit_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
107115
107341
|
const symbol = ticker['symbol'];
|
|
107116
107342
|
tickers[symbol] = ticker;
|
|
107117
107343
|
}
|
|
107118
|
-
return this.
|
|
107344
|
+
return this.filterByArrayTickers(tickers, 'symbol', symbols);
|
|
107119
107345
|
}
|
|
107120
107346
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
107121
107347
|
/**
|
|
@@ -110121,7 +110347,7 @@ class digifinex extends _abstract_digifinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
110121
110347
|
const symbol = ticker['symbol'];
|
|
110122
110348
|
result[symbol] = ticker;
|
|
110123
110349
|
}
|
|
110124
|
-
return this.
|
|
110350
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
110125
110351
|
}
|
|
110126
110352
|
async fetchTicker(symbol, params = {}) {
|
|
110127
110353
|
/**
|
|
@@ -110759,14 +110985,13 @@ class digifinex extends _abstract_digifinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
110759
110985
|
// "data": "1590873693003714560"
|
|
110760
110986
|
// }
|
|
110761
110987
|
//
|
|
110762
|
-
const
|
|
110763
|
-
|
|
110764
|
-
|
|
110765
|
-
|
|
110766
|
-
|
|
110767
|
-
|
|
110768
|
-
|
|
110769
|
-
});
|
|
110988
|
+
const order = this.parseOrder(response, market);
|
|
110989
|
+
order['symbol'] = symbol;
|
|
110990
|
+
order['type'] = type;
|
|
110991
|
+
order['side'] = side;
|
|
110992
|
+
order['amount'] = amount;
|
|
110993
|
+
order['price'] = price;
|
|
110994
|
+
return order;
|
|
110770
110995
|
}
|
|
110771
110996
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
110772
110997
|
/**
|
|
@@ -114146,7 +114371,7 @@ class exmo extends _abstract_exmo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
114146
114371
|
const ticker = this.safeValue(response, marketId);
|
|
114147
114372
|
result[symbol] = this.parseTicker(ticker, market);
|
|
114148
114373
|
}
|
|
114149
|
-
return this.
|
|
114374
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
114150
114375
|
}
|
|
114151
114376
|
async fetchTicker(symbol, params = {}) {
|
|
114152
114377
|
/**
|
|
@@ -114601,9 +114826,8 @@ class exmo extends _abstract_exmo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
114601
114826
|
// }
|
|
114602
114827
|
//
|
|
114603
114828
|
const order = this.parseOrder(response);
|
|
114604
|
-
|
|
114605
|
-
|
|
114606
|
-
});
|
|
114829
|
+
order['id'] = id.toString();
|
|
114830
|
+
return order;
|
|
114607
114831
|
}
|
|
114608
114832
|
async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
114609
114833
|
/**
|
|
@@ -118517,7 +118741,8 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
118517
118741
|
result[code] = this.parseBalanceHelper(entry);
|
|
118518
118742
|
}
|
|
118519
118743
|
}
|
|
118520
|
-
|
|
118744
|
+
const returnResult = isolated ? result : this.safeBalance(result);
|
|
118745
|
+
return returnResult;
|
|
118521
118746
|
}
|
|
118522
118747
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
118523
118748
|
/**
|
|
@@ -122772,6 +122997,7 @@ class gemini extends _abstract_gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
122772
122997
|
'max': undefined,
|
|
122773
122998
|
},
|
|
122774
122999
|
},
|
|
123000
|
+
'created': undefined,
|
|
122775
123001
|
'info': row,
|
|
122776
123002
|
});
|
|
122777
123003
|
}
|
|
@@ -123015,7 +123241,13 @@ class gemini extends _abstract_gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
123015
123241
|
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
123016
123242
|
*/
|
|
123017
123243
|
const method = this.safeValue(this.options, 'fetchTickerMethod', 'fetchTickerV1');
|
|
123018
|
-
|
|
123244
|
+
if (method === 'fetchTickerV1') {
|
|
123245
|
+
return await this.fetchTickerV1(symbol, params);
|
|
123246
|
+
}
|
|
123247
|
+
if (method === 'fetchTickerV2') {
|
|
123248
|
+
return await this.fetchTickerV2(symbol, params);
|
|
123249
|
+
}
|
|
123250
|
+
return await this.fetchTickerV1AndV2(symbol, params);
|
|
123019
123251
|
}
|
|
123020
123252
|
parseTicker(ticker, market = undefined) {
|
|
123021
123253
|
//
|
|
@@ -125120,7 +125352,7 @@ class hitbtc extends _abstract_hitbtc_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
125120
125352
|
const entry = response[marketId];
|
|
125121
125353
|
result[symbol] = this.parseTicker(entry, market);
|
|
125122
125354
|
}
|
|
125123
|
-
return this.
|
|
125355
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
125124
125356
|
}
|
|
125125
125357
|
parseTicker(ticker, market = undefined) {
|
|
125126
125358
|
//
|
|
@@ -127774,7 +128006,7 @@ class hollaex extends _abstract_hollaex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
127774
128006
|
const symbol = market['symbol'];
|
|
127775
128007
|
result[symbol] = this.extend(this.parseTicker(ticker, market), params);
|
|
127776
128008
|
}
|
|
127777
|
-
return this.
|
|
128009
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
127778
128010
|
}
|
|
127779
128011
|
parseTicker(ticker, market = undefined) {
|
|
127780
128012
|
//
|
|
@@ -131231,7 +131463,7 @@ class huobi extends _abstract_huobi_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
131231
131463
|
ticker['datetime'] = this.iso8601(timestamp);
|
|
131232
131464
|
result[symbol] = ticker;
|
|
131233
131465
|
}
|
|
131234
|
-
return this.
|
|
131466
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
131235
131467
|
}
|
|
131236
131468
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
131237
131469
|
/**
|
|
@@ -133037,14 +133269,12 @@ class huobi extends _abstract_huobi_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
133037
133269
|
if (contract && (symbol === undefined)) {
|
|
133038
133270
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + ' fetchOrders() requires a symbol argument for ' + marketType + ' orders');
|
|
133039
133271
|
}
|
|
133040
|
-
let response = undefined;
|
|
133041
133272
|
if (contract) {
|
|
133042
|
-
|
|
133273
|
+
return await this.fetchContractOrders(symbol, since, limit, params);
|
|
133043
133274
|
}
|
|
133044
133275
|
else {
|
|
133045
|
-
|
|
133276
|
+
return await this.fetchSpotOrders(symbol, since, limit, params);
|
|
133046
133277
|
}
|
|
133047
|
-
return response;
|
|
133048
133278
|
}
|
|
133049
133279
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
133050
133280
|
/**
|
|
@@ -133077,14 +133307,12 @@ class huobi extends _abstract_huobi_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
133077
133307
|
}
|
|
133078
133308
|
let marketType = undefined;
|
|
133079
133309
|
[marketType, params] = this.handleMarketTypeAndParams('fetchClosedOrders', market, params);
|
|
133080
|
-
let response = undefined;
|
|
133081
133310
|
if (marketType === 'spot') {
|
|
133082
|
-
|
|
133311
|
+
return await this.fetchClosedSpotOrders(symbol, since, limit, params);
|
|
133083
133312
|
}
|
|
133084
133313
|
else {
|
|
133085
|
-
|
|
133314
|
+
return await this.fetchClosedContractOrders(symbol, since, limit, params);
|
|
133086
133315
|
}
|
|
133087
|
-
return response;
|
|
133088
133316
|
}
|
|
133089
133317
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
133090
133318
|
/**
|
|
@@ -133785,14 +134013,12 @@ class huobi extends _abstract_huobi_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
133785
134013
|
await this.loadMarkets();
|
|
133786
134014
|
const market = this.market(symbol);
|
|
133787
134015
|
const [marketType, query] = this.handleMarketTypeAndParams('createOrder', market, params);
|
|
133788
|
-
let response = undefined;
|
|
133789
134016
|
if (marketType === 'spot') {
|
|
133790
|
-
|
|
134017
|
+
return await this.createSpotOrder(symbol, type, side, amount, price, query);
|
|
133791
134018
|
}
|
|
133792
134019
|
else {
|
|
133793
|
-
|
|
134020
|
+
return await this.createContractOrder(symbol, type, side, amount, price, query);
|
|
133794
134021
|
}
|
|
133795
|
-
return response;
|
|
133796
134022
|
}
|
|
133797
134023
|
async createSpotOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
133798
134024
|
/**
|
|
@@ -133909,7 +134135,7 @@ class huobi extends _abstract_huobi_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
133909
134135
|
// {"status":"ok","data":"438398393065481"}
|
|
133910
134136
|
//
|
|
133911
134137
|
const id = this.safeString(response, 'data');
|
|
133912
|
-
return {
|
|
134138
|
+
return this.safeOrder({
|
|
133913
134139
|
'info': response,
|
|
133914
134140
|
'id': id,
|
|
133915
134141
|
'timestamp': undefined,
|
|
@@ -133917,10 +134143,10 @@ class huobi extends _abstract_huobi_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
133917
134143
|
'lastTradeTimestamp': undefined,
|
|
133918
134144
|
'status': undefined,
|
|
133919
134145
|
'symbol': undefined,
|
|
133920
|
-
'type':
|
|
133921
|
-
'side':
|
|
133922
|
-
'price':
|
|
133923
|
-
'amount':
|
|
134146
|
+
'type': type,
|
|
134147
|
+
'side': side,
|
|
134148
|
+
'price': price,
|
|
134149
|
+
'amount': amount,
|
|
133924
134150
|
'filled': undefined,
|
|
133925
134151
|
'remaining': undefined,
|
|
133926
134152
|
'cost': undefined,
|
|
@@ -133928,7 +134154,7 @@ class huobi extends _abstract_huobi_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
133928
134154
|
'fee': undefined,
|
|
133929
134155
|
'clientOrderId': undefined,
|
|
133930
134156
|
'average': undefined,
|
|
133931
|
-
};
|
|
134157
|
+
}, market);
|
|
133932
134158
|
}
|
|
133933
134159
|
async createContractOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
133934
134160
|
/**
|
|
@@ -138202,7 +138428,7 @@ class huobijp extends _abstract_huobijp_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
138202
138428
|
ticker['datetime'] = this.iso8601(timestamp);
|
|
138203
138429
|
result[symbol] = ticker;
|
|
138204
138430
|
}
|
|
138205
|
-
return this.
|
|
138431
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
138206
138432
|
}
|
|
138207
138433
|
parseTrade(trade, market = undefined) {
|
|
138208
138434
|
//
|
|
@@ -138902,7 +139128,7 @@ class huobijp extends _abstract_huobijp_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
138902
139128
|
const response = await this[method](this.extend(request, params));
|
|
138903
139129
|
const timestamp = this.milliseconds();
|
|
138904
139130
|
const id = this.safeString(response, 'data');
|
|
138905
|
-
return {
|
|
139131
|
+
return this.safeOrder({
|
|
138906
139132
|
'info': response,
|
|
138907
139133
|
'id': id,
|
|
138908
139134
|
'timestamp': timestamp,
|
|
@@ -138921,7 +139147,7 @@ class huobijp extends _abstract_huobijp_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
138921
139147
|
'fee': undefined,
|
|
138922
139148
|
'clientOrderId': undefined,
|
|
138923
139149
|
'average': undefined,
|
|
138924
|
-
};
|
|
139150
|
+
}, market);
|
|
138925
139151
|
}
|
|
138926
139152
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
138927
139153
|
/**
|
|
@@ -142551,7 +142777,8 @@ class indodax extends _abstract_indodax_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
142551
142777
|
const response = await this.privatePostGetOrder(this.extend(request, params));
|
|
142552
142778
|
const orders = response['return'];
|
|
142553
142779
|
const order = this.parseOrder(this.extend({ 'id': id }, orders['order']), market);
|
|
142554
|
-
|
|
142780
|
+
order['info'] = response;
|
|
142781
|
+
return order;
|
|
142555
142782
|
}
|
|
142556
142783
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
142557
142784
|
/**
|
|
@@ -143827,7 +144054,7 @@ class kraken extends _abstract_kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
143827
144054
|
const ticker = tickers[id];
|
|
143828
144055
|
result[symbol] = this.parseTicker(ticker, market);
|
|
143829
144056
|
}
|
|
143830
|
-
return this.
|
|
144057
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
143831
144058
|
}
|
|
143832
144059
|
async fetchTicker(symbol, params = {}) {
|
|
143833
144060
|
/**
|
|
@@ -144726,7 +144953,8 @@ class kraken extends _abstract_kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
144726
144953
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.OrderNotFound(this.id + ' fetchOrder() could not find order id ' + id);
|
|
144727
144954
|
}
|
|
144728
144955
|
const order = this.parseOrder(this.extend({ 'id': id }, result[id]));
|
|
144729
|
-
|
|
144956
|
+
order['info'] = order;
|
|
144957
|
+
return order;
|
|
144730
144958
|
}
|
|
144731
144959
|
async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
144732
144960
|
/**
|
|
@@ -146656,7 +146884,8 @@ class krakenfutures extends _abstract_krakenfutures_js__WEBPACK_IMPORTED_MODULE_
|
|
|
146656
146884
|
const status = this.safeString(response['editStatus'], 'status');
|
|
146657
146885
|
this.verifyOrderActionSuccess(status, 'editOrder', ['filled']);
|
|
146658
146886
|
const order = this.parseOrder(response['editStatus']);
|
|
146659
|
-
|
|
146887
|
+
order['info'] = response;
|
|
146888
|
+
return order;
|
|
146660
146889
|
}
|
|
146661
146890
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
146662
146891
|
/**
|
|
@@ -147239,11 +147468,10 @@ class krakenfutures extends _abstract_krakenfutures_js__WEBPACK_IMPORTED_MODULE_
|
|
|
147239
147468
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest(this.id + ' fetchBalance has no account for ' + type);
|
|
147240
147469
|
}
|
|
147241
147470
|
const balance = this.parseBalance(account);
|
|
147242
|
-
|
|
147243
|
-
|
|
147244
|
-
|
|
147245
|
-
|
|
147246
|
-
}, balance);
|
|
147471
|
+
balance['info'] = response;
|
|
147472
|
+
balance['timestamp'] = this.parse8601(datetime);
|
|
147473
|
+
balance['datetime'] = datetime;
|
|
147474
|
+
return balance;
|
|
147247
147475
|
}
|
|
147248
147476
|
parseBalance(response) {
|
|
147249
147477
|
//
|
|
@@ -149383,7 +149611,7 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
149383
149611
|
result[symbol] = ticker;
|
|
149384
149612
|
}
|
|
149385
149613
|
}
|
|
149386
|
-
return this.
|
|
149614
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
149387
149615
|
}
|
|
149388
149616
|
async fetchTicker(symbol, params = {}) {
|
|
149389
149617
|
/**
|
|
@@ -151265,7 +151493,8 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
151265
151493
|
}
|
|
151266
151494
|
}
|
|
151267
151495
|
}
|
|
151268
|
-
|
|
151496
|
+
const returnType = isolated ? result : this.safeBalance(result);
|
|
151497
|
+
return returnType;
|
|
151269
151498
|
}
|
|
151270
151499
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
151271
151500
|
/**
|
|
@@ -153342,7 +153571,7 @@ class kucoinfutures extends _abstract_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_
|
|
|
153342
153571
|
// }
|
|
153343
153572
|
//
|
|
153344
153573
|
const data = this.safeValue(response, 'data', {});
|
|
153345
|
-
return {
|
|
153574
|
+
return this.safeOrder({
|
|
153346
153575
|
'id': this.safeString(data, 'orderId'),
|
|
153347
153576
|
'clientOrderId': undefined,
|
|
153348
153577
|
'timestamp': undefined,
|
|
@@ -153365,7 +153594,7 @@ class kucoinfutures extends _abstract_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_
|
|
|
153365
153594
|
'stopPrice': undefined,
|
|
153366
153595
|
'triggerPrice': undefined,
|
|
153367
153596
|
'info': response,
|
|
153368
|
-
};
|
|
153597
|
+
}, market);
|
|
153369
153598
|
}
|
|
153370
153599
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
153371
153600
|
/**
|
|
@@ -155081,7 +155310,7 @@ class kuna extends _abstract_kuna_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
155081
155310
|
const symbol = market['symbol'];
|
|
155082
155311
|
result[symbol] = this.parseTicker(response[id], market);
|
|
155083
155312
|
}
|
|
155084
|
-
return this.
|
|
155313
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
155085
155314
|
}
|
|
155086
155315
|
async fetchTicker(symbol, params = {}) {
|
|
155087
155316
|
/**
|
|
@@ -157288,12 +157517,12 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
157288
157517
|
/* harmony export */ "Z": () => (/* binding */ lbank)
|
|
157289
157518
|
/* harmony export */ });
|
|
157290
157519
|
/* harmony import */ var _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6168);
|
|
157291
|
-
/* harmony import */ var
|
|
157520
|
+
/* harmony import */ var _base_errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6689);
|
|
157292
157521
|
/* harmony import */ var _base_Precise_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2194);
|
|
157293
157522
|
/* harmony import */ var _base_functions_number_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9292);
|
|
157294
|
-
/* harmony import */ var
|
|
157295
|
-
/* harmony import */ var
|
|
157296
|
-
/* harmony import */ var
|
|
157523
|
+
/* harmony import */ var _static_dependencies_noble_hashes_md5_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7311);
|
|
157524
|
+
/* harmony import */ var _base_functions_rsa_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5981);
|
|
157525
|
+
/* harmony import */ var _static_dependencies_noble_hashes_sha256_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1372);
|
|
157297
157526
|
// ---------------------------------------------------------------------------
|
|
157298
157527
|
|
|
157299
157528
|
|
|
@@ -157624,7 +157853,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
157624
157853
|
const symbol = ticker['symbol'];
|
|
157625
157854
|
result[symbol] = ticker;
|
|
157626
157855
|
}
|
|
157627
|
-
return this.
|
|
157856
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
157628
157857
|
}
|
|
157629
157858
|
async fetchOrderBook(symbol, limit = 60, params = {}) {
|
|
157630
157859
|
/**
|
|
@@ -157958,7 +158187,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
157958
158187
|
return orders[0];
|
|
157959
158188
|
}
|
|
157960
158189
|
else {
|
|
157961
|
-
return orders;
|
|
158190
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.BadRequest(this.id + ' fetchOrder() can only return one order at a time. Found ' + numOrders + ' orders.');
|
|
157962
158191
|
}
|
|
157963
158192
|
}
|
|
157964
158193
|
async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -158105,7 +158334,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
158105
158334
|
'api_key': this.apiKey,
|
|
158106
158335
|
}, query));
|
|
158107
158336
|
const queryString = this.rawencode(query);
|
|
158108
|
-
const message = this.hash(this.encode(queryString),
|
|
158337
|
+
const message = this.hash(this.encode(queryString), _static_dependencies_noble_hashes_md5_js__WEBPACK_IMPORTED_MODULE_4__/* .md5 */ .F).toUpperCase();
|
|
158109
158338
|
const cacheSecretAsPem = this.safeValue(this.options, 'cacheSecretAsPem', true);
|
|
158110
158339
|
let pem = undefined;
|
|
158111
158340
|
if (cacheSecretAsPem) {
|
|
@@ -158118,7 +158347,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
158118
158347
|
else {
|
|
158119
158348
|
pem = this.convertSecretToPem(this.secret);
|
|
158120
158349
|
}
|
|
158121
|
-
query['sign'] = (0,
|
|
158350
|
+
query['sign'] = (0,_base_functions_rsa_js__WEBPACK_IMPORTED_MODULE_5__/* .rsa */ .j)(message, pem, _static_dependencies_noble_hashes_sha256_js__WEBPACK_IMPORTED_MODULE_6__/* .sha256 */ .J);
|
|
158122
158351
|
body = this.urlencode(query);
|
|
158123
158352
|
headers = { 'Content-Type': 'application/x-www-form-urlencoded' };
|
|
158124
158353
|
}
|
|
@@ -158156,21 +158385,21 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
158156
158385
|
'10022': 'Insufficient key authority',
|
|
158157
158386
|
}, errorCode, this.json(response));
|
|
158158
158387
|
const ErrorClass = this.safeValue({
|
|
158159
|
-
'10002':
|
|
158160
|
-
'10004':
|
|
158161
|
-
'10005':
|
|
158162
|
-
'10006':
|
|
158163
|
-
'10007':
|
|
158164
|
-
'10009':
|
|
158165
|
-
'10010':
|
|
158166
|
-
'10011':
|
|
158167
|
-
'10012':
|
|
158168
|
-
'10013':
|
|
158169
|
-
'10014':
|
|
158170
|
-
'10015':
|
|
158171
|
-
'10016':
|
|
158172
|
-
'10022':
|
|
158173
|
-
}, errorCode,
|
|
158388
|
+
'10002': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.AuthenticationError,
|
|
158389
|
+
'10004': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.DDoSProtection,
|
|
158390
|
+
'10005': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.AuthenticationError,
|
|
158391
|
+
'10006': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.AuthenticationError,
|
|
158392
|
+
'10007': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.AuthenticationError,
|
|
158393
|
+
'10009': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.InvalidOrder,
|
|
158394
|
+
'10010': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.InvalidOrder,
|
|
158395
|
+
'10011': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.InvalidOrder,
|
|
158396
|
+
'10012': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.InvalidOrder,
|
|
158397
|
+
'10013': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.InvalidOrder,
|
|
158398
|
+
'10014': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.InvalidOrder,
|
|
158399
|
+
'10015': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.InvalidOrder,
|
|
158400
|
+
'10016': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.InvalidOrder,
|
|
158401
|
+
'10022': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.AuthenticationError,
|
|
158402
|
+
}, errorCode, _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.ExchangeError);
|
|
158174
158403
|
throw new ErrorClass(message);
|
|
158175
158404
|
}
|
|
158176
158405
|
return undefined;
|
|
@@ -159699,8 +159928,10 @@ class lbank2 extends _abstract_lbank2_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
159699
159928
|
const options = this.safeValue(this.options, 'fetchOrder', {});
|
|
159700
159929
|
method = this.safeString(options, 'method', 'fetchOrderSupplement');
|
|
159701
159930
|
}
|
|
159702
|
-
|
|
159703
|
-
|
|
159931
|
+
if (method === 'fetchOrderSupplement') {
|
|
159932
|
+
return await this.fetchOrderSupplement(id, symbol, params);
|
|
159933
|
+
}
|
|
159934
|
+
return await this.fetchOrderDefault(id, symbol, params);
|
|
159704
159935
|
}
|
|
159705
159936
|
async fetchOrderSupplement(id, symbol = undefined, params = {}) {
|
|
159706
159937
|
this.checkRequiredSymbol('fetchOrder', symbol);
|
|
@@ -159771,12 +160002,13 @@ class lbank2 extends _abstract_lbank2_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
159771
160002
|
return this.parseOrder(result[0]);
|
|
159772
160003
|
}
|
|
159773
160004
|
else {
|
|
159774
|
-
const parsedOrders = [];
|
|
159775
|
-
for (let i = 0; i < numOrders; i++) {
|
|
159776
|
-
|
|
159777
|
-
|
|
159778
|
-
}
|
|
159779
|
-
return parsedOrders;
|
|
160005
|
+
// const parsedOrders = [];
|
|
160006
|
+
// for (let i = 0; i < numOrders; i++) {
|
|
160007
|
+
// const parsedOrder = this.parseOrder (result[i]);
|
|
160008
|
+
// parsedOrders.push (parsedOrder);
|
|
160009
|
+
// }
|
|
160010
|
+
// return parsedOrders;
|
|
160011
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' fetchOrder() can only fetch one order at a time');
|
|
159780
160012
|
}
|
|
159781
160013
|
}
|
|
159782
160014
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -161535,7 +161767,7 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
161535
161767
|
const ticker = tickers[id];
|
|
161536
161768
|
result[symbol] = this.parseTicker(ticker, market);
|
|
161537
161769
|
}
|
|
161538
|
-
return this.
|
|
161770
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
161539
161771
|
}
|
|
161540
161772
|
async fetchTicker(symbol, params = {}) {
|
|
161541
161773
|
/**
|
|
@@ -162838,7 +163070,7 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
162838
163070
|
if (type === 'market') {
|
|
162839
163071
|
price = this.safeNumber(payload, 'price');
|
|
162840
163072
|
}
|
|
162841
|
-
return {
|
|
163073
|
+
return this.safeOrder({
|
|
162842
163074
|
'id': id,
|
|
162843
163075
|
'info': result,
|
|
162844
163076
|
'clientOrderId': undefined,
|
|
@@ -162857,7 +163089,7 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
162857
163089
|
'status': undefined,
|
|
162858
163090
|
'fee': undefined,
|
|
162859
163091
|
'trades': undefined,
|
|
162860
|
-
};
|
|
163092
|
+
}, market);
|
|
162861
163093
|
}
|
|
162862
163094
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
162863
163095
|
/**
|
|
@@ -166303,10 +166535,9 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
166303
166535
|
if (market['spot']) {
|
|
166304
166536
|
return await this.createSpotOrder(market, type, side, amount, price, marginMode, query);
|
|
166305
166537
|
}
|
|
166306
|
-
else
|
|
166538
|
+
else {
|
|
166307
166539
|
return await this.createSwapOrder(market, type, side, amount, price, marginMode, query);
|
|
166308
166540
|
}
|
|
166309
|
-
return undefined;
|
|
166310
166541
|
}
|
|
166311
166542
|
async createSpotOrder(market, type, side, amount, price = undefined, marginMode = undefined, params = {}) {
|
|
166312
166543
|
const symbol = market['symbol'];
|
|
@@ -166377,12 +166608,12 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
166377
166608
|
// "transactTime": 1661992652132
|
|
166378
166609
|
// }
|
|
166379
166610
|
//
|
|
166380
|
-
|
|
166381
|
-
|
|
166382
|
-
|
|
166383
|
-
|
|
166384
|
-
|
|
166385
|
-
|
|
166611
|
+
const order = this.parseOrder(response, market);
|
|
166612
|
+
order['side'] = side;
|
|
166613
|
+
order['type'] = type;
|
|
166614
|
+
order['price'] = price;
|
|
166615
|
+
order['amount'] = amount;
|
|
166616
|
+
return order;
|
|
166386
166617
|
}
|
|
166387
166618
|
async createSwapOrder(market, type, side, amount, price = undefined, marginMode = undefined, params = {}) {
|
|
166388
166619
|
await this.loadMarkets();
|
|
@@ -172480,7 +172711,7 @@ class novadax extends _abstract_novadax_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
172480
172711
|
const symbol = ticker['symbol'];
|
|
172481
172712
|
result[symbol] = ticker;
|
|
172482
172713
|
}
|
|
172483
|
-
return this.
|
|
172714
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
172484
172715
|
}
|
|
172485
172716
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
172486
172717
|
/**
|
|
@@ -173915,7 +174146,7 @@ class oceanex extends _abstract_oceanex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
173915
174146
|
const symbol = market['symbol'];
|
|
173916
174147
|
result[symbol] = this.parseTicker(ticker, market);
|
|
173917
174148
|
}
|
|
173918
|
-
return this.
|
|
174149
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
173919
174150
|
}
|
|
173920
174151
|
parseTicker(data, market = undefined) {
|
|
173921
174152
|
//
|
|
@@ -175891,7 +176122,7 @@ class okcoin extends _abstract_okcoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
175891
176122
|
const symbol = ticker['symbol'];
|
|
175892
176123
|
result[symbol] = ticker;
|
|
175893
176124
|
}
|
|
175894
|
-
return this.
|
|
176125
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
175895
176126
|
}
|
|
175896
176127
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
175897
176128
|
/**
|
|
@@ -176624,10 +176855,9 @@ class okcoin extends _abstract_okcoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
176624
176855
|
// }
|
|
176625
176856
|
//
|
|
176626
176857
|
const order = this.parseOrder(response, market);
|
|
176627
|
-
|
|
176628
|
-
|
|
176629
|
-
|
|
176630
|
-
});
|
|
176858
|
+
order['type'] = type;
|
|
176859
|
+
order['side'] = side;
|
|
176860
|
+
return order;
|
|
176631
176861
|
}
|
|
176632
176862
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
176633
176863
|
/**
|
|
@@ -178749,6 +178979,7 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
178749
178979
|
'trade/orders-history-archive': 1,
|
|
178750
178980
|
'trade/fills': 1 / 3,
|
|
178751
178981
|
'trade/fills-history': 2.2,
|
|
178982
|
+
'trade/fills-archive': 2,
|
|
178752
178983
|
'trade/order-algo': 1,
|
|
178753
178984
|
'trade/orders-algo-pending': 1,
|
|
178754
178985
|
'trade/orders-algo-history': 1,
|
|
@@ -178815,6 +179046,12 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
178815
179046
|
'tradingBot/grid/orders-algo-details': 1,
|
|
178816
179047
|
'tradingBot/grid/sub-orders': 1,
|
|
178817
179048
|
'tradingBot/grid/positions': 1,
|
|
179049
|
+
'tradingBot/grid/ai-param': 1,
|
|
179050
|
+
'tradingBot/public/rsi-back-testing': 1,
|
|
179051
|
+
'tradingBot/signal/orders-algo-details': 1,
|
|
179052
|
+
'tradingBot/signal/positions': 1,
|
|
179053
|
+
'tradingBot/signal/sub-orders': 1,
|
|
179054
|
+
'tradingBot/signal/event-history': 1,
|
|
178818
179055
|
'tradingBot/recurring/orders-algo-pending': 1,
|
|
178819
179056
|
'tradingBot/recurring/orders-algo-history': 1,
|
|
178820
179057
|
'tradingBot/recurring/orders-algo-details': 1,
|
|
@@ -178871,6 +179108,7 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
178871
179108
|
'trade/amend-order': 1 / 3,
|
|
178872
179109
|
'trade/amend-batch-orders': 1 / 150,
|
|
178873
179110
|
'trade/close-position': 1,
|
|
179111
|
+
'trade/fills-archive': 172800,
|
|
178874
179112
|
'trade/order-algo': 1,
|
|
178875
179113
|
'trade/cancel-algos': 1,
|
|
178876
179114
|
'trade/amend-algos': 1,
|
|
@@ -178945,6 +179183,7 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
178945
179183
|
'broker/nd/rebate-per-orders': 36000,
|
|
178946
179184
|
'finance/sfp/dcd/quote': 10,
|
|
178947
179185
|
'finance/sfp/dcd/order': 10,
|
|
179186
|
+
'broker/nd/report-subaccount-ip': 0.25,
|
|
178948
179187
|
'broker/fd/rebate-per-orders': 36000,
|
|
178949
179188
|
},
|
|
178950
179189
|
},
|
|
@@ -181255,10 +181494,9 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
181255
181494
|
const data = this.safeValue(response, 'data', []);
|
|
181256
181495
|
const first = this.safeValue(data, 0);
|
|
181257
181496
|
const order = this.parseOrder(first, market);
|
|
181258
|
-
|
|
181259
|
-
|
|
181260
|
-
|
|
181261
|
-
});
|
|
181497
|
+
order['type'] = type;
|
|
181498
|
+
order['side'] = side;
|
|
181499
|
+
return order;
|
|
181262
181500
|
}
|
|
181263
181501
|
editOrderRequest(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
181264
181502
|
const market = this.market(symbol);
|
|
@@ -181369,10 +181607,9 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
181369
181607
|
const data = this.safeValue(response, 'data', []);
|
|
181370
181608
|
const first = this.safeValue(data, 0);
|
|
181371
181609
|
const order = this.parseOrder(first, market);
|
|
181372
|
-
|
|
181373
|
-
|
|
181374
|
-
|
|
181375
|
-
});
|
|
181610
|
+
order['type'] = type;
|
|
181611
|
+
order['side'] = side;
|
|
181612
|
+
return order;
|
|
181376
181613
|
}
|
|
181377
181614
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
181378
181615
|
/**
|
|
@@ -184297,6 +184534,7 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
184297
184534
|
* @param {string} marginMode 'cross' or 'isolated'
|
|
184298
184535
|
* @param {string} symbol unified market symbol
|
|
184299
184536
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
184537
|
+
* @param {int} [params.leverage] leverage
|
|
184300
184538
|
* @returns {object} response from the exchange
|
|
184301
184539
|
*/
|
|
184302
184540
|
if (symbol === undefined) {
|
|
@@ -184310,11 +184548,11 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
184310
184548
|
}
|
|
184311
184549
|
await this.loadMarkets();
|
|
184312
184550
|
const market = this.market(symbol);
|
|
184313
|
-
const lever = this.
|
|
184551
|
+
const lever = this.safeInteger2(params, 'lever', 'leverage');
|
|
184314
184552
|
if ((lever === undefined) || (lever < 1) || (lever > 125)) {
|
|
184315
184553
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest(this.id + ' setMarginMode() params["lever"] should be between 1 and 125');
|
|
184316
184554
|
}
|
|
184317
|
-
params = this.omit(params, ['
|
|
184555
|
+
params = this.omit(params, ['leverage']);
|
|
184318
184556
|
const request = {
|
|
184319
184557
|
'lever': lever,
|
|
184320
184558
|
'mgnMode': marginMode,
|
|
@@ -185511,7 +185749,7 @@ class paymium extends _abstract_paymium_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
185511
185749
|
},
|
|
185512
185750
|
},
|
|
185513
185751
|
'markets': {
|
|
185514
|
-
'BTC/EUR': { 'id': 'eur', 'symbol': 'BTC/EUR', 'base': 'BTC', 'quote': 'EUR', 'baseId': 'btc', 'quoteId': 'eur', 'type': 'spot', 'spot': true },
|
|
185752
|
+
'BTC/EUR': this.safeMarketStructure({ 'id': 'eur', 'symbol': 'BTC/EUR', 'base': 'BTC', 'quote': 'EUR', 'baseId': 'btc', 'quoteId': 'eur', 'type': 'spot', 'spot': true }),
|
|
185515
185753
|
},
|
|
185516
185754
|
'fees': {
|
|
185517
185755
|
'trading': {
|
|
@@ -191486,8 +191724,8 @@ class poloniex extends _abstract_poloniex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
191486
191724
|
// }
|
|
191487
191725
|
// ]
|
|
191488
191726
|
//
|
|
191489
|
-
const result = this.parseTrades(response, market);
|
|
191490
|
-
return
|
|
191727
|
+
const result = this.parseTrades(response, market, since, limit);
|
|
191728
|
+
return result;
|
|
191491
191729
|
}
|
|
191492
191730
|
parseOrderStatus(status) {
|
|
191493
191731
|
const statuses = {
|
|
@@ -191969,9 +192207,9 @@ class poloniex extends _abstract_poloniex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
191969
192207
|
// "updateTime": 1646196019020
|
|
191970
192208
|
// }
|
|
191971
192209
|
//
|
|
191972
|
-
|
|
191973
|
-
|
|
191974
|
-
|
|
192210
|
+
const order = this.parseOrder(response);
|
|
192211
|
+
order['id'] = id;
|
|
192212
|
+
return order;
|
|
191975
192213
|
}
|
|
191976
192214
|
async fetchOrderStatus(id, symbol = undefined, params = {}) {
|
|
191977
192215
|
await this.loadMarkets();
|
|
@@ -193689,7 +193927,7 @@ class poloniexfutures extends _abstract_poloniexfutures_js__WEBPACK_IMPORTED_MOD
|
|
|
193689
193927
|
// }
|
|
193690
193928
|
//
|
|
193691
193929
|
const data = this.safeValue(response, 'data', {});
|
|
193692
|
-
return {
|
|
193930
|
+
return this.safeOrder({
|
|
193693
193931
|
'id': this.safeString(data, 'orderId'),
|
|
193694
193932
|
'clientOrderId': undefined,
|
|
193695
193933
|
'timestamp': undefined,
|
|
@@ -193711,7 +193949,7 @@ class poloniexfutures extends _abstract_poloniexfutures_js__WEBPACK_IMPORTED_MOD
|
|
|
193711
193949
|
'postOnly': undefined,
|
|
193712
193950
|
'stopPrice': undefined,
|
|
193713
193951
|
'info': response,
|
|
193714
|
-
};
|
|
193952
|
+
}, market);
|
|
193715
193953
|
}
|
|
193716
193954
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
193717
193955
|
/**
|
|
@@ -253478,7 +253716,7 @@ class tidex extends _abstract_tidex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
253478
253716
|
const symbol = market['symbol'];
|
|
253479
253717
|
result[symbol] = this.parseTicker(response[id], market);
|
|
253480
253718
|
}
|
|
253481
|
-
return this.
|
|
253719
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
253482
253720
|
}
|
|
253483
253721
|
async fetchTicker(symbol, params = {}) {
|
|
253484
253722
|
/**
|
|
@@ -258844,7 +259082,7 @@ class upbit extends _abstract_upbit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
258844
259082
|
const symbol = ticker['symbol'];
|
|
258845
259083
|
result[symbol] = ticker;
|
|
258846
259084
|
}
|
|
258847
|
-
return this.
|
|
259085
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
258848
259086
|
}
|
|
258849
259087
|
async fetchTicker(symbol, params = {}) {
|
|
258850
259088
|
/**
|
|
@@ -263001,7 +263239,7 @@ class wazirx extends _abstract_wazirx_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
263001
263239
|
const symbol = parsedTicker['symbol'];
|
|
263002
263240
|
result[symbol] = parsedTicker;
|
|
263003
263241
|
}
|
|
263004
|
-
return result;
|
|
263242
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
263005
263243
|
}
|
|
263006
263244
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
263007
263245
|
/**
|
|
@@ -264330,7 +264568,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
264330
264568
|
const symbol = ticker['symbol'];
|
|
264331
264569
|
result[symbol] = ticker;
|
|
264332
264570
|
}
|
|
264333
|
-
return this.
|
|
264571
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
264334
264572
|
}
|
|
264335
264573
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
264336
264574
|
/**
|
|
@@ -266694,7 +266932,9 @@ class woo extends _abstract_woo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
266694
266932
|
const rows = this.safeValue(data, 'rows', []);
|
|
266695
266933
|
return this.parseOrder(rows[0], market);
|
|
266696
266934
|
}
|
|
266697
|
-
|
|
266935
|
+
const order = this.parseOrder(response, market);
|
|
266936
|
+
order['type'] = type;
|
|
266937
|
+
return order;
|
|
266698
266938
|
}
|
|
266699
266939
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
266700
266940
|
/**
|
|
@@ -269005,7 +269245,7 @@ class yobit extends _abstract_yobit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
269005
269245
|
const symbol = market['symbol'];
|
|
269006
269246
|
result[symbol] = this.parseTicker(ticker, market);
|
|
269007
269247
|
}
|
|
269008
|
-
return this.
|
|
269248
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
269009
269249
|
}
|
|
269010
269250
|
async fetchTicker(symbol, params = {}) {
|
|
269011
269251
|
/**
|
|
@@ -277947,7 +278187,7 @@ SOFTWARE.
|
|
|
277947
278187
|
|
|
277948
278188
|
//-----------------------------------------------------------------------------
|
|
277949
278189
|
// this is updated by vss.js when building
|
|
277950
|
-
const version = '4.1.
|
|
278190
|
+
const version = '4.1.19';
|
|
277951
278191
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
|
|
277952
278192
|
//-----------------------------------------------------------------------------
|
|
277953
278193
|
|