ccxt 4.1.8 → 4.1.10
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/.git-templates/hooks/pre-push +55 -0
- package/README.md +3 -3
- package/dist/ccxt.browser.js +1458 -302
- package/dist/ccxt.browser.min.js +7 -7
- package/dist/cjs/ccxt.js +3 -1
- package/dist/cjs/src/base/Exchange.js +59 -3
- package/dist/cjs/src/bingx.js +103 -41
- package/dist/cjs/src/bitbns.js +107 -83
- package/dist/cjs/src/bitget.js +35 -17
- package/dist/cjs/src/btcalpha.js +9 -1
- package/dist/cjs/src/btcmarkets.js +5 -5
- package/dist/cjs/src/coinex.js +14 -2
- package/dist/cjs/src/deribit.js +6 -0
- package/dist/cjs/src/gate.js +9 -1
- package/dist/cjs/src/hitbtc.js +20 -2
- package/dist/cjs/src/kucoinfutures.js +2 -2
- package/dist/cjs/src/phemex.js +20 -1
- package/dist/cjs/src/pro/bingx.js +891 -0
- package/dist/cjs/src/probit.js +3 -0
- package/dist/cjs/src/woo.js +21 -1
- package/js/ccxt.d.ts +6 -3
- package/js/ccxt.js +3 -1
- package/js/src/abstract/bingx.d.ts +1 -0
- package/js/src/base/Exchange.d.ts +6 -3
- package/js/src/base/Exchange.js +59 -3
- package/js/src/base/types.d.ts +7 -0
- package/js/src/binance.d.ts +17 -17
- package/js/src/bingx.d.ts +4 -3
- package/js/src/bingx.js +103 -41
- package/js/src/bitbns.d.ts +1 -1
- package/js/src/bitbns.js +107 -83
- package/js/src/bitfinex2.d.ts +13 -13
- package/js/src/bitget.d.ts +15 -15
- package/js/src/bitget.js +35 -17
- package/js/src/bitmex.d.ts +15 -15
- package/js/src/btcalpha.js +9 -1
- package/js/src/btcmarkets.js +5 -5
- package/js/src/bybit.d.ts +23 -23
- package/js/src/coinbase.d.ts +16 -16
- package/js/src/coinbasepro.d.ts +12 -12
- package/js/src/coinex.d.ts +2 -2
- package/js/src/coinex.js +14 -2
- package/js/src/cryptocom.d.ts +12 -12
- package/js/src/deribit.d.ts +2 -2
- package/js/src/deribit.js +6 -0
- package/js/src/digifinex.d.ts +2 -2
- package/js/src/gate.d.ts +10 -10
- package/js/src/gate.js +9 -1
- package/js/src/hitbtc.d.ts +2 -2
- package/js/src/hitbtc.js +20 -2
- package/js/src/huobi.d.ts +16 -16
- package/js/src/kraken.d.ts +2 -2
- package/js/src/krakenfutures.d.ts +6 -6
- package/js/src/kucoin.d.ts +13 -13
- package/js/src/kucoinfutures.d.ts +10 -10
- package/js/src/kucoinfutures.js +2 -2
- package/js/src/mexc.d.ts +3 -3
- package/js/src/okx.d.ts +13 -13
- package/js/src/phemex.d.ts +2 -2
- package/js/src/phemex.js +20 -1
- package/js/src/poloniex.d.ts +5 -5
- package/js/src/pro/bingx.d.ts +24 -0
- package/js/src/pro/bingx.js +892 -0
- package/js/src/probit.js +3 -0
- package/js/src/woo.d.ts +2 -2
- package/js/src/woo.js +21 -1
- package/package.json +1 -1
- package/pyproject.toml +8 -0
- package/skip-tests.json +4 -1
package/dist/ccxt.browser.js
CHANGED
|
@@ -8627,7 +8627,7 @@ class Exchange {
|
|
|
8627
8627
|
// string = true
|
|
8628
8628
|
//
|
|
8629
8629
|
// [
|
|
8630
|
-
// { 'currency': 'BTC', 'cost': '0.
|
|
8630
|
+
// { 'currency': 'BTC', 'cost': '0.4' },
|
|
8631
8631
|
// { 'currency': 'BTC', 'cost': '0.6', 'rate': '0.00123' },
|
|
8632
8632
|
// { 'currency': 'BTC', 'cost': '0.5', 'rate': '0.00456' },
|
|
8633
8633
|
// { 'currency': 'USDT', 'cost': '12.3456' },
|
|
@@ -9817,6 +9817,9 @@ class Exchange {
|
|
|
9817
9817
|
async fetchOpenInterest(symbol, params = {}) {
|
|
9818
9818
|
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' fetchOpenInterest() is not supported yet');
|
|
9819
9819
|
}
|
|
9820
|
+
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
9821
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' fetchFundingRateHistory() is not supported yet');
|
|
9822
|
+
}
|
|
9820
9823
|
parseLastPrice(price, market = undefined) {
|
|
9821
9824
|
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' parseLastPrice() is not supported yet');
|
|
9822
9825
|
}
|
|
@@ -10707,7 +10710,9 @@ class Exchange {
|
|
|
10707
10710
|
}
|
|
10708
10711
|
}
|
|
10709
10712
|
}
|
|
10710
|
-
|
|
10713
|
+
const uniqueResults = this.removeRepeatedElementsFromArray(result);
|
|
10714
|
+
const key = (method === 'fetchOHLCV') ? 0 : 'timestamp';
|
|
10715
|
+
return this.filterBySinceLimit(uniqueResults, since, limit, key);
|
|
10711
10716
|
}
|
|
10712
10717
|
async safeDeterministicCall(method, symbol = undefined, since = undefined, limit = undefined, timeframe = undefined, params = {}) {
|
|
10713
10718
|
let maxRetries = undefined;
|
|
@@ -10762,7 +10767,9 @@ class Exchange {
|
|
|
10762
10767
|
for (let i = 0; i < results.length; i++) {
|
|
10763
10768
|
result = this.arrayConcat(result, results[i]);
|
|
10764
10769
|
}
|
|
10765
|
-
|
|
10770
|
+
const uniqueResults = this.removeRepeatedElementsFromArray(result);
|
|
10771
|
+
const key = (method === 'fetchOHLCV') ? 0 : 'timestamp';
|
|
10772
|
+
return this.filterBySinceLimit(uniqueResults, since, limit, key);
|
|
10766
10773
|
}
|
|
10767
10774
|
async fetchPaginatedCallCursor(method, symbol = undefined, since = undefined, limit = undefined, params = {}, cursorReceived = undefined, cursorSent = undefined, cursorIncrement = undefined, maxEntriesPerRequest = undefined) {
|
|
10768
10775
|
let maxCalls = undefined;
|
|
@@ -10806,6 +10813,55 @@ class Exchange {
|
|
|
10806
10813
|
}
|
|
10807
10814
|
i += 1;
|
|
10808
10815
|
}
|
|
10816
|
+
const sorted = this.sortCursorPaginatedResult(result);
|
|
10817
|
+
const key = (method === 'fetchOHLCV') ? 0 : 'timestamp';
|
|
10818
|
+
return this.filterBySinceLimit(sorted, since, limit, key);
|
|
10819
|
+
}
|
|
10820
|
+
async fetchPaginatedCallIncremental(method, symbol = undefined, since = undefined, limit = undefined, params = {}, pageKey = undefined, maxEntriesPerRequest = undefined) {
|
|
10821
|
+
let maxCalls = undefined;
|
|
10822
|
+
[maxCalls, params] = this.handleOptionAndParams(params, method, 'paginationCalls', 10);
|
|
10823
|
+
let maxRetries = undefined;
|
|
10824
|
+
[maxRetries, params] = this.handleOptionAndParams(params, method, 'maxRetries', 3);
|
|
10825
|
+
[maxEntriesPerRequest, params] = this.handleMaxEntriesPerRequestAndParams(method, maxEntriesPerRequest, params);
|
|
10826
|
+
let i = 0;
|
|
10827
|
+
let errors = 0;
|
|
10828
|
+
let result = [];
|
|
10829
|
+
while (i < maxCalls) {
|
|
10830
|
+
try {
|
|
10831
|
+
params[pageKey] = i + 1;
|
|
10832
|
+
const response = await this[method](symbol, since, maxEntriesPerRequest, params);
|
|
10833
|
+
errors = 0;
|
|
10834
|
+
const responseLength = response.length;
|
|
10835
|
+
if (this.verbose) {
|
|
10836
|
+
this.log('Incremental pagination call', i + 1, 'method', method, 'response length', responseLength);
|
|
10837
|
+
}
|
|
10838
|
+
if (responseLength === 0) {
|
|
10839
|
+
break;
|
|
10840
|
+
}
|
|
10841
|
+
result = this.arrayConcat(result, response);
|
|
10842
|
+
}
|
|
10843
|
+
catch (e) {
|
|
10844
|
+
errors += 1;
|
|
10845
|
+
if (errors > maxRetries) {
|
|
10846
|
+
throw e;
|
|
10847
|
+
}
|
|
10848
|
+
}
|
|
10849
|
+
i += 1;
|
|
10850
|
+
}
|
|
10851
|
+
const sorted = this.sortCursorPaginatedResult(result);
|
|
10852
|
+
const key = (method === 'fetchOHLCV') ? 0 : 'timestamp';
|
|
10853
|
+
return this.filterBySinceLimit(sorted, since, limit, key);
|
|
10854
|
+
}
|
|
10855
|
+
sortCursorPaginatedResult(result) {
|
|
10856
|
+
const first = this.safeValue(result, 0);
|
|
10857
|
+
if (first !== undefined) {
|
|
10858
|
+
if ('timestamp' in first) {
|
|
10859
|
+
return this.sortBy(result, 'timestamp');
|
|
10860
|
+
}
|
|
10861
|
+
if ('id' in first) {
|
|
10862
|
+
return this.sortBy(result, 'id');
|
|
10863
|
+
}
|
|
10864
|
+
}
|
|
10809
10865
|
return result;
|
|
10810
10866
|
}
|
|
10811
10867
|
removeRepeatedElementsFromArray(input) {
|
|
@@ -25320,6 +25376,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
25320
25376
|
'swap': 'https://open-api.{hostname}/openApi',
|
|
25321
25377
|
'contract': 'https://open-api.{hostname}/openApi',
|
|
25322
25378
|
'wallets': 'https://open-api.{hostname}/openApi',
|
|
25379
|
+
'user': 'https://open-api.{hostname}/openApi',
|
|
25323
25380
|
'subAccount': 'https://open-api.{hostname}/openApi',
|
|
25324
25381
|
'account': 'https://open-api.{hostname}/openApi',
|
|
25325
25382
|
},
|
|
@@ -25488,6 +25545,15 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
25488
25545
|
},
|
|
25489
25546
|
},
|
|
25490
25547
|
},
|
|
25548
|
+
'user': {
|
|
25549
|
+
'auth': {
|
|
25550
|
+
'private': {
|
|
25551
|
+
'post': {
|
|
25552
|
+
'userDataStream': 1,
|
|
25553
|
+
},
|
|
25554
|
+
},
|
|
25555
|
+
},
|
|
25556
|
+
},
|
|
25491
25557
|
'copyTrading': {
|
|
25492
25558
|
'v1': {
|
|
25493
25559
|
'private': {
|
|
@@ -25565,6 +25631,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
25565
25631
|
},
|
|
25566
25632
|
'commonCurrencies': {},
|
|
25567
25633
|
'options': {
|
|
25634
|
+
'defaultType': 'spot',
|
|
25568
25635
|
'accountsByType': {
|
|
25569
25636
|
'spot': 'FUND',
|
|
25570
25637
|
'swap': 'PFUTURES',
|
|
@@ -26084,37 +26151,63 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
26084
26151
|
// filledTime: '2023-07-04T20:56:01.000+0800'
|
|
26085
26152
|
// }
|
|
26086
26153
|
//
|
|
26087
|
-
|
|
26154
|
+
//
|
|
26155
|
+
// ws
|
|
26156
|
+
//
|
|
26157
|
+
// spot
|
|
26158
|
+
//
|
|
26159
|
+
// {
|
|
26160
|
+
// E: 1690214529432,
|
|
26161
|
+
// T: 1690214529386,
|
|
26162
|
+
// e: 'trade',
|
|
26163
|
+
// m: true,
|
|
26164
|
+
// p: '29110.19',
|
|
26165
|
+
// q: '0.1868',
|
|
26166
|
+
// s: 'BTC-USDT',
|
|
26167
|
+
// t: '57903921'
|
|
26168
|
+
// }
|
|
26169
|
+
//
|
|
26170
|
+
// swap
|
|
26171
|
+
//
|
|
26172
|
+
// {
|
|
26173
|
+
// q: '0.0421',
|
|
26174
|
+
// p: '29023.5',
|
|
26175
|
+
// T: 1690221401344,
|
|
26176
|
+
// m: false,
|
|
26177
|
+
// s: 'BTC-USDT'
|
|
26178
|
+
// }
|
|
26179
|
+
//
|
|
26180
|
+
let time = this.safeIntegerN(trade, ['time', 'filledTm', 'T']);
|
|
26088
26181
|
const datetimeId = this.safeString(trade, 'filledTm');
|
|
26089
26182
|
if (datetimeId !== undefined) {
|
|
26090
26183
|
time = this.parse8601(datetimeId);
|
|
26091
26184
|
}
|
|
26092
|
-
|
|
26093
|
-
|
|
26094
|
-
let side = undefined;
|
|
26095
|
-
if (isBuyerMaker !== undefined) {
|
|
26096
|
-
side = isBuyerMaker ? 'sell' : 'buy';
|
|
26097
|
-
takeOrMaker = 'taker';
|
|
26185
|
+
if (time === 0) {
|
|
26186
|
+
time = undefined;
|
|
26098
26187
|
}
|
|
26188
|
+
const isBuyerMaker = this.safeValue2(trade, 'buyerMaker', 'isBuyerMaker');
|
|
26189
|
+
const side = this.safeStringLower2(trade, 'side', 'S');
|
|
26099
26190
|
const cost = this.safeString(trade, 'quoteQty');
|
|
26100
26191
|
const type = (cost === undefined) ? 'spot' : 'swap';
|
|
26101
|
-
const currencyId = this.
|
|
26192
|
+
const currencyId = this.safeString2(trade, 'currency', 'N');
|
|
26102
26193
|
const currencyCode = this.safeCurrencyCode(currencyId);
|
|
26194
|
+
const m = this.safeValue(trade, 'm', false);
|
|
26195
|
+
const marketId = this.safeString(trade, 's');
|
|
26103
26196
|
return this.safeTrade({
|
|
26104
|
-
'id': this.
|
|
26197
|
+
'id': this.safeStringN(trade, ['id', 't']),
|
|
26105
26198
|
'info': trade,
|
|
26106
26199
|
'timestamp': time,
|
|
26107
26200
|
'datetime': this.iso8601(time),
|
|
26108
|
-
'symbol': this.safeSymbol(
|
|
26109
|
-
'order':
|
|
26110
|
-
'type':
|
|
26111
|
-
'side': side,
|
|
26112
|
-
'takerOrMaker':
|
|
26113
|
-
'price': this.
|
|
26114
|
-
'amount': this.
|
|
26201
|
+
'symbol': this.safeSymbol(marketId, market, '-', type),
|
|
26202
|
+
'order': this.safeString2(trade, 'orderId', 'i'),
|
|
26203
|
+
'type': this.safeStringLower(trade, 'o'),
|
|
26204
|
+
'side': this.parseOrderSide(side),
|
|
26205
|
+
'takerOrMaker': (isBuyerMaker || m) ? 'maker' : 'taker',
|
|
26206
|
+
'price': this.safeString2(trade, 'price', 'p'),
|
|
26207
|
+
'amount': this.safeStringN(trade, ['qty', 'amount', 'q']),
|
|
26115
26208
|
'cost': cost,
|
|
26116
26209
|
'fee': {
|
|
26117
|
-
'cost': this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringAbs */ .O.stringAbs(this.
|
|
26210
|
+
'cost': this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringAbs */ .O.stringAbs(this.safeString2(trade, 'commission', 'n'))),
|
|
26118
26211
|
'currency': currencyCode,
|
|
26119
26212
|
'rate': undefined,
|
|
26120
26213
|
},
|
|
@@ -26768,8 +26861,9 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
26768
26861
|
'liquidationPrice': undefined,
|
|
26769
26862
|
'entryPrice': this.safeNumber2(position, 'avgPrice', 'entryPrice'),
|
|
26770
26863
|
'unrealizedPnl': this.safeNumber(position, 'unrealizedProfit'),
|
|
26864
|
+
'realizedPnl': this.safeNumber(position, 'realisedProfit'),
|
|
26771
26865
|
'percentage': undefined,
|
|
26772
|
-
'contracts':
|
|
26866
|
+
'contracts': this.safeNumber(position, 'positionAmt'),
|
|
26773
26867
|
'contractSize': undefined,
|
|
26774
26868
|
'markPrice': undefined,
|
|
26775
26869
|
'lastPrice': undefined,
|
|
@@ -26780,7 +26874,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
26780
26874
|
'lastUpdateTimestamp': undefined,
|
|
26781
26875
|
'maintenanceMargin': undefined,
|
|
26782
26876
|
'maintenanceMarginPercentage': undefined,
|
|
26783
|
-
'collateral': this.
|
|
26877
|
+
'collateral': this.safeNumber(position, 'positionAmt'),
|
|
26784
26878
|
'initialMargin': this.safeNumber(position, 'initialMargin'),
|
|
26785
26879
|
'initialMarginPercentage': undefined,
|
|
26786
26880
|
'leverage': this.safeNumber(position, 'leverage'),
|
|
@@ -26834,15 +26928,20 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
26834
26928
|
request['timeInForce'] = 'POC';
|
|
26835
26929
|
}
|
|
26836
26930
|
const createMarketBuyOrderRequiresPrice = this.safeValue(this.options, 'createMarketBuyOrderRequiresPrice', true);
|
|
26837
|
-
if (
|
|
26838
|
-
if (
|
|
26839
|
-
|
|
26931
|
+
if (isMarketOrder && (side === 'buy')) {
|
|
26932
|
+
if (createMarketBuyOrderRequiresPrice) {
|
|
26933
|
+
if (price === undefined) {
|
|
26934
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder(this.id + ' createOrder() requires price argument for market buy orders on spot markets to calculate the total amount to spend (amount * price), alternatively set the createMarketBuyOrderRequiresPrice option to false and pass in the cost to spend into the amount parameter');
|
|
26935
|
+
}
|
|
26936
|
+
else {
|
|
26937
|
+
const amountString = this.numberToString(amount);
|
|
26938
|
+
const priceString = this.numberToString(price);
|
|
26939
|
+
const cost = this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringMul */ .O.stringMul(amountString, priceString));
|
|
26940
|
+
request['quoteOrderQty'] = this.priceToPrecision(symbol, cost);
|
|
26941
|
+
}
|
|
26840
26942
|
}
|
|
26841
26943
|
else {
|
|
26842
|
-
|
|
26843
|
-
const priceString = this.numberToString(price);
|
|
26844
|
-
const cost = this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringMul */ .O.stringMul(amountString, priceString));
|
|
26845
|
-
request['quoteOrderQty'] = this.priceToPrecision(symbol, cost);
|
|
26944
|
+
request['quoteOrderQty'] = this.priceToPrecision(symbol, amount);
|
|
26846
26945
|
}
|
|
26847
26946
|
}
|
|
26848
26947
|
else {
|
|
@@ -26958,6 +27057,15 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
26958
27057
|
const order = this.safeValue(data, 'order', data);
|
|
26959
27058
|
return this.parseOrder(order, market);
|
|
26960
27059
|
}
|
|
27060
|
+
parseOrderSide(side) {
|
|
27061
|
+
const sides = {
|
|
27062
|
+
'BUY': 'buy',
|
|
27063
|
+
'SELL': 'sell',
|
|
27064
|
+
'SHORT': 'sell',
|
|
27065
|
+
'LONG': 'buy',
|
|
27066
|
+
};
|
|
27067
|
+
return this.safeString(sides, side, side);
|
|
27068
|
+
}
|
|
26961
27069
|
parseOrder(order, market = undefined) {
|
|
26962
27070
|
//
|
|
26963
27071
|
// spot
|
|
@@ -27055,39 +27163,49 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
27055
27163
|
// "workingType": "MARK_PRICE"
|
|
27056
27164
|
// }
|
|
27057
27165
|
//
|
|
27058
|
-
const positionSide = this.
|
|
27166
|
+
const positionSide = this.safeString2(order, 'positionSide', 'ps');
|
|
27059
27167
|
const marketType = (positionSide === undefined) ? 'spot' : 'swap';
|
|
27060
|
-
const marketId = this.
|
|
27168
|
+
const marketId = this.safeString2(order, 'symbol', 's');
|
|
27061
27169
|
const symbol = this.safeSymbol(marketId, market, '-', marketType);
|
|
27062
|
-
const
|
|
27170
|
+
const orderId = this.safeString2(order, 'orderId', 'i');
|
|
27171
|
+
const side = this.safeStringLower2(order, 'side', 'S');
|
|
27172
|
+
const type = this.safeStringLower2(order, 'type', 'o');
|
|
27173
|
+
const timestamp = this.safeIntegerN(order, ['time', 'transactTime', 'E']);
|
|
27174
|
+
const lastTradeTimestamp = this.safeInteger2(order, 'updateTime', 'T');
|
|
27175
|
+
const price = this.safeString2(order, 'price', 'p');
|
|
27176
|
+
const average = this.safeString2(order, 'avgPrice', 'ap');
|
|
27177
|
+
const amount = this.safeString2(order, 'origQty', 'q');
|
|
27178
|
+
const filled = this.safeString2(order, 'executedQty', 'z');
|
|
27179
|
+
const statusId = this.safeString2(order, 'status', 'X');
|
|
27063
27180
|
const fee = {
|
|
27064
|
-
'currency': this.
|
|
27065
|
-
'rate': this.
|
|
27181
|
+
'currency': this.safeString2(order, 'feeAsset', 'N'),
|
|
27182
|
+
'rate': this.safeStringN(order, ['fee', 'commission', 'n']),
|
|
27066
27183
|
};
|
|
27184
|
+
const clientOrderId = this.safeString2(order, 'clientOrderId', 'c');
|
|
27067
27185
|
return this.safeOrder({
|
|
27068
27186
|
'info': order,
|
|
27069
|
-
'id':
|
|
27070
|
-
'clientOrderId':
|
|
27187
|
+
'id': orderId,
|
|
27188
|
+
'clientOrderId': clientOrderId,
|
|
27071
27189
|
'timestamp': timestamp,
|
|
27072
27190
|
'datetime': this.iso8601(timestamp),
|
|
27073
|
-
'lastTradeTimestamp':
|
|
27191
|
+
'lastTradeTimestamp': lastTradeTimestamp,
|
|
27074
27192
|
'lastUpdateTimestamp': this.safeInteger(order, 'updateTime'),
|
|
27075
27193
|
'symbol': symbol,
|
|
27076
|
-
'type':
|
|
27194
|
+
'type': type,
|
|
27077
27195
|
'timeInForce': undefined,
|
|
27078
27196
|
'postOnly': undefined,
|
|
27079
|
-
'side': this.
|
|
27080
|
-
'price':
|
|
27197
|
+
'side': this.parseOrderSide(side),
|
|
27198
|
+
'price': price,
|
|
27081
27199
|
'stopPrice': this.safeNumber(order, 'stopPrice'),
|
|
27082
27200
|
'triggerPrice': this.safeNumber(order, 'stopPrice'),
|
|
27083
27201
|
'stopLossPrice': this.safeNumber(order, 'stopLoss'),
|
|
27084
27202
|
'takeProfitPrice': this.safeNumber(order, 'takeProfit'),
|
|
27085
|
-
'average':
|
|
27203
|
+
'average': average,
|
|
27086
27204
|
'cost': undefined,
|
|
27087
|
-
'amount':
|
|
27088
|
-
'filled':
|
|
27205
|
+
'amount': amount,
|
|
27206
|
+
'filled': filled,
|
|
27089
27207
|
'remaining': undefined,
|
|
27090
|
-
'status': this.parseOrderStatus(
|
|
27208
|
+
'status': this.parseOrderStatus(statusId),
|
|
27091
27209
|
'fee': fee,
|
|
27092
27210
|
'trades': undefined,
|
|
27093
27211
|
}, market);
|
|
@@ -30763,9 +30881,12 @@ class bitbns extends _abstract_bitbns_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
30763
30881
|
// note that "Money" stands for INR - the only fiat in bitbns
|
|
30764
30882
|
return this.parseBalance(response);
|
|
30765
30883
|
}
|
|
30766
|
-
|
|
30884
|
+
parseStatus(status) {
|
|
30767
30885
|
const statuses = {
|
|
30886
|
+
'-1': 'cancelled',
|
|
30768
30887
|
'0': 'open',
|
|
30888
|
+
'1': 'open',
|
|
30889
|
+
'2': 'done',
|
|
30769
30890
|
// 'PARTIALLY_FILLED': 'open',
|
|
30770
30891
|
// 'FILLED': 'closed',
|
|
30771
30892
|
// 'CANCELED': 'canceled',
|
|
@@ -30780,90 +30901,78 @@ class bitbns extends _abstract_bitbns_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
30780
30901
|
// createOrder
|
|
30781
30902
|
//
|
|
30782
30903
|
// {
|
|
30783
|
-
// "data":"Successfully placed bid to purchase currency",
|
|
30784
|
-
// "status":1,
|
|
30785
|
-
// "error":null,
|
|
30786
|
-
// "id":5424475,
|
|
30787
|
-
// "code":200
|
|
30904
|
+
// "data": "Successfully placed bid to purchase currency",
|
|
30905
|
+
// "status": 1,
|
|
30906
|
+
// "error": null,
|
|
30907
|
+
// "id": 5424475,
|
|
30908
|
+
// "code": 200
|
|
30788
30909
|
// }
|
|
30789
30910
|
//
|
|
30790
|
-
// fetchOrder
|
|
30911
|
+
// fetchOpenOrders, fetchOrder
|
|
30791
30912
|
//
|
|
30792
|
-
//
|
|
30793
|
-
//
|
|
30794
|
-
//
|
|
30795
|
-
//
|
|
30796
|
-
//
|
|
30797
|
-
//
|
|
30798
|
-
//
|
|
30799
|
-
//
|
|
30800
|
-
//
|
|
30801
|
-
//
|
|
30802
|
-
// "amount":0.01,
|
|
30803
|
-
// "remaining":0.01,
|
|
30804
|
-
// "filled":0,
|
|
30805
|
-
// "cost":null,
|
|
30806
|
-
// "fee":0.05
|
|
30807
|
-
// }
|
|
30913
|
+
// {
|
|
30914
|
+
// "entry_id": 5424475,
|
|
30915
|
+
// "btc": 0.01,
|
|
30916
|
+
// "rate": 2000,
|
|
30917
|
+
// "time": "2021-04-25T17:05:42.000Z",
|
|
30918
|
+
// "type": 0,
|
|
30919
|
+
// "status": 0
|
|
30920
|
+
// "t_rate": 0.45, // only stop orders
|
|
30921
|
+
// "trail": 0 // only stop orders
|
|
30922
|
+
// }
|
|
30808
30923
|
//
|
|
30809
|
-
//
|
|
30924
|
+
// cancelOrder
|
|
30810
30925
|
//
|
|
30811
|
-
//
|
|
30812
|
-
//
|
|
30813
|
-
//
|
|
30814
|
-
//
|
|
30815
|
-
//
|
|
30816
|
-
//
|
|
30817
|
-
// "status":0
|
|
30818
|
-
// }
|
|
30926
|
+
// {
|
|
30927
|
+
// "data": "Successfully cancelled the order",
|
|
30928
|
+
// "status": 1,
|
|
30929
|
+
// "error": null,
|
|
30930
|
+
// "code": 200
|
|
30931
|
+
// }
|
|
30819
30932
|
//
|
|
30820
30933
|
const id = this.safeString2(order, 'id', 'entry_id');
|
|
30821
|
-
const
|
|
30822
|
-
const
|
|
30823
|
-
|
|
30824
|
-
|
|
30825
|
-
|
|
30826
|
-
const filled = this.safeString(order, 'filled');
|
|
30827
|
-
const remaining = this.safeString(order, 'remaining');
|
|
30828
|
-
const average = this.safeString(order, 'avg_cost');
|
|
30829
|
-
const cost = this.safeString(order, 'cost');
|
|
30830
|
-
let type = this.safeStringLower(order, 'type');
|
|
30831
|
-
if (type === '0') {
|
|
30832
|
-
type = 'limit';
|
|
30934
|
+
const datetime = this.safeString(order, 'time');
|
|
30935
|
+
const triggerPrice = this.safeString(order, 't_rate');
|
|
30936
|
+
let side = this.safeString(order, 'type');
|
|
30937
|
+
if (side === '0') {
|
|
30938
|
+
side = 'buy';
|
|
30833
30939
|
}
|
|
30834
|
-
|
|
30835
|
-
|
|
30836
|
-
|
|
30837
|
-
|
|
30838
|
-
|
|
30839
|
-
|
|
30840
|
-
|
|
30841
|
-
|
|
30842
|
-
|
|
30843
|
-
|
|
30940
|
+
else if (side === '1') {
|
|
30941
|
+
side = 'sell';
|
|
30942
|
+
}
|
|
30943
|
+
const data = this.safeString(order, 'data');
|
|
30944
|
+
let status = this.safeString(order, 'status');
|
|
30945
|
+
if (data === 'Successfully cancelled the order') {
|
|
30946
|
+
status = 'cancelled';
|
|
30947
|
+
}
|
|
30948
|
+
else {
|
|
30949
|
+
status = this.parseStatus(status);
|
|
30844
30950
|
}
|
|
30845
30951
|
return this.safeOrder({
|
|
30846
30952
|
'info': order,
|
|
30847
30953
|
'id': id,
|
|
30848
30954
|
'clientOrderId': undefined,
|
|
30849
|
-
'timestamp':
|
|
30850
|
-
'datetime':
|
|
30955
|
+
'timestamp': this.parse8601(datetime),
|
|
30956
|
+
'datetime': datetime,
|
|
30851
30957
|
'lastTradeTimestamp': undefined,
|
|
30852
|
-
'symbol': symbol,
|
|
30853
|
-
'type': type,
|
|
30958
|
+
'symbol': this.safeString(market, 'symbol'),
|
|
30854
30959
|
'timeInForce': undefined,
|
|
30855
30960
|
'postOnly': undefined,
|
|
30856
30961
|
'side': side,
|
|
30857
|
-
'price':
|
|
30858
|
-
'stopPrice':
|
|
30859
|
-
'triggerPrice':
|
|
30860
|
-
'amount':
|
|
30861
|
-
'cost':
|
|
30862
|
-
'average':
|
|
30863
|
-
'filled':
|
|
30864
|
-
'remaining':
|
|
30962
|
+
'price': this.safeString(order, 'rate'),
|
|
30963
|
+
'stopPrice': triggerPrice,
|
|
30964
|
+
'triggerPrice': triggerPrice,
|
|
30965
|
+
'amount': this.safeString(order, 'btc'),
|
|
30966
|
+
'cost': undefined,
|
|
30967
|
+
'average': undefined,
|
|
30968
|
+
'filled': undefined,
|
|
30969
|
+
'remaining': undefined,
|
|
30865
30970
|
'status': status,
|
|
30866
|
-
'fee':
|
|
30971
|
+
'fee': {
|
|
30972
|
+
'cost': undefined,
|
|
30973
|
+
'currency': undefined,
|
|
30974
|
+
'rate': undefined,
|
|
30975
|
+
},
|
|
30867
30976
|
'trades': undefined,
|
|
30868
30977
|
}, market);
|
|
30869
30978
|
}
|
|
@@ -30872,19 +30981,27 @@ class bitbns extends _abstract_bitbns_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
30872
30981
|
* @method
|
|
30873
30982
|
* @name bitbns#createOrder
|
|
30874
30983
|
* @description create a trade order
|
|
30984
|
+
* @see https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-2/place-orders
|
|
30985
|
+
* @see https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-1/market-orders-quantity // market orders
|
|
30875
30986
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
30876
30987
|
* @param {string} type 'market' or 'limit'
|
|
30877
30988
|
* @param {string} side 'buy' or 'sell'
|
|
30878
30989
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
30879
30990
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
30880
30991
|
* @param {object} [params] extra parameters specific to the bitbns api endpoint
|
|
30992
|
+
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
30993
|
+
*
|
|
30994
|
+
* EXCHANGE SPECIFIC PARAMETERS
|
|
30995
|
+
* @param {float} [params.target_rate] *requires params.trail_rate when set, type must be 'limit'* a bracket order is placed when set
|
|
30996
|
+
* @param {float} [params.trail_rate] *requires params.target_rate when set, type must be 'limit'* a bracket order is placed when set
|
|
30881
30997
|
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
30882
30998
|
*/
|
|
30883
|
-
if (type !== 'limit' && type !== 'market') {
|
|
30884
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(this.id + ' allows limit and market orders only');
|
|
30885
|
-
}
|
|
30886
30999
|
await this.loadMarkets();
|
|
30887
31000
|
const market = this.market(symbol);
|
|
31001
|
+
const triggerPrice = this.safeStringN(params, ['triggerPrice', 'stopPrice', 't_rate']);
|
|
31002
|
+
const targetRate = this.safeString(params, 'target_rate');
|
|
31003
|
+
const trailRate = this.safeString(params, 'trail_rate');
|
|
31004
|
+
params = this.omit(params, ['triggerPrice', 'stopPrice', 'trail_rate', 'target_rate', 't_rate']);
|
|
30888
31005
|
const request = {
|
|
30889
31006
|
'side': side.toUpperCase(),
|
|
30890
31007
|
'symbol': market['uppercaseId'],
|
|
@@ -30892,20 +31009,23 @@ class bitbns extends _abstract_bitbns_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
30892
31009
|
// 'target_rate': this.priceToPrecision (symbol, targetRate),
|
|
30893
31010
|
// 't_rate': this.priceToPrecision (symbol, stopPrice),
|
|
30894
31011
|
// 'trail_rate': this.priceToPrecision (symbol, trailRate),
|
|
30895
|
-
// To Place Simple Buy or Sell Order use rate
|
|
30896
|
-
// To Place Stoploss Buy or Sell Order use rate & t_rate
|
|
30897
|
-
// To Place Bracket Buy or Sell Order use rate , t_rate, target_rate & trail_rate
|
|
30898
31012
|
};
|
|
30899
31013
|
let method = 'v2PostOrders';
|
|
30900
31014
|
if (type === 'limit') {
|
|
30901
31015
|
request['rate'] = this.priceToPrecision(symbol, price);
|
|
30902
31016
|
}
|
|
30903
|
-
else
|
|
31017
|
+
else {
|
|
30904
31018
|
method = 'v1PostPlaceMarketOrderQntySymbol';
|
|
30905
31019
|
request['market'] = market['quoteId'];
|
|
30906
31020
|
}
|
|
30907
|
-
|
|
30908
|
-
|
|
31021
|
+
if (triggerPrice !== undefined) {
|
|
31022
|
+
request['t_rate'] = this.priceToPrecision(symbol, triggerPrice);
|
|
31023
|
+
}
|
|
31024
|
+
if (targetRate !== undefined) {
|
|
31025
|
+
request['target_rate'] = this.priceToPrecision(symbol, targetRate);
|
|
31026
|
+
}
|
|
31027
|
+
if (trailRate !== undefined) {
|
|
31028
|
+
request['trail_rate'] = this.priceToPrecision(symbol, trailRate);
|
|
30909
31029
|
}
|
|
30910
31030
|
const response = await this[method](this.extend(request, params));
|
|
30911
31031
|
//
|
|
@@ -30924,9 +31044,12 @@ class bitbns extends _abstract_bitbns_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
30924
31044
|
* @method
|
|
30925
31045
|
* @name bitbns#cancelOrder
|
|
30926
31046
|
* @description cancels an open order
|
|
31047
|
+
* @see https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-2/cancel-orders
|
|
31048
|
+
* @see https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-1/cancel-stop-loss-orders
|
|
30927
31049
|
* @param {string} id order id
|
|
30928
31050
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
30929
31051
|
* @param {object} [params] extra parameters specific to the bitbns api endpoint
|
|
31052
|
+
* @param {boolean} [params.trigger] true if cancelling a trigger order
|
|
30930
31053
|
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
30931
31054
|
*/
|
|
30932
31055
|
if (symbol === undefined) {
|
|
@@ -30934,13 +31057,18 @@ class bitbns extends _abstract_bitbns_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
30934
31057
|
}
|
|
30935
31058
|
await this.loadMarkets();
|
|
30936
31059
|
const market = this.market(symbol);
|
|
30937
|
-
const
|
|
31060
|
+
const isTrigger = this.safeValue2(params, 'trigger', 'stop');
|
|
31061
|
+
params = this.omit(params, ['trigger', 'stop']);
|
|
30938
31062
|
const request = {
|
|
30939
31063
|
'entry_id': id,
|
|
30940
31064
|
'symbol': market['uppercaseId'],
|
|
30941
|
-
'side': quoteSide,
|
|
30942
31065
|
};
|
|
30943
|
-
|
|
31066
|
+
let response = undefined;
|
|
31067
|
+
const tail = isTrigger ? 'StopLossOrder' : 'Order';
|
|
31068
|
+
let quoteSide = (market['quoteId'] === 'USDT') ? 'usdtcancel' : 'cancel';
|
|
31069
|
+
quoteSide += tail;
|
|
31070
|
+
request['side'] = quoteSide;
|
|
31071
|
+
response = await this.v2PostCancel(this.extend(request, params));
|
|
30944
31072
|
return this.parseOrder(response, market);
|
|
30945
31073
|
}
|
|
30946
31074
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
@@ -30948,6 +31076,8 @@ class bitbns extends _abstract_bitbns_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
30948
31076
|
* @method
|
|
30949
31077
|
* @name bitbns#fetchOrder
|
|
30950
31078
|
* @description fetches information on an order made by the user
|
|
31079
|
+
* @see https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-1/order-status
|
|
31080
|
+
* @param {string} id order id
|
|
30951
31081
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
30952
31082
|
* @param {object} [params] extra parameters specific to the bitbns api endpoint
|
|
30953
31083
|
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
@@ -30961,6 +31091,10 @@ class bitbns extends _abstract_bitbns_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
30961
31091
|
'symbol': market['id'],
|
|
30962
31092
|
'entry_id': id,
|
|
30963
31093
|
};
|
|
31094
|
+
const trigger = this.safeValue2(params, 'trigger', 'stop');
|
|
31095
|
+
if (trigger) {
|
|
31096
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' fetchOrder cannot fetch stop orders');
|
|
31097
|
+
}
|
|
30964
31098
|
const response = await this.v1PostOrderStatusSymbol(this.extend(request, params));
|
|
30965
31099
|
//
|
|
30966
31100
|
// {
|
|
@@ -30996,10 +31130,13 @@ class bitbns extends _abstract_bitbns_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
30996
31130
|
* @method
|
|
30997
31131
|
* @name bitbns#fetchOpenOrders
|
|
30998
31132
|
* @description fetch all unfilled currently open orders
|
|
31133
|
+
* @see https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-2/order-status-limit
|
|
31134
|
+
* @see https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-2/order-status-limit/order-status-stop-limit
|
|
30999
31135
|
* @param {string} symbol unified market symbol
|
|
31000
31136
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
31001
|
-
* @param {int} [limit] the maximum number of
|
|
31137
|
+
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
31002
31138
|
* @param {object} [params] extra parameters specific to the bitbns api endpoint
|
|
31139
|
+
* @param {boolean} [params.trigger] true if fetching trigger orders
|
|
31003
31140
|
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
31004
31141
|
*/
|
|
31005
31142
|
if (symbol === undefined) {
|
|
@@ -31007,11 +31144,13 @@ class bitbns extends _abstract_bitbns_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
31007
31144
|
}
|
|
31008
31145
|
await this.loadMarkets();
|
|
31009
31146
|
const market = this.market(symbol);
|
|
31010
|
-
const
|
|
31147
|
+
const isTrigger = this.safeValue2(params, 'trigger', 'stop');
|
|
31148
|
+
params = this.omit(params, ['trigger', 'stop']);
|
|
31149
|
+
const quoteSide = (market['quoteId'] === 'USDT') ? 'usdtListOpen' : 'listOpen';
|
|
31011
31150
|
const request = {
|
|
31012
31151
|
'symbol': market['uppercaseId'],
|
|
31013
|
-
'side': quoteSide,
|
|
31014
31152
|
'page': 0,
|
|
31153
|
+
'side': isTrigger ? (quoteSide + 'StopOrders') : (quoteSide + 'Orders'),
|
|
31015
31154
|
};
|
|
31016
31155
|
const response = await this.v2PostGetordersnew(this.extend(request, params));
|
|
31017
31156
|
//
|
|
@@ -31024,6 +31163,9 @@ class bitbns extends _abstract_bitbns_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
31024
31163
|
// "time":"2021-04-25T17:05:42.000Z",
|
|
31025
31164
|
// "type":0,
|
|
31026
31165
|
// "status":0
|
|
31166
|
+
// "t_rate":0.45, // only stop orders
|
|
31167
|
+
// "type":1, // only stop orders
|
|
31168
|
+
// "trail":0 // only stop orders
|
|
31027
31169
|
// }
|
|
31028
31170
|
// ],
|
|
31029
31171
|
// "status":1,
|
|
@@ -31446,7 +31588,7 @@ class bitbns extends _abstract_bitbns_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
31446
31588
|
'body': body,
|
|
31447
31589
|
};
|
|
31448
31590
|
const payload = this.stringToBase64(this.json(auth));
|
|
31449
|
-
const signature = this.hmac(payload, this.encode(this.secret), _static_dependencies_noble_hashes_sha512_js__WEBPACK_IMPORTED_MODULE_4__/* .sha512 */ .o);
|
|
31591
|
+
const signature = this.hmac(this.encode(payload), this.encode(this.secret), _static_dependencies_noble_hashes_sha512_js__WEBPACK_IMPORTED_MODULE_4__/* .sha512 */ .o);
|
|
31450
31592
|
headers['X-BITBNS-PAYLOAD'] = payload;
|
|
31451
31593
|
headers['X-BITBNS-SIGNATURE'] = signature;
|
|
31452
31594
|
headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
@@ -39721,8 +39863,26 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
39721
39863
|
// "data": "888291686266343424"
|
|
39722
39864
|
// }
|
|
39723
39865
|
//
|
|
39866
|
+
// {
|
|
39867
|
+
// "code":"00000",
|
|
39868
|
+
// "msg":"success",
|
|
39869
|
+
// "requestTime":1696784219602,
|
|
39870
|
+
// "data":{
|
|
39871
|
+
// "orderId":"1094957867615789056",
|
|
39872
|
+
// "clientOrderId":"64f1e4ce842041d296b4517df1b5c2d7"
|
|
39873
|
+
// }
|
|
39874
|
+
// }
|
|
39875
|
+
//
|
|
39876
|
+
const data = this.safeValue(response, 'data');
|
|
39877
|
+
let id = undefined;
|
|
39878
|
+
if (typeof data === 'string') {
|
|
39879
|
+
id = data;
|
|
39880
|
+
}
|
|
39881
|
+
else if (data !== undefined) {
|
|
39882
|
+
id = this.safeString(data, 'orderId');
|
|
39883
|
+
}
|
|
39724
39884
|
const result = {
|
|
39725
|
-
'id':
|
|
39885
|
+
'id': id,
|
|
39726
39886
|
'info': response,
|
|
39727
39887
|
'txid': undefined,
|
|
39728
39888
|
'timestamp': undefined,
|
|
@@ -41375,7 +41535,6 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
41375
41535
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#cancel-all-trigger-order-tpsl
|
|
41376
41536
|
* @param {string} symbol unified market symbol
|
|
41377
41537
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
41378
|
-
* @param {string} [params.code] marginCoin unified currency code
|
|
41379
41538
|
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
41380
41539
|
*/
|
|
41381
41540
|
const sandboxMode = this.safeValue(this.options, 'sandboxMode', false);
|
|
@@ -41390,33 +41549,28 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
41390
41549
|
if (sandboxMode) {
|
|
41391
41550
|
productType = 'S' + productType;
|
|
41392
41551
|
}
|
|
41393
|
-
|
|
41552
|
+
let marketType = undefined;
|
|
41553
|
+
[marketType, params] = this.handleMarketTypeAndParams('cancelAllOrders', market, params);
|
|
41394
41554
|
if (marketType === 'spot') {
|
|
41395
41555
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NotSupported(this.id + ' cancelAllOrders () does not support spot markets');
|
|
41396
41556
|
}
|
|
41397
41557
|
const request = {
|
|
41398
41558
|
'productType': productType,
|
|
41559
|
+
'marginCoin': market['settleId'],
|
|
41399
41560
|
};
|
|
41400
|
-
|
|
41401
|
-
const
|
|
41402
|
-
|
|
41561
|
+
const stop = this.safeValue2(params, 'stop', 'trigger');
|
|
41562
|
+
const planType = this.safeString(params, 'planType');
|
|
41563
|
+
params = this.omit(params, ['stop', 'trigger']);
|
|
41564
|
+
let response = undefined;
|
|
41403
41565
|
if (stop !== undefined || planType !== undefined) {
|
|
41404
41566
|
if (planType === undefined) {
|
|
41405
41567
|
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, loss_plan, pos_profit, pos_loss, moving_plan or track_plan');
|
|
41406
41568
|
}
|
|
41407
|
-
|
|
41569
|
+
response = await this.privateMixPostPlanCancelAllPlan(this.extend(request, params));
|
|
41408
41570
|
}
|
|
41409
41571
|
else {
|
|
41410
|
-
|
|
41411
|
-
if (code === undefined) {
|
|
41412
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + ' cancelAllOrders () requires a code argument [marginCoin] in the params');
|
|
41413
|
-
}
|
|
41414
|
-
const currency = this.currency(code);
|
|
41415
|
-
request['marginCoin'] = this.safeCurrencyCode(code, currency);
|
|
41416
|
-
method = 'privateMixPostOrderCancelAllOrders';
|
|
41572
|
+
response = await this.privateMixPostOrderCancelAllOrders(this.extend(request, params));
|
|
41417
41573
|
}
|
|
41418
|
-
const ommitted = this.omit(query, ['stop', 'code', 'marginCoin']);
|
|
41419
|
-
const response = await this[method](this.extend(request, ommitted));
|
|
41420
41574
|
//
|
|
41421
41575
|
// {
|
|
41422
41576
|
// "code": "00000",
|
|
@@ -42505,15 +42659,20 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
42505
42659
|
* @name bitget#fetchFundingRateHistory
|
|
42506
42660
|
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-history-funding-rate
|
|
42507
42661
|
* @description fetches historical funding rate prices
|
|
42508
|
-
* @see https://bitgetlimited.github.io/apidoc/en/mix/#get-history-funding-rate
|
|
42509
42662
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
42510
42663
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
42511
42664
|
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
|
|
42512
42665
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
42666
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
42513
42667
|
* @returns {object[]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
|
|
42514
42668
|
*/
|
|
42515
42669
|
this.checkRequiredSymbol('fetchFundingRateHistory', symbol);
|
|
42516
42670
|
await this.loadMarkets();
|
|
42671
|
+
let paginate = false;
|
|
42672
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchFundingRateHistory', 'paginate');
|
|
42673
|
+
if (paginate) {
|
|
42674
|
+
return await this.fetchPaginatedCallIncremental('fetchFundingRateHistory', symbol, since, limit, params, 'pageNo', 50);
|
|
42675
|
+
}
|
|
42517
42676
|
const market = this.market(symbol);
|
|
42518
42677
|
const request = {
|
|
42519
42678
|
'symbol': market['id'],
|
|
@@ -42524,6 +42683,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
42524
42683
|
if (limit !== undefined) {
|
|
42525
42684
|
request['pageSize'] = limit;
|
|
42526
42685
|
}
|
|
42686
|
+
request['nextPage'] = true;
|
|
42527
42687
|
const response = await this.publicMixGetMarketHistoryFundRate(this.extend(request, params));
|
|
42528
42688
|
//
|
|
42529
42689
|
// {
|
|
@@ -67527,6 +67687,7 @@ class btcalpha extends _abstract_btcalpha_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
67527
67687
|
/**
|
|
67528
67688
|
* @method
|
|
67529
67689
|
* @name btcalpha#fetchOrderBook
|
|
67690
|
+
* @see https://btc-alpha.github.io/api-docs/#get-orderbook
|
|
67530
67691
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
67531
67692
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
67532
67693
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
@@ -67907,15 +68068,19 @@ class btcalpha extends _abstract_btcalpha_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
67907
68068
|
/**
|
|
67908
68069
|
* @method
|
|
67909
68070
|
* @name btcalpha#createOrder
|
|
68071
|
+
* @see https://btc-alpha.github.io/api-docs/#create-order
|
|
67910
68072
|
* @description create a trade order
|
|
67911
68073
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
67912
|
-
* @param {string} type '
|
|
68074
|
+
* @param {string} type 'limit'
|
|
67913
68075
|
* @param {string} side 'buy' or 'sell'
|
|
67914
68076
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
67915
68077
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
67916
68078
|
* @param {object} [params] extra parameters specific to the btcalpha api endpoint
|
|
67917
68079
|
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
67918
68080
|
*/
|
|
68081
|
+
if (type === 'market') {
|
|
68082
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder(this.id + ' only limits orders are supported');
|
|
68083
|
+
}
|
|
67919
68084
|
await this.loadMarkets();
|
|
67920
68085
|
const market = this.market(symbol);
|
|
67921
68086
|
const request = {
|
|
@@ -67939,6 +68104,7 @@ class btcalpha extends _abstract_btcalpha_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
67939
68104
|
/**
|
|
67940
68105
|
* @method
|
|
67941
68106
|
* @name btcalpha#cancelOrder
|
|
68107
|
+
* @see https://btc-alpha.github.io/api-docs/#cancel-order
|
|
67942
68108
|
* @description cancels an open order
|
|
67943
68109
|
* @param {string} id order id
|
|
67944
68110
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
@@ -67955,6 +68121,7 @@ class btcalpha extends _abstract_btcalpha_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
67955
68121
|
/**
|
|
67956
68122
|
* @method
|
|
67957
68123
|
* @name btcalpha#fetchOrder
|
|
68124
|
+
* @see https://btc-alpha.github.io/api-docs/#retrieve-single-order
|
|
67958
68125
|
* @description fetches information on an order made by the user
|
|
67959
68126
|
* @param {string} symbol not used by btcalpha fetchOrder
|
|
67960
68127
|
* @param {object} [params] extra parameters specific to the btcalpha api endpoint
|
|
@@ -67971,6 +68138,7 @@ class btcalpha extends _abstract_btcalpha_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
67971
68138
|
/**
|
|
67972
68139
|
* @method
|
|
67973
68140
|
* @name btcalpha#fetchOrders
|
|
68141
|
+
* @see https://btc-alpha.github.io/api-docs/#list-own-orders
|
|
67974
68142
|
* @description fetches information on multiple orders made by the user
|
|
67975
68143
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
67976
68144
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
@@ -69001,13 +69169,13 @@ class btcmarkets extends _abstract_btcmarkets_js__WEBPACK_IMPORTED_MODULE_0__/*
|
|
|
69001
69169
|
const tagTo = tag;
|
|
69002
69170
|
const addressFrom = undefined;
|
|
69003
69171
|
const tagFrom = undefined;
|
|
69004
|
-
const fee = this.
|
|
69172
|
+
const fee = this.safeString(transaction, 'fee');
|
|
69005
69173
|
const status = this.parseTransactionStatus(this.safeString(transaction, 'status'));
|
|
69006
69174
|
const currencyId = this.safeString(transaction, 'assetName');
|
|
69007
69175
|
const code = this.safeCurrencyCode(currencyId);
|
|
69008
|
-
let amount = this.
|
|
69176
|
+
let amount = this.safeString(transaction, 'amount');
|
|
69009
69177
|
if (fee) {
|
|
69010
|
-
amount
|
|
69178
|
+
amount = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringSub */ .O.stringSub(amount, fee);
|
|
69011
69179
|
}
|
|
69012
69180
|
return {
|
|
69013
69181
|
'id': this.safeString(transaction, 'id'),
|
|
@@ -69022,14 +69190,14 @@ class btcmarkets extends _abstract_btcmarkets_js__WEBPACK_IMPORTED_MODULE_0__/*
|
|
|
69022
69190
|
'tagTo': tagTo,
|
|
69023
69191
|
'tagFrom': tagFrom,
|
|
69024
69192
|
'type': type,
|
|
69025
|
-
'amount': amount,
|
|
69193
|
+
'amount': this.parseNumber(amount),
|
|
69026
69194
|
'currency': code,
|
|
69027
69195
|
'status': status,
|
|
69028
69196
|
'updated': lastUpdate,
|
|
69029
69197
|
'comment': undefined,
|
|
69030
69198
|
'fee': {
|
|
69031
69199
|
'currency': code,
|
|
69032
|
-
'cost': fee,
|
|
69200
|
+
'cost': this.parseNumber(fee),
|
|
69033
69201
|
'rate': undefined,
|
|
69034
69202
|
},
|
|
69035
69203
|
'info': transaction,
|
|
@@ -90264,23 +90432,34 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
90264
90432
|
};
|
|
90265
90433
|
return this.safeString(statuses, status, status);
|
|
90266
90434
|
}
|
|
90267
|
-
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit =
|
|
90435
|
+
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
90268
90436
|
/**
|
|
90269
90437
|
* @method
|
|
90270
90438
|
* @name coinex#fetchFundingRateHistory
|
|
90439
|
+
* @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http038_funding_history
|
|
90271
90440
|
* @description fetches historical funding rate prices
|
|
90272
90441
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
90273
90442
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
90274
90443
|
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
|
|
90275
90444
|
* @param {object} [params] extra parameters specific to the coinex api endpoint
|
|
90445
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
90446
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
90276
90447
|
* @returns {object[]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
|
|
90277
90448
|
*/
|
|
90278
90449
|
if (symbol === undefined) {
|
|
90279
90450
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
90280
90451
|
}
|
|
90281
90452
|
await this.loadMarkets();
|
|
90453
|
+
let paginate = false;
|
|
90454
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchFundingRateHistory', 'paginate');
|
|
90455
|
+
if (paginate) {
|
|
90456
|
+
return await this.fetchPaginatedCallDeterministic('fetchFundingRateHistory', symbol, since, limit, '8h', params, 1000);
|
|
90457
|
+
}
|
|
90458
|
+
if (limit === undefined) {
|
|
90459
|
+
limit = 100;
|
|
90460
|
+
}
|
|
90282
90461
|
const market = this.market(symbol);
|
|
90283
|
-
|
|
90462
|
+
let request = {
|
|
90284
90463
|
'market': market['id'],
|
|
90285
90464
|
'limit': limit,
|
|
90286
90465
|
'offset': 0,
|
|
@@ -90289,6 +90468,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
90289
90468
|
if (since !== undefined) {
|
|
90290
90469
|
request['start_time'] = since;
|
|
90291
90470
|
}
|
|
90471
|
+
[request, params] = this.handleUntilOption('end_time', request, params);
|
|
90292
90472
|
const response = await this.perpetualPublicGetMarketFundingHistory(this.extend(request, params));
|
|
90293
90473
|
//
|
|
90294
90474
|
// {
|
|
@@ -107628,10 +107808,16 @@ class deribit extends _abstract_deribit_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
107628
107808
|
* @param {string} symbol unified market symbol
|
|
107629
107809
|
* @param {object} [params] extra parameters specific to the deribit api endpoint
|
|
107630
107810
|
* @param {int} [params.end_timestamp] fetch funding rate ending at this timestamp
|
|
107811
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
107631
107812
|
* @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
|
|
107632
107813
|
*/
|
|
107633
107814
|
await this.loadMarkets();
|
|
107634
107815
|
const market = this.market(symbol);
|
|
107816
|
+
let paginate = false;
|
|
107817
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchFundingRateHistory', 'paginate');
|
|
107818
|
+
if (paginate) {
|
|
107819
|
+
return await this.fetchPaginatedCallDeterministic('fetchFundingRateHistory', symbol, since, limit, '8h', params, 720);
|
|
107820
|
+
}
|
|
107635
107821
|
const time = this.milliseconds();
|
|
107636
107822
|
const month = 30 * 24 * 60 * 60 * 1000;
|
|
107637
107823
|
if (since === undefined) {
|
|
@@ -117938,6 +118124,13 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
117938
118124
|
// "memo": null
|
|
117939
118125
|
// }
|
|
117940
118126
|
//
|
|
118127
|
+
// {
|
|
118128
|
+
// "currency":"usdt",
|
|
118129
|
+
// "address":"0x01b0A9b7b4CdE774AF0f3E47CB4f1c2CCdBa0806",
|
|
118130
|
+
// "amount":"1880",
|
|
118131
|
+
// "chain":"eth"
|
|
118132
|
+
// }
|
|
118133
|
+
//
|
|
117941
118134
|
const id = this.safeString(transaction, 'id');
|
|
117942
118135
|
let type = undefined;
|
|
117943
118136
|
let amountString = this.safeString(transaction, 'amount');
|
|
@@ -117955,6 +118148,7 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
117955
118148
|
if (type === 'withdrawal') {
|
|
117956
118149
|
amountString = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringSub */ .O.stringSub(amountString, feeCostString);
|
|
117957
118150
|
}
|
|
118151
|
+
const networkId = this.safeStringUpper(transaction, 'chain');
|
|
117958
118152
|
const currencyId = this.safeString(transaction, 'currency');
|
|
117959
118153
|
const code = this.safeCurrencyCode(currencyId);
|
|
117960
118154
|
const txid = this.safeString(transaction, 'txid');
|
|
@@ -117969,7 +118163,7 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
117969
118163
|
'txid': txid,
|
|
117970
118164
|
'currency': code,
|
|
117971
118165
|
'amount': this.parseNumber(amountString),
|
|
117972
|
-
'network':
|
|
118166
|
+
'network': this.networkIdToCode(networkId),
|
|
117973
118167
|
'address': address,
|
|
117974
118168
|
'addressTo': undefined,
|
|
117975
118169
|
'addressFrom': undefined,
|
|
@@ -124108,19 +124302,28 @@ class hitbtc extends _abstract_hitbtc_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
124108
124302
|
* @method
|
|
124109
124303
|
* @name hitbtc#fetchOHLCV
|
|
124110
124304
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
124305
|
+
* @see https://api.hitbtc.com/#candles
|
|
124111
124306
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
124112
124307
|
* @param {string} timeframe the length of time each candle represents
|
|
124113
124308
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
124114
124309
|
* @param {int} [limit] the maximum amount of candles to fetch
|
|
124115
124310
|
* @param {object} [params] extra parameters specific to the hitbtc api endpoint
|
|
124311
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
124312
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
124116
124313
|
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
124117
124314
|
*/
|
|
124118
124315
|
await this.loadMarkets();
|
|
124316
|
+
let paginate = false;
|
|
124317
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchOHLCV', 'paginate');
|
|
124318
|
+
if (paginate) {
|
|
124319
|
+
return await this.fetchPaginatedCallDeterministic('fetchOHLCV', symbol, since, limit, timeframe, params, 1000);
|
|
124320
|
+
}
|
|
124119
124321
|
const market = this.market(symbol);
|
|
124120
|
-
|
|
124322
|
+
let request = {
|
|
124121
124323
|
'symbols': market['id'],
|
|
124122
124324
|
'period': this.safeString(this.timeframes, timeframe, timeframe),
|
|
124123
124325
|
};
|
|
124326
|
+
[request, params] = this.handleUntilOption('till', request, params);
|
|
124124
124327
|
if (since !== undefined) {
|
|
124125
124328
|
request['from'] = this.iso8601(since);
|
|
124126
124329
|
}
|
|
@@ -124915,16 +125118,24 @@ class hitbtc extends _abstract_hitbtc_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
124915
125118
|
/**
|
|
124916
125119
|
* @method
|
|
124917
125120
|
* @name hitbtc#fetchFundingRateHistory
|
|
125121
|
+
* @see https://api.hitbtc.com/#funding-history
|
|
124918
125122
|
* @description fetches historical funding rate prices
|
|
124919
125123
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
124920
125124
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
124921
125125
|
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
|
|
124922
125126
|
* @param {object} [params] extra parameters specific to the hitbtc api endpoint
|
|
125127
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
125128
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
124923
125129
|
* @returns {object[]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
|
|
124924
125130
|
*/
|
|
124925
125131
|
await this.loadMarkets();
|
|
125132
|
+
let paginate = false;
|
|
125133
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchFundingRateHistory', 'paginate');
|
|
125134
|
+
if (paginate) {
|
|
125135
|
+
return await this.fetchPaginatedCallDeterministic('fetchFundingRateHistory', symbol, since, limit, '8h', params, 1000);
|
|
125136
|
+
}
|
|
124926
125137
|
let market = undefined;
|
|
124927
|
-
|
|
125138
|
+
let request = {
|
|
124928
125139
|
// all arguments are optional
|
|
124929
125140
|
// 'symbols': Comma separated list of symbol codes,
|
|
124930
125141
|
// 'sort': 'DESC' or 'ASC'
|
|
@@ -124933,6 +125144,7 @@ class hitbtc extends _abstract_hitbtc_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
124933
125144
|
// 'limit': 100,
|
|
124934
125145
|
// 'offset': 0,
|
|
124935
125146
|
};
|
|
125147
|
+
[request, params] = this.handleUntilOption('till', request, params);
|
|
124936
125148
|
if (symbol !== undefined) {
|
|
124937
125149
|
market = this.market(symbol);
|
|
124938
125150
|
symbol = market['symbol'];
|
|
@@ -152788,12 +153000,12 @@ class kucoinfutures extends _abstract_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_
|
|
|
152788
153000
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
152789
153001
|
/**
|
|
152790
153002
|
* @method
|
|
152791
|
-
* @name
|
|
153003
|
+
* @name kucoinfutures#fetchFundingRateHistory
|
|
152792
153004
|
* @description fetches historical funding rate prices
|
|
152793
153005
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
152794
153006
|
* @param {int} [since] not used by kucuoinfutures
|
|
152795
153007
|
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
|
|
152796
|
-
* @param {object} [params] extra parameters specific to the
|
|
153008
|
+
* @param {object} [params] extra parameters specific to the kucoinfutures api endpoint
|
|
152797
153009
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
152798
153010
|
* @returns {object[]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
|
|
152799
153011
|
*/
|
|
@@ -188641,6 +188853,19 @@ class phemex extends _abstract_phemex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
188641
188853
|
return this.safeString(statuses, status, status);
|
|
188642
188854
|
}
|
|
188643
188855
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
188856
|
+
/**
|
|
188857
|
+
* @method
|
|
188858
|
+
* @name phemex#fetchFundingRateHistory
|
|
188859
|
+
* @description fetches historical funding rate prices
|
|
188860
|
+
* @see https://phemex-docs.github.io/#query-funding-rate-history-2
|
|
188861
|
+
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
188862
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
188863
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
|
|
188864
|
+
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
188865
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
188866
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
188867
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
|
|
188868
|
+
*/
|
|
188644
188869
|
this.checkRequiredSymbol('fetchFundingRateHistory', symbol);
|
|
188645
188870
|
await this.loadMarkets();
|
|
188646
188871
|
const market = this.market(symbol);
|
|
@@ -188648,6 +188873,11 @@ class phemex extends _abstract_phemex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
188648
188873
|
if (!market['swap']) {
|
|
188649
188874
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' fetchFundingRateHistory() supports swap contracts only');
|
|
188650
188875
|
}
|
|
188876
|
+
let paginate = false;
|
|
188877
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchFundingRateHistory', 'paginate');
|
|
188878
|
+
if (paginate) {
|
|
188879
|
+
return await this.fetchPaginatedCallDeterministic('fetchFundingRateHistory', symbol, since, limit, '8h', params, 100);
|
|
188880
|
+
}
|
|
188651
188881
|
let customSymbol = undefined;
|
|
188652
188882
|
if (isUsdtSettled) {
|
|
188653
188883
|
customSymbol = '.' + market['id'] + 'FR8H'; // phemex requires a custom symbol for funding rate history
|
|
@@ -188655,7 +188885,7 @@ class phemex extends _abstract_phemex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
188655
188885
|
else {
|
|
188656
188886
|
customSymbol = '.' + market['baseId'] + 'FR8H';
|
|
188657
188887
|
}
|
|
188658
|
-
|
|
188888
|
+
let request = {
|
|
188659
188889
|
'symbol': customSymbol,
|
|
188660
188890
|
};
|
|
188661
188891
|
if (since !== undefined) {
|
|
@@ -188664,6 +188894,7 @@ class phemex extends _abstract_phemex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
188664
188894
|
if (limit !== undefined) {
|
|
188665
188895
|
request['limit'] = limit;
|
|
188666
188896
|
}
|
|
188897
|
+
[request, params] = this.handleUntilOption('end', request, params);
|
|
188667
188898
|
let response = undefined;
|
|
188668
188899
|
if (isUsdtSettled) {
|
|
188669
188900
|
response = await this.v2GetApiDataPublicDataFundingRateHistory(this.extend(request, params));
|
|
@@ -197327,6 +197558,905 @@ class binanceusdm extends _binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
197327
197558
|
}
|
|
197328
197559
|
|
|
197329
197560
|
|
|
197561
|
+
/***/ }),
|
|
197562
|
+
|
|
197563
|
+
/***/ 6955:
|
|
197564
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
197565
|
+
|
|
197566
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
197567
|
+
/* harmony export */ "Z": () => (/* binding */ bingx)
|
|
197568
|
+
/* harmony export */ });
|
|
197569
|
+
/* harmony import */ var _bingx_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7960);
|
|
197570
|
+
/* harmony import */ var _base_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6689);
|
|
197571
|
+
/* harmony import */ var _base_ws_Cache_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3020);
|
|
197572
|
+
// ---------------------------------------------------------------------------
|
|
197573
|
+
|
|
197574
|
+
|
|
197575
|
+
|
|
197576
|
+
// ---------------------------------------------------------------------------
|
|
197577
|
+
class bingx extends _bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
197578
|
+
describe() {
|
|
197579
|
+
return this.deepExtend(super.describe(), {
|
|
197580
|
+
'has': {
|
|
197581
|
+
'ws': true,
|
|
197582
|
+
'watchTrades': true,
|
|
197583
|
+
'watchOrderBook': true,
|
|
197584
|
+
'watchOHLCV': true,
|
|
197585
|
+
'watchOrders': true,
|
|
197586
|
+
'watchMyTrades': true,
|
|
197587
|
+
'watchTicker': false,
|
|
197588
|
+
'watchTickers': false,
|
|
197589
|
+
'watchBalance': true,
|
|
197590
|
+
},
|
|
197591
|
+
'urls': {
|
|
197592
|
+
'api': {
|
|
197593
|
+
'ws': {
|
|
197594
|
+
'spot': 'wss://open-api-ws.bingx.com/market',
|
|
197595
|
+
'swap': 'wss://open-api-swap.bingx.com/swap-market',
|
|
197596
|
+
},
|
|
197597
|
+
},
|
|
197598
|
+
},
|
|
197599
|
+
'options': {
|
|
197600
|
+
'ws': {
|
|
197601
|
+
'gunzip': true,
|
|
197602
|
+
},
|
|
197603
|
+
'swap': {
|
|
197604
|
+
'timeframes': {
|
|
197605
|
+
'1m': '1m',
|
|
197606
|
+
'3m': '3m',
|
|
197607
|
+
'5m': '5m',
|
|
197608
|
+
'15m': '15m',
|
|
197609
|
+
'30m': '30m',
|
|
197610
|
+
'1h': '1h',
|
|
197611
|
+
'2h': '2h',
|
|
197612
|
+
'4h': '4h',
|
|
197613
|
+
'6h': '6h',
|
|
197614
|
+
'12h': '12h',
|
|
197615
|
+
'1d': '1d',
|
|
197616
|
+
'3d': '3d',
|
|
197617
|
+
'1w': '1w',
|
|
197618
|
+
'1M': '1M',
|
|
197619
|
+
},
|
|
197620
|
+
},
|
|
197621
|
+
'spot': {
|
|
197622
|
+
'timeframes': {
|
|
197623
|
+
'1m': '1min',
|
|
197624
|
+
'5m': '5min',
|
|
197625
|
+
'15m': '15min',
|
|
197626
|
+
'30m': '30min',
|
|
197627
|
+
'1h': '60min',
|
|
197628
|
+
'1d': '1day',
|
|
197629
|
+
},
|
|
197630
|
+
},
|
|
197631
|
+
},
|
|
197632
|
+
'streaming': {
|
|
197633
|
+
'keepAlive': 1800000, // 30 minutes
|
|
197634
|
+
},
|
|
197635
|
+
});
|
|
197636
|
+
}
|
|
197637
|
+
async watchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
197638
|
+
/**
|
|
197639
|
+
* @method
|
|
197640
|
+
* @name bingx#watchTrades
|
|
197641
|
+
* @description watches information on multiple trades made in a market
|
|
197642
|
+
* @see https://bingx-api.github.io/docs/#/spot/socket/market.html#Subscribe%20to%20tick-by-tick
|
|
197643
|
+
* @see https://bingx-api.github.io/docs/#/swapV2/socket/market.html#Subscribe%20the%20Latest%20Trade%20Detail
|
|
197644
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
197645
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
197646
|
+
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
197647
|
+
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
197648
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure
|
|
197649
|
+
*/
|
|
197650
|
+
await this.loadMarkets();
|
|
197651
|
+
const market = this.market(symbol);
|
|
197652
|
+
const [marketType, query] = this.handleMarketTypeAndParams('watchTrades', market, params);
|
|
197653
|
+
const url = this.safeValue(this.urls['api']['ws'], marketType);
|
|
197654
|
+
if (url === undefined) {
|
|
197655
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest(this.id + ' watchTrades is not supported for ' + marketType + ' markets.');
|
|
197656
|
+
}
|
|
197657
|
+
const messageHash = market['id'] + '@trade';
|
|
197658
|
+
const uuid = this.uuid();
|
|
197659
|
+
const request = {
|
|
197660
|
+
'id': uuid,
|
|
197661
|
+
'dataType': messageHash,
|
|
197662
|
+
};
|
|
197663
|
+
if (marketType === 'swap') {
|
|
197664
|
+
request['reqType'] = 'sub';
|
|
197665
|
+
}
|
|
197666
|
+
const trades = await this.watch(url, messageHash, this.extend(request, query), messageHash);
|
|
197667
|
+
if (this.newUpdates) {
|
|
197668
|
+
limit = trades.getLimit(symbol, limit);
|
|
197669
|
+
}
|
|
197670
|
+
return this.filterBySinceLimit(trades, since, limit, 'timestamp', true);
|
|
197671
|
+
}
|
|
197672
|
+
handleTrades(client, message) {
|
|
197673
|
+
//
|
|
197674
|
+
// spot
|
|
197675
|
+
// first snapshot
|
|
197676
|
+
//
|
|
197677
|
+
// {
|
|
197678
|
+
// id: 'd83b78ce-98be-4dc2-b847-12fe471b5bc5',
|
|
197679
|
+
// code: 0,
|
|
197680
|
+
// msg: 'SUCCESS',
|
|
197681
|
+
// timestamp: 1690214699854
|
|
197682
|
+
// }
|
|
197683
|
+
//
|
|
197684
|
+
// subsequent updates
|
|
197685
|
+
//
|
|
197686
|
+
// {
|
|
197687
|
+
// code: 0,
|
|
197688
|
+
// data: {
|
|
197689
|
+
// E: 1690214529432,
|
|
197690
|
+
// T: 1690214529386,
|
|
197691
|
+
// e: 'trade',
|
|
197692
|
+
// m: true,
|
|
197693
|
+
// p: '29110.19',
|
|
197694
|
+
// q: '0.1868',
|
|
197695
|
+
// s: 'BTC-USDT',
|
|
197696
|
+
// t: '57903921'
|
|
197697
|
+
// },
|
|
197698
|
+
// dataType: 'BTC-USDT@trade',
|
|
197699
|
+
// success: true
|
|
197700
|
+
// }
|
|
197701
|
+
//
|
|
197702
|
+
//
|
|
197703
|
+
// swap
|
|
197704
|
+
// first snapshot
|
|
197705
|
+
//
|
|
197706
|
+
// {
|
|
197707
|
+
// id: '2aed93b1-6e1e-4038-aeba-f5eeaec2ca48',
|
|
197708
|
+
// code: 0,
|
|
197709
|
+
// msg: '',
|
|
197710
|
+
// dataType: '',
|
|
197711
|
+
// data: null
|
|
197712
|
+
// }
|
|
197713
|
+
//
|
|
197714
|
+
// subsequent updates
|
|
197715
|
+
//
|
|
197716
|
+
//
|
|
197717
|
+
// {
|
|
197718
|
+
// code: 0,
|
|
197719
|
+
// dataType: 'BTC-USDT@trade',
|
|
197720
|
+
// data: [
|
|
197721
|
+
// {
|
|
197722
|
+
// q: '0.0421',
|
|
197723
|
+
// p: '29023.5',
|
|
197724
|
+
// T: 1690221401344,
|
|
197725
|
+
// m: false,
|
|
197726
|
+
// s: 'BTC-USDT'
|
|
197727
|
+
// },
|
|
197728
|
+
// ...
|
|
197729
|
+
// ]
|
|
197730
|
+
// }
|
|
197731
|
+
//
|
|
197732
|
+
const data = this.safeValue(message, 'data', []);
|
|
197733
|
+
const messageHash = this.safeString(message, 'dataType');
|
|
197734
|
+
const marketId = messageHash.split('@')[0];
|
|
197735
|
+
const marketType = client.url.indexOf('swap') >= 0 ? 'swap' : 'spot';
|
|
197736
|
+
const market = this.safeMarket(marketId, undefined, undefined, marketType);
|
|
197737
|
+
const symbol = market['symbol'];
|
|
197738
|
+
let trades = undefined;
|
|
197739
|
+
if (Array.isArray(data)) {
|
|
197740
|
+
trades = this.parseTrades(data, market);
|
|
197741
|
+
}
|
|
197742
|
+
else {
|
|
197743
|
+
trades = [this.parseTrade(data, market)];
|
|
197744
|
+
}
|
|
197745
|
+
let stored = this.safeValue(this.trades, symbol);
|
|
197746
|
+
if (stored === undefined) {
|
|
197747
|
+
const limit = this.safeInteger(this.options, 'tradesLimit', 1000);
|
|
197748
|
+
stored = new _base_ws_Cache_js__WEBPACK_IMPORTED_MODULE_2__/* .ArrayCache */ .ZL(limit);
|
|
197749
|
+
this.trades[symbol] = stored;
|
|
197750
|
+
}
|
|
197751
|
+
for (let j = 0; j < trades.length; j++) {
|
|
197752
|
+
stored.append(trades[j]);
|
|
197753
|
+
}
|
|
197754
|
+
client.resolve(stored, messageHash);
|
|
197755
|
+
}
|
|
197756
|
+
async watchOrderBook(symbol, limit = undefined, params = {}) {
|
|
197757
|
+
/**
|
|
197758
|
+
* @method
|
|
197759
|
+
* @name bingx#watchOrderBook
|
|
197760
|
+
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
197761
|
+
* @see https://bingx-api.github.io/docs/#/spot/socket/market.html#Subscribe%20Market%20Depth%20Data
|
|
197762
|
+
* @see https://bingx-api.github.io/docs/#/swapV2/socket/market.html#Subscribe%20Market%20Depth%20Data
|
|
197763
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
197764
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
197765
|
+
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
197766
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
197767
|
+
*/
|
|
197768
|
+
await this.loadMarkets();
|
|
197769
|
+
const market = this.market(symbol);
|
|
197770
|
+
const [marketType, query] = this.handleMarketTypeAndParams('watchOrderBook', market, params);
|
|
197771
|
+
if (limit === undefined) {
|
|
197772
|
+
limit = 100;
|
|
197773
|
+
}
|
|
197774
|
+
else {
|
|
197775
|
+
if (marketType === 'swap') {
|
|
197776
|
+
if ((limit !== 5) && (limit !== 10) && (limit !== 20) && (limit !== 50) && (limit !== 100)) {
|
|
197777
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest(this.id + ' watchOrderBook() (swap) only supports limit 5, 10, 20, 50, and 100');
|
|
197778
|
+
}
|
|
197779
|
+
}
|
|
197780
|
+
else if (marketType === 'spot') {
|
|
197781
|
+
if ((limit !== 20) && (limit !== 100)) {
|
|
197782
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest(this.id + ' watchOrderBook() (spot) only supports limit 20, and 100');
|
|
197783
|
+
}
|
|
197784
|
+
}
|
|
197785
|
+
}
|
|
197786
|
+
const url = this.safeValue(this.urls['api']['ws'], marketType);
|
|
197787
|
+
if (url === undefined) {
|
|
197788
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest(this.id + ' watchOrderBook is not supported for ' + marketType + ' markets.');
|
|
197789
|
+
}
|
|
197790
|
+
const messageHash = market['id'] + '@depth' + limit.toString();
|
|
197791
|
+
const uuid = this.uuid();
|
|
197792
|
+
const request = {
|
|
197793
|
+
'id': uuid,
|
|
197794
|
+
'dataType': messageHash,
|
|
197795
|
+
};
|
|
197796
|
+
if (marketType === 'swap') {
|
|
197797
|
+
request['reqType'] = 'sub';
|
|
197798
|
+
}
|
|
197799
|
+
const orderbook = await this.watch(url, messageHash, this.deepExtend(request, query), messageHash);
|
|
197800
|
+
return orderbook.limit();
|
|
197801
|
+
}
|
|
197802
|
+
handleDelta(bookside, delta) {
|
|
197803
|
+
const price = this.safeFloat(delta, 0);
|
|
197804
|
+
const amount = this.safeFloat(delta, 1);
|
|
197805
|
+
bookside.store(price, amount);
|
|
197806
|
+
}
|
|
197807
|
+
handleOrderBook(client, message) {
|
|
197808
|
+
//
|
|
197809
|
+
// spot
|
|
197810
|
+
//
|
|
197811
|
+
//
|
|
197812
|
+
// {
|
|
197813
|
+
// code: 0,
|
|
197814
|
+
// dataType: 'BTC-USDT@depth20',
|
|
197815
|
+
// data: {
|
|
197816
|
+
// bids: [
|
|
197817
|
+
// [ '28852.9', '34.2621' ],
|
|
197818
|
+
// ...
|
|
197819
|
+
// ],
|
|
197820
|
+
// asks: [
|
|
197821
|
+
// [ '28864.9', '23.4079' ],
|
|
197822
|
+
// ...
|
|
197823
|
+
// ]
|
|
197824
|
+
// },
|
|
197825
|
+
// dataType: 'BTC-USDT@depth20',
|
|
197826
|
+
// success: true
|
|
197827
|
+
// }
|
|
197828
|
+
//
|
|
197829
|
+
// swap
|
|
197830
|
+
//
|
|
197831
|
+
//
|
|
197832
|
+
// {
|
|
197833
|
+
// code: 0,
|
|
197834
|
+
// dataType: 'BTC-USDT@depth20',
|
|
197835
|
+
// data: {
|
|
197836
|
+
// bids: [
|
|
197837
|
+
// [ '28852.9', '34.2621' ],
|
|
197838
|
+
// ...
|
|
197839
|
+
// ],
|
|
197840
|
+
// asks: [
|
|
197841
|
+
// [ '28864.9', '23.4079' ],
|
|
197842
|
+
// ...
|
|
197843
|
+
// ]
|
|
197844
|
+
// }
|
|
197845
|
+
// }
|
|
197846
|
+
//
|
|
197847
|
+
const data = this.safeValue(message, 'data', []);
|
|
197848
|
+
const messageHash = this.safeString(message, 'dataType');
|
|
197849
|
+
const marketId = messageHash.split('@')[0];
|
|
197850
|
+
const marketType = client.url.indexOf('swap') >= 0 ? 'swap' : 'spot';
|
|
197851
|
+
const market = this.safeMarket(marketId, undefined, undefined, marketType);
|
|
197852
|
+
const symbol = market['symbol'];
|
|
197853
|
+
let orderbook = this.safeValue(this.orderbooks, symbol);
|
|
197854
|
+
if (orderbook === undefined) {
|
|
197855
|
+
orderbook = this.orderBook();
|
|
197856
|
+
}
|
|
197857
|
+
const snapshot = this.parseOrderBook(data, symbol, undefined, 'bids', 'asks', 0, 1);
|
|
197858
|
+
orderbook.reset(snapshot);
|
|
197859
|
+
this.orderbooks[symbol] = orderbook;
|
|
197860
|
+
client.resolve(orderbook, messageHash);
|
|
197861
|
+
}
|
|
197862
|
+
parseWsOHLCV(ohlcv, market = undefined) {
|
|
197863
|
+
//
|
|
197864
|
+
// {
|
|
197865
|
+
// c: '28909.0',
|
|
197866
|
+
// o: '28915.4',
|
|
197867
|
+
// h: '28915.4',
|
|
197868
|
+
// l: '28896.1',
|
|
197869
|
+
// v: '27.6919',
|
|
197870
|
+
// T: 1690907580000
|
|
197871
|
+
// }
|
|
197872
|
+
//
|
|
197873
|
+
return [
|
|
197874
|
+
this.safeInteger(ohlcv, 'T'),
|
|
197875
|
+
this.safeNumber(ohlcv, 'o'),
|
|
197876
|
+
this.safeNumber(ohlcv, 'h'),
|
|
197877
|
+
this.safeNumber(ohlcv, 'l'),
|
|
197878
|
+
this.safeNumber(ohlcv, 'c'),
|
|
197879
|
+
this.safeNumber(ohlcv, 'v'),
|
|
197880
|
+
];
|
|
197881
|
+
}
|
|
197882
|
+
handleOHLCV(client, message) {
|
|
197883
|
+
//
|
|
197884
|
+
// spot
|
|
197885
|
+
//
|
|
197886
|
+
// {
|
|
197887
|
+
// code: 0,
|
|
197888
|
+
// data: {
|
|
197889
|
+
// E: 1696687498608,
|
|
197890
|
+
// K: {
|
|
197891
|
+
// T: 1696687499999,
|
|
197892
|
+
// c: '27917.829',
|
|
197893
|
+
// h: '27918.427',
|
|
197894
|
+
// i: '1min',
|
|
197895
|
+
// l: '27917.7',
|
|
197896
|
+
// n: 262,
|
|
197897
|
+
// o: '27917.91',
|
|
197898
|
+
// q: '25715.359197',
|
|
197899
|
+
// s: 'BTC-USDT',
|
|
197900
|
+
// t: 1696687440000,
|
|
197901
|
+
// v: '0.921100'
|
|
197902
|
+
// },
|
|
197903
|
+
// e: 'kline',
|
|
197904
|
+
// s: 'BTC-USDT'
|
|
197905
|
+
// },
|
|
197906
|
+
// dataType: 'BTC-USDT@kline_1min',
|
|
197907
|
+
// success: true
|
|
197908
|
+
// }
|
|
197909
|
+
//
|
|
197910
|
+
// swap
|
|
197911
|
+
// {
|
|
197912
|
+
// code: 0,
|
|
197913
|
+
// dataType: 'BTC-USDT@kline_1m',
|
|
197914
|
+
// s: 'BTC-USDT',
|
|
197915
|
+
// data: [
|
|
197916
|
+
// {
|
|
197917
|
+
// c: '28909.0',
|
|
197918
|
+
// o: '28915.4',
|
|
197919
|
+
// h: '28915.4',
|
|
197920
|
+
// l: '28896.1',
|
|
197921
|
+
// v: '27.6919',
|
|
197922
|
+
// T: 1690907580000
|
|
197923
|
+
// }
|
|
197924
|
+
// ]
|
|
197925
|
+
// }
|
|
197926
|
+
//
|
|
197927
|
+
const data = this.safeValue(message, 'data', []);
|
|
197928
|
+
let candles = undefined;
|
|
197929
|
+
if (Array.isArray(data)) {
|
|
197930
|
+
candles = data;
|
|
197931
|
+
}
|
|
197932
|
+
else {
|
|
197933
|
+
candles = [this.safeValue(data, 'K', [])];
|
|
197934
|
+
}
|
|
197935
|
+
const messageHash = this.safeString(message, 'dataType');
|
|
197936
|
+
const timeframeId = messageHash.split('_')[1];
|
|
197937
|
+
const marketId = messageHash.split('@')[0];
|
|
197938
|
+
const marketType = client.url.indexOf('swap') >= 0 ? 'swap' : 'spot';
|
|
197939
|
+
const market = this.safeMarket(marketId, undefined, undefined, marketType);
|
|
197940
|
+
const symbol = market['symbol'];
|
|
197941
|
+
this.ohlcvs[symbol] = this.safeValue(this.ohlcvs, symbol, {});
|
|
197942
|
+
let stored = this.safeValue(this.ohlcvs[symbol], timeframeId);
|
|
197943
|
+
if (stored === undefined) {
|
|
197944
|
+
const limit = this.safeInteger(this.options, 'OHLCVLimit', 1000);
|
|
197945
|
+
stored = new _base_ws_Cache_js__WEBPACK_IMPORTED_MODULE_2__/* .ArrayCacheByTimestamp */ .Py(limit);
|
|
197946
|
+
this.ohlcvs[symbol][timeframeId] = stored;
|
|
197947
|
+
}
|
|
197948
|
+
for (let i = 0; i < candles.length; i++) {
|
|
197949
|
+
const candle = candles[i];
|
|
197950
|
+
const parsed = this.parseWsOHLCV(candle, market);
|
|
197951
|
+
stored.append(parsed);
|
|
197952
|
+
}
|
|
197953
|
+
client.resolve(stored, messageHash);
|
|
197954
|
+
}
|
|
197955
|
+
async watchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
197956
|
+
/**
|
|
197957
|
+
* @method
|
|
197958
|
+
* @name bingx#watchOHLCV
|
|
197959
|
+
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
197960
|
+
* @see https://bingx-api.github.io/docs/#/spot/socket/market.html#K%E7%BA%BF%20Streams
|
|
197961
|
+
* @see https://bingx-api.github.io/docs/#/swapV2/socket/market.html#Subscribe%20K-Line%20Data
|
|
197962
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
197963
|
+
* @param {string} timeframe the length of time each candle represents
|
|
197964
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
197965
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
197966
|
+
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
197967
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
197968
|
+
*/
|
|
197969
|
+
const market = this.market(symbol);
|
|
197970
|
+
const [marketType, query] = this.handleMarketTypeAndParams('watchOHLCV', market, params);
|
|
197971
|
+
const url = this.safeValue(this.urls['api']['ws'], marketType);
|
|
197972
|
+
if (url === undefined) {
|
|
197973
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest(this.id + ' watchOHLCV is not supported for ' + marketType + ' markets.');
|
|
197974
|
+
}
|
|
197975
|
+
const options = this.safeValue(this.options, marketType, {});
|
|
197976
|
+
const timeframes = this.safeValue(options, 'timeframes', {});
|
|
197977
|
+
const interval = this.safeString(timeframes, timeframe, timeframe);
|
|
197978
|
+
const messageHash = market['id'] + '@kline_' + interval;
|
|
197979
|
+
const uuid = this.uuid();
|
|
197980
|
+
const request = {
|
|
197981
|
+
'id': uuid,
|
|
197982
|
+
'dataType': messageHash,
|
|
197983
|
+
};
|
|
197984
|
+
if (marketType === 'swap') {
|
|
197985
|
+
request['reqType'] = 'sub';
|
|
197986
|
+
}
|
|
197987
|
+
const ohlcv = await this.watch(url, messageHash, this.extend(request, query), messageHash);
|
|
197988
|
+
if (this.newUpdates) {
|
|
197989
|
+
limit = ohlcv.getLimit(symbol, limit);
|
|
197990
|
+
}
|
|
197991
|
+
return this.filterBySinceLimit(ohlcv, since, limit, 0, true);
|
|
197992
|
+
}
|
|
197993
|
+
async watchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
197994
|
+
/**
|
|
197995
|
+
* @method
|
|
197996
|
+
* @name bingx#watchOrders
|
|
197997
|
+
* @see https://bingx-api.github.io/docs/#/spot/socket/account.html#Subscription%20order%20update%20data
|
|
197998
|
+
* @see https://bingx-api.github.io/docs/#/swapV2/socket/account.html#Account%20balance%20and%20position%20update%20push
|
|
197999
|
+
* @description watches information on multiple orders made by the user
|
|
198000
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
198001
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
198002
|
+
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
198003
|
+
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
198004
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
198005
|
+
*/
|
|
198006
|
+
await this.loadMarkets();
|
|
198007
|
+
await this.authenticate();
|
|
198008
|
+
let type = undefined;
|
|
198009
|
+
let market = undefined;
|
|
198010
|
+
if (symbol !== undefined) {
|
|
198011
|
+
market = this.market(symbol);
|
|
198012
|
+
symbol = market['symbol'];
|
|
198013
|
+
}
|
|
198014
|
+
[type, params] = this.handleMarketTypeAndParams('watchOrders', market, params);
|
|
198015
|
+
const isSpot = (type === 'spot');
|
|
198016
|
+
const spotHash = 'spot:private';
|
|
198017
|
+
const swapHash = 'swap:private';
|
|
198018
|
+
const subscriptionHash = isSpot ? spotHash : swapHash;
|
|
198019
|
+
const spotMessageHash = 'spot:order';
|
|
198020
|
+
const swapMessageHash = 'swap:order';
|
|
198021
|
+
let messageHash = isSpot ? spotMessageHash : swapMessageHash;
|
|
198022
|
+
if (market !== undefined) {
|
|
198023
|
+
messageHash += ':' + symbol;
|
|
198024
|
+
}
|
|
198025
|
+
const url = this.urls['api']['ws'][type] + '?listenKey=' + this.options['listenKey'];
|
|
198026
|
+
let request = undefined;
|
|
198027
|
+
const uuid = this.uuid();
|
|
198028
|
+
if (isSpot) {
|
|
198029
|
+
request = {
|
|
198030
|
+
'id': uuid,
|
|
198031
|
+
'dataType': 'spot.executionReport',
|
|
198032
|
+
};
|
|
198033
|
+
}
|
|
198034
|
+
const orders = await this.watch(url, messageHash, request, subscriptionHash);
|
|
198035
|
+
if (this.newUpdates) {
|
|
198036
|
+
limit = orders.getLimit(symbol, limit);
|
|
198037
|
+
}
|
|
198038
|
+
return this.filterBySymbolSinceLimit(orders, symbol, since, limit, true);
|
|
198039
|
+
}
|
|
198040
|
+
async watchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
198041
|
+
/**
|
|
198042
|
+
* @method
|
|
198043
|
+
* @name bingx#watchMyTrades
|
|
198044
|
+
* @see https://bingx-api.github.io/docs/#/spot/socket/account.html#Subscription%20order%20update%20data
|
|
198045
|
+
* @see https://bingx-api.github.io/docs/#/swapV2/socket/account.html#Account%20balance%20and%20position%20update%20push
|
|
198046
|
+
* @description watches information on multiple trades made by the user
|
|
198047
|
+
* @param {string} symbol unified market symbol of the market trades were made in
|
|
198048
|
+
* @param {int} [since] the earliest time in ms to trades orders for
|
|
198049
|
+
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
198050
|
+
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
198051
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure
|
|
198052
|
+
*/
|
|
198053
|
+
await this.loadMarkets();
|
|
198054
|
+
await this.authenticate();
|
|
198055
|
+
let type = undefined;
|
|
198056
|
+
let market = undefined;
|
|
198057
|
+
if (symbol !== undefined) {
|
|
198058
|
+
market = this.market(symbol);
|
|
198059
|
+
symbol = market['symbol'];
|
|
198060
|
+
}
|
|
198061
|
+
[type, params] = this.handleMarketTypeAndParams('watchOrders', market, params);
|
|
198062
|
+
const isSpot = (type === 'spot');
|
|
198063
|
+
const spotSubHash = 'spot:private';
|
|
198064
|
+
const swapSubHash = 'swap:private';
|
|
198065
|
+
const subscriptionHash = isSpot ? spotSubHash : swapSubHash;
|
|
198066
|
+
const spotMessageHash = 'spot:mytrades';
|
|
198067
|
+
const swapMessageHash = 'swap:mytrades';
|
|
198068
|
+
let messageHash = isSpot ? spotMessageHash : swapMessageHash;
|
|
198069
|
+
if (market !== undefined) {
|
|
198070
|
+
messageHash += ':' + symbol;
|
|
198071
|
+
}
|
|
198072
|
+
const url = this.urls['api']['ws'][type] + '?listenKey=' + this.options['listenKey'];
|
|
198073
|
+
let request = undefined;
|
|
198074
|
+
const uuid = this.uuid();
|
|
198075
|
+
if (isSpot) {
|
|
198076
|
+
request = {
|
|
198077
|
+
'id': uuid,
|
|
198078
|
+
'dataType': 'spot.executionReport',
|
|
198079
|
+
};
|
|
198080
|
+
}
|
|
198081
|
+
const trades = await this.watch(url, messageHash, request, subscriptionHash);
|
|
198082
|
+
if (this.newUpdates) {
|
|
198083
|
+
limit = trades.getLimit(symbol, limit);
|
|
198084
|
+
}
|
|
198085
|
+
return this.filterBySymbolSinceLimit(trades, symbol, since, limit, true);
|
|
198086
|
+
}
|
|
198087
|
+
async watchBalance(params = {}) {
|
|
198088
|
+
/**
|
|
198089
|
+
* @method
|
|
198090
|
+
* @name bingx#watchBalance
|
|
198091
|
+
* @see https://bingx-api.github.io/docs/#/spot/socket/account.html#Subscription%20order%20update%20data
|
|
198092
|
+
* @see https://bingx-api.github.io/docs/#/swapV2/socket/account.html#Account%20balance%20and%20position%20update%20push
|
|
198093
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
198094
|
+
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
198095
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
|
|
198096
|
+
*/
|
|
198097
|
+
await this.loadMarkets();
|
|
198098
|
+
await this.authenticate();
|
|
198099
|
+
let type = undefined;
|
|
198100
|
+
[type, params] = this.handleMarketTypeAndParams('watchBalance', undefined, params);
|
|
198101
|
+
const isSpot = (type === 'spot');
|
|
198102
|
+
const spotSubHash = 'spot:balance';
|
|
198103
|
+
const swapSubHash = 'swap:private';
|
|
198104
|
+
const spotMessageHash = 'spot:balance';
|
|
198105
|
+
const swapMessageHash = 'swap:balance';
|
|
198106
|
+
const messageHash = isSpot ? spotMessageHash : swapMessageHash;
|
|
198107
|
+
const subscriptionHash = isSpot ? spotSubHash : swapSubHash;
|
|
198108
|
+
const url = this.urls['api']['ws'][type] + '?listenKey=' + this.options['listenKey'];
|
|
198109
|
+
let request = undefined;
|
|
198110
|
+
const uuid = this.uuid();
|
|
198111
|
+
if (type === 'spot') {
|
|
198112
|
+
request = {
|
|
198113
|
+
'id': uuid,
|
|
198114
|
+
'dataType': 'ACCOUNT_UPDATE',
|
|
198115
|
+
};
|
|
198116
|
+
}
|
|
198117
|
+
return await this.watch(url, messageHash, request, subscriptionHash);
|
|
198118
|
+
}
|
|
198119
|
+
handleErrorMessage(client, message) {
|
|
198120
|
+
//
|
|
198121
|
+
// { code: 100400, msg: '', timestamp: 1696245808833 }
|
|
198122
|
+
//
|
|
198123
|
+
// {
|
|
198124
|
+
// code: 100500,
|
|
198125
|
+
// id: '9cd37d32-da98-440b-bd04-37e7dbcf51ad',
|
|
198126
|
+
// msg: '',
|
|
198127
|
+
// timestamp: 1696245842307
|
|
198128
|
+
// }
|
|
198129
|
+
const code = this.safeString(message, 'code');
|
|
198130
|
+
try {
|
|
198131
|
+
if (code !== undefined) {
|
|
198132
|
+
const feedback = this.id + ' ' + this.json(message);
|
|
198133
|
+
this.throwExactlyMatchedException(this.exceptions['exact'], code, feedback);
|
|
198134
|
+
}
|
|
198135
|
+
}
|
|
198136
|
+
catch (e) {
|
|
198137
|
+
client.reject(e);
|
|
198138
|
+
}
|
|
198139
|
+
return true;
|
|
198140
|
+
}
|
|
198141
|
+
async authenticate(params = {}) {
|
|
198142
|
+
const time = this.milliseconds();
|
|
198143
|
+
const listenKey = this.safeString(this.options, 'listenKey');
|
|
198144
|
+
if (listenKey === undefined) {
|
|
198145
|
+
const response = await this.userAuthPrivatePostUserDataStream();
|
|
198146
|
+
this.options['listenKey'] = this.safeString(response, 'listenKey');
|
|
198147
|
+
this.options['lastAuthenticatedTime'] = time;
|
|
198148
|
+
return;
|
|
198149
|
+
}
|
|
198150
|
+
const lastAuthenticatedTime = this.safeInteger(this.options, 'lastAuthenticatedTime', 0);
|
|
198151
|
+
const listenKeyRefreshRate = this.safeInteger(this.options, 'listenKeyRefreshRate', 3600000); // 1 hour
|
|
198152
|
+
if (time - lastAuthenticatedTime > listenKeyRefreshRate) {
|
|
198153
|
+
const response = await this.userAuthPrivatePostUserDataStream({ 'listenKey': listenKey }); // extend the expiry
|
|
198154
|
+
this.options['listenKey'] = this.safeString(response, 'listenKey');
|
|
198155
|
+
this.options['lastAuthenticatedTime'] = time;
|
|
198156
|
+
}
|
|
198157
|
+
}
|
|
198158
|
+
async pong(client, message) {
|
|
198159
|
+
//
|
|
198160
|
+
// spot
|
|
198161
|
+
// {
|
|
198162
|
+
// ping: '5963ba3db76049b2870f9a686b2ebaac',
|
|
198163
|
+
// time: '2023-10-02T18:51:55.089+0800'
|
|
198164
|
+
// }
|
|
198165
|
+
// swap
|
|
198166
|
+
// Ping
|
|
198167
|
+
//
|
|
198168
|
+
if (message === 'Ping') {
|
|
198169
|
+
await client.send('Pong');
|
|
198170
|
+
}
|
|
198171
|
+
else {
|
|
198172
|
+
const ping = this.safeString(message, 'ping');
|
|
198173
|
+
const time = this.safeString(message, 'time');
|
|
198174
|
+
await client.send({
|
|
198175
|
+
'pong': ping,
|
|
198176
|
+
'time': time,
|
|
198177
|
+
});
|
|
198178
|
+
}
|
|
198179
|
+
}
|
|
198180
|
+
handleOrder(client, message) {
|
|
198181
|
+
//
|
|
198182
|
+
// {
|
|
198183
|
+
// "code": 0,
|
|
198184
|
+
// "dataType": "spot.executionReport",
|
|
198185
|
+
// "data": {
|
|
198186
|
+
// "e": "executionReport",
|
|
198187
|
+
// "E": 1694680212947,
|
|
198188
|
+
// "s": "LTC-USDT",
|
|
198189
|
+
// "S": "BUY",
|
|
198190
|
+
// "o": "LIMIT",
|
|
198191
|
+
// "q": 0.1,
|
|
198192
|
+
// "p": 50,
|
|
198193
|
+
// "x": "NEW",
|
|
198194
|
+
// "X": "PENDING",
|
|
198195
|
+
// "i": 1702238305204043800,
|
|
198196
|
+
// "l": 0,
|
|
198197
|
+
// "z": 0,
|
|
198198
|
+
// "L": 0,
|
|
198199
|
+
// "n": 0,
|
|
198200
|
+
// "N": "",
|
|
198201
|
+
// "T": 0,
|
|
198202
|
+
// "t": 0,
|
|
198203
|
+
// "O": 1694680212676,
|
|
198204
|
+
// "Z": 0,
|
|
198205
|
+
// "Y": 0,
|
|
198206
|
+
// "Q": 0,
|
|
198207
|
+
// "m": false
|
|
198208
|
+
// }
|
|
198209
|
+
// }
|
|
198210
|
+
//
|
|
198211
|
+
// {
|
|
198212
|
+
// code: 0,
|
|
198213
|
+
// dataType: 'spot.executionReport',
|
|
198214
|
+
// data: {
|
|
198215
|
+
// e: 'executionReport',
|
|
198216
|
+
// E: 1694681809302,
|
|
198217
|
+
// s: 'LTC-USDT',
|
|
198218
|
+
// S: 'BUY',
|
|
198219
|
+
// o: 'MARKET',
|
|
198220
|
+
// q: 0,
|
|
198221
|
+
// p: 62.29,
|
|
198222
|
+
// x: 'TRADE',
|
|
198223
|
+
// X: 'FILLED',
|
|
198224
|
+
// i: '1702245001712369664',
|
|
198225
|
+
// l: 0.0802,
|
|
198226
|
+
// z: 0.0802,
|
|
198227
|
+
// L: 62.308,
|
|
198228
|
+
// n: -0.0000802,
|
|
198229
|
+
// N: 'LTC',
|
|
198230
|
+
// T: 1694681809256,
|
|
198231
|
+
// t: 38259147,
|
|
198232
|
+
// O: 1694681809248,
|
|
198233
|
+
// Z: 4.9971016,
|
|
198234
|
+
// Y: 4.9971016,
|
|
198235
|
+
// Q: 5,
|
|
198236
|
+
// m: false
|
|
198237
|
+
// }
|
|
198238
|
+
// }
|
|
198239
|
+
// swap
|
|
198240
|
+
// {
|
|
198241
|
+
// "e": "ORDER_TRADE_UPDATE",
|
|
198242
|
+
// "E": 1696843635475,
|
|
198243
|
+
// "o": {
|
|
198244
|
+
// "s": "LTC-USDT",
|
|
198245
|
+
// "c": "",
|
|
198246
|
+
// "i": "1711312357852147712",
|
|
198247
|
+
// "S": "BUY",
|
|
198248
|
+
// "o": "MARKET",
|
|
198249
|
+
// "q": "0.10000000",
|
|
198250
|
+
// "p": "64.35010000",
|
|
198251
|
+
// "ap": "64.36000000",
|
|
198252
|
+
// "x": "TRADE",
|
|
198253
|
+
// "X": "FILLED",
|
|
198254
|
+
// "N": "USDT",
|
|
198255
|
+
// "n": "-0.00321800",
|
|
198256
|
+
// "T": 0,
|
|
198257
|
+
// "wt": "MARK_PRICE",
|
|
198258
|
+
// "ps": "LONG",
|
|
198259
|
+
// "rp": "0.00000000",
|
|
198260
|
+
// "z": "0.10000000"
|
|
198261
|
+
// }
|
|
198262
|
+
// }
|
|
198263
|
+
//
|
|
198264
|
+
const isSpot = ('dataType' in message);
|
|
198265
|
+
const data = this.safeValue2(message, 'data', 'o', {});
|
|
198266
|
+
if (this.orders === undefined) {
|
|
198267
|
+
const limit = this.safeInteger(this.options, 'ordersLimit', 1000);
|
|
198268
|
+
this.orders = new _base_ws_Cache_js__WEBPACK_IMPORTED_MODULE_2__/* .ArrayCacheBySymbolById */ .hl(limit);
|
|
198269
|
+
}
|
|
198270
|
+
const stored = this.orders;
|
|
198271
|
+
const parsedOrder = this.parseOrder(data);
|
|
198272
|
+
stored.append(parsedOrder);
|
|
198273
|
+
const symbol = parsedOrder['symbol'];
|
|
198274
|
+
const spotHash = 'spot:order';
|
|
198275
|
+
const swapHash = 'swap:order';
|
|
198276
|
+
const messageHash = (isSpot) ? spotHash : swapHash;
|
|
198277
|
+
client.resolve(stored, messageHash);
|
|
198278
|
+
client.resolve(stored, messageHash + ':' + symbol);
|
|
198279
|
+
}
|
|
198280
|
+
handleMyTrades(client, message) {
|
|
198281
|
+
//
|
|
198282
|
+
//
|
|
198283
|
+
// {
|
|
198284
|
+
// code: 0,
|
|
198285
|
+
// dataType: 'spot.executionReport',
|
|
198286
|
+
// data: {
|
|
198287
|
+
// e: 'executionReport',
|
|
198288
|
+
// E: 1694681809302,
|
|
198289
|
+
// s: 'LTC-USDT',
|
|
198290
|
+
// S: 'BUY',
|
|
198291
|
+
// o: 'MARKET',
|
|
198292
|
+
// q: 0,
|
|
198293
|
+
// p: 62.29,
|
|
198294
|
+
// x: 'TRADE',
|
|
198295
|
+
// X: 'FILLED',
|
|
198296
|
+
// i: '1702245001712369664',
|
|
198297
|
+
// l: 0.0802,
|
|
198298
|
+
// z: 0.0802,
|
|
198299
|
+
// L: 62.308,
|
|
198300
|
+
// n: -0.0000802,
|
|
198301
|
+
// N: 'LTC',
|
|
198302
|
+
// T: 1694681809256,
|
|
198303
|
+
// t: 38259147,
|
|
198304
|
+
// O: 1694681809248,
|
|
198305
|
+
// Z: 4.9971016,
|
|
198306
|
+
// Y: 4.9971016,
|
|
198307
|
+
// Q: 5,
|
|
198308
|
+
// m: false
|
|
198309
|
+
// }
|
|
198310
|
+
// }
|
|
198311
|
+
//
|
|
198312
|
+
// swap
|
|
198313
|
+
// {
|
|
198314
|
+
// "e": "ORDER_TRADE_UPDATE",
|
|
198315
|
+
// "E": 1696843635475,
|
|
198316
|
+
// "o": {
|
|
198317
|
+
// "s": "LTC-USDT",
|
|
198318
|
+
// "c": "",
|
|
198319
|
+
// "i": "1711312357852147712",
|
|
198320
|
+
// "S": "BUY",
|
|
198321
|
+
// "o": "MARKET",
|
|
198322
|
+
// "q": "0.10000000",
|
|
198323
|
+
// "p": "64.35010000",
|
|
198324
|
+
// "ap": "64.36000000",
|
|
198325
|
+
// "x": "TRADE",
|
|
198326
|
+
// "X": "FILLED",
|
|
198327
|
+
// "N": "USDT",
|
|
198328
|
+
// "n": "-0.00321800",
|
|
198329
|
+
// "T": 0,
|
|
198330
|
+
// "wt": "MARK_PRICE",
|
|
198331
|
+
// "ps": "LONG",
|
|
198332
|
+
// "rp": "0.00000000",
|
|
198333
|
+
// "z": "0.10000000"
|
|
198334
|
+
// }
|
|
198335
|
+
// }
|
|
198336
|
+
//
|
|
198337
|
+
const isSpot = ('dataType' in message);
|
|
198338
|
+
const result = this.safeValue2(message, 'data', 'o', {});
|
|
198339
|
+
let cachedTrades = this.myTrades;
|
|
198340
|
+
if (cachedTrades === undefined) {
|
|
198341
|
+
const limit = this.safeInteger(this.options, 'tradesLimit', 1000);
|
|
198342
|
+
cachedTrades = new _base_ws_Cache_js__WEBPACK_IMPORTED_MODULE_2__/* .ArrayCacheBySymbolById */ .hl(limit);
|
|
198343
|
+
this.myTrades = cachedTrades;
|
|
198344
|
+
}
|
|
198345
|
+
const parsed = this.parseTrade(result);
|
|
198346
|
+
const symbol = parsed['symbol'];
|
|
198347
|
+
const spotHash = 'spot:mytrades';
|
|
198348
|
+
const swapHash = 'swap:mytrades';
|
|
198349
|
+
const messageHash = isSpot ? spotHash : swapHash;
|
|
198350
|
+
cachedTrades.append(parsed);
|
|
198351
|
+
client.resolve(cachedTrades, messageHash);
|
|
198352
|
+
client.resolve(cachedTrades, messageHash + ':' + symbol);
|
|
198353
|
+
}
|
|
198354
|
+
handleBalance(client, message) {
|
|
198355
|
+
// spot
|
|
198356
|
+
// {
|
|
198357
|
+
// "e":"ACCOUNT_UPDATE",
|
|
198358
|
+
// "E":1696242817000,
|
|
198359
|
+
// "T":1696242817142,
|
|
198360
|
+
// "a":{
|
|
198361
|
+
// "B":[
|
|
198362
|
+
// {
|
|
198363
|
+
// "a":"USDT",
|
|
198364
|
+
// "bc":"-1.00000000000000000000",
|
|
198365
|
+
// "cw":"86.59497382000000050000",
|
|
198366
|
+
// "wb":"86.59497382000000050000"
|
|
198367
|
+
// }
|
|
198368
|
+
// ],
|
|
198369
|
+
// "m":"ASSET_TRANSFER"
|
|
198370
|
+
// }
|
|
198371
|
+
// }
|
|
198372
|
+
// swap
|
|
198373
|
+
// {
|
|
198374
|
+
// "e":"ACCOUNT_UPDATE",
|
|
198375
|
+
// "E":1696244249320,
|
|
198376
|
+
// "a":{
|
|
198377
|
+
// "m":"WITHDRAW",
|
|
198378
|
+
// "B":[
|
|
198379
|
+
// {
|
|
198380
|
+
// "a":"USDT",
|
|
198381
|
+
// "wb":"49.81083984",
|
|
198382
|
+
// "cw":"49.81083984",
|
|
198383
|
+
// "bc":"-1.00000000"
|
|
198384
|
+
// }
|
|
198385
|
+
// ],
|
|
198386
|
+
// "P":[
|
|
198387
|
+
// ]
|
|
198388
|
+
// }
|
|
198389
|
+
// }
|
|
198390
|
+
//
|
|
198391
|
+
const a = this.safeValue(message, 'a', {});
|
|
198392
|
+
const data = this.safeValue(a, 'B', []);
|
|
198393
|
+
const timestamp = this.safeInteger2(message, 'T', 'E');
|
|
198394
|
+
const type = ('P' in a) ? 'swap' : 'spot';
|
|
198395
|
+
if (!(type in this.balance)) {
|
|
198396
|
+
this.balance[type] = {};
|
|
198397
|
+
}
|
|
198398
|
+
this.balance[type]['info'] = data;
|
|
198399
|
+
this.balance[type]['timestamp'] = timestamp;
|
|
198400
|
+
this.balance[type]['datetime'] = this.iso8601(timestamp);
|
|
198401
|
+
for (let i = 0; i < data.length; i++) {
|
|
198402
|
+
const balance = data[i];
|
|
198403
|
+
const currencyId = this.safeString(balance, 'a');
|
|
198404
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
198405
|
+
const account = (code in this.balance) ? this.balance[code] : this.account();
|
|
198406
|
+
account['total'] = this.safeString(balance, 'wb');
|
|
198407
|
+
this.balance[type][code] = account;
|
|
198408
|
+
}
|
|
198409
|
+
this.balance[type] = this.safeBalance(this.balance[type]);
|
|
198410
|
+
client.resolve(this.balance[type], type + ':balance');
|
|
198411
|
+
}
|
|
198412
|
+
handleMessage(client, message) {
|
|
198413
|
+
if (!this.handleErrorMessage(client, message)) {
|
|
198414
|
+
return;
|
|
198415
|
+
}
|
|
198416
|
+
// public subscriptions
|
|
198417
|
+
if ((message === 'Ping') || ('ping' in message)) {
|
|
198418
|
+
this.spawn(this.pong, client, message);
|
|
198419
|
+
return;
|
|
198420
|
+
}
|
|
198421
|
+
const dataType = this.safeString(message, 'dataType', '');
|
|
198422
|
+
if (dataType.indexOf('@depth') >= 0) {
|
|
198423
|
+
this.handleOrderBook(client, message);
|
|
198424
|
+
return;
|
|
198425
|
+
}
|
|
198426
|
+
if (dataType.indexOf('@trade') >= 0) {
|
|
198427
|
+
this.handleTrades(client, message);
|
|
198428
|
+
return;
|
|
198429
|
+
}
|
|
198430
|
+
if (dataType.indexOf('@kline') >= 0) {
|
|
198431
|
+
this.handleOHLCV(client, message);
|
|
198432
|
+
return;
|
|
198433
|
+
}
|
|
198434
|
+
if (dataType.indexOf('executionReport') >= 0) {
|
|
198435
|
+
const data = this.safeValue(message, 'data', {});
|
|
198436
|
+
const type = this.safeString(data, 'x');
|
|
198437
|
+
if (type === 'TRADE') {
|
|
198438
|
+
this.handleMyTrades(client, message);
|
|
198439
|
+
}
|
|
198440
|
+
this.handleOrder(client, message);
|
|
198441
|
+
return;
|
|
198442
|
+
}
|
|
198443
|
+
const e = this.safeString(message, 'e');
|
|
198444
|
+
if (e === 'ACCOUNT_UPDATE') {
|
|
198445
|
+
this.handleBalance(client, message);
|
|
198446
|
+
}
|
|
198447
|
+
if (e === 'ORDER_TRADE_UPDATE') {
|
|
198448
|
+
this.handleOrder(client, message);
|
|
198449
|
+
const data = this.safeValue(message, 'o', {});
|
|
198450
|
+
const type = this.safeString(data, 'x');
|
|
198451
|
+
const status = this.safeString(data, 'X');
|
|
198452
|
+
if ((type === 'TRADE') && (status === 'FILLED')) {
|
|
198453
|
+
this.handleMyTrades(client, message);
|
|
198454
|
+
}
|
|
198455
|
+
}
|
|
198456
|
+
}
|
|
198457
|
+
}
|
|
198458
|
+
|
|
198459
|
+
|
|
197330
198460
|
/***/ }),
|
|
197331
198461
|
|
|
197332
198462
|
/***/ 453:
|
|
@@ -241029,6 +242159,9 @@ class probit extends _abstract_probit_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
241029
242159
|
if (limit !== undefined) {
|
|
241030
242160
|
request['limit'] = limit;
|
|
241031
242161
|
}
|
|
242162
|
+
else {
|
|
242163
|
+
request['limit'] = 100;
|
|
242164
|
+
}
|
|
241032
242165
|
const response = await this.privateGetTransferPayment(this.extend(request, params));
|
|
241033
242166
|
//
|
|
241034
242167
|
// {
|
|
@@ -264533,6 +265666,7 @@ class woo extends _abstract_woo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
264533
265666
|
/**
|
|
264534
265667
|
* @method
|
|
264535
265668
|
* @name woo#fetchOHLCV
|
|
265669
|
+
* @see https://docs.woo.org/#kline-public
|
|
264536
265670
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
264537
265671
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
264538
265672
|
* @param {string} timeframe the length of time each candle represents
|
|
@@ -265499,8 +266633,26 @@ class woo extends _abstract_woo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
265499
266633
|
return this.filterByArray(result, 'symbol', symbols);
|
|
265500
266634
|
}
|
|
265501
266635
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
266636
|
+
/**
|
|
266637
|
+
* @method
|
|
266638
|
+
* @name woo#fetchFundingRateHistory
|
|
266639
|
+
* @description fetches historical funding rate prices
|
|
266640
|
+
* @see https://docs.woo.org/#get-funding-rate-history-for-one-market-public
|
|
266641
|
+
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
266642
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
266643
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
|
|
266644
|
+
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
266645
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
266646
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
266647
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
|
|
266648
|
+
*/
|
|
265502
266649
|
await this.loadMarkets();
|
|
265503
|
-
|
|
266650
|
+
let paginate = false;
|
|
266651
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchFundingRateHistory', 'paginate');
|
|
266652
|
+
if (paginate) {
|
|
266653
|
+
return await this.fetchPaginatedCallIncremental('fetchFundingRateHistory', symbol, since, limit, params, 'page', 25);
|
|
266654
|
+
}
|
|
266655
|
+
let request = {};
|
|
265504
266656
|
if (symbol !== undefined) {
|
|
265505
266657
|
const market = this.market(symbol);
|
|
265506
266658
|
symbol = market['symbol'];
|
|
@@ -265509,6 +266661,7 @@ class woo extends _abstract_woo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
265509
266661
|
if (since !== undefined) {
|
|
265510
266662
|
request['start_t'] = this.parseToInt(since / 1000);
|
|
265511
266663
|
}
|
|
266664
|
+
[request, params] = this.handleUntilOption('end_t', request, params, 0.001);
|
|
265512
266665
|
const response = await this.v1PublicGetFundingRateHistory(this.extend(request, params));
|
|
265513
266666
|
//
|
|
265514
266667
|
// {
|
|
@@ -274917,39 +276070,39 @@ var __webpack_exports__ = {};
|
|
|
274917
276070
|
(() => {
|
|
274918
276071
|
__webpack_require__.r(__webpack_exports__);
|
|
274919
276072
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
274920
|
-
/* harmony export */ "AccountNotEnabled": () => (/* reexport safe */
|
|
274921
|
-
/* harmony export */ "AccountSuspended": () => (/* reexport safe */
|
|
274922
|
-
/* harmony export */ "AddressPending": () => (/* reexport safe */
|
|
274923
|
-
/* harmony export */ "ArgumentsRequired": () => (/* reexport safe */
|
|
274924
|
-
/* harmony export */ "AuthenticationError": () => (/* reexport safe */
|
|
274925
|
-
/* harmony export */ "BadRequest": () => (/* reexport safe */
|
|
274926
|
-
/* harmony export */ "BadResponse": () => (/* reexport safe */
|
|
274927
|
-
/* harmony export */ "BadSymbol": () => (/* reexport safe */
|
|
274928
|
-
/* harmony export */ "BaseError": () => (/* reexport safe */
|
|
274929
|
-
/* harmony export */ "CancelPending": () => (/* reexport safe */
|
|
274930
|
-
/* harmony export */ "DDoSProtection": () => (/* reexport safe */
|
|
274931
|
-
/* harmony export */ "DuplicateOrderId": () => (/* reexport safe */
|
|
276073
|
+
/* harmony export */ "AccountNotEnabled": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.AccountNotEnabled),
|
|
276074
|
+
/* harmony export */ "AccountSuspended": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.AccountSuspended),
|
|
276075
|
+
/* harmony export */ "AddressPending": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.AddressPending),
|
|
276076
|
+
/* harmony export */ "ArgumentsRequired": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.ArgumentsRequired),
|
|
276077
|
+
/* harmony export */ "AuthenticationError": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.AuthenticationError),
|
|
276078
|
+
/* harmony export */ "BadRequest": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.BadRequest),
|
|
276079
|
+
/* harmony export */ "BadResponse": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.BadResponse),
|
|
276080
|
+
/* harmony export */ "BadSymbol": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.BadSymbol),
|
|
276081
|
+
/* harmony export */ "BaseError": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.BaseError),
|
|
276082
|
+
/* harmony export */ "CancelPending": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.CancelPending),
|
|
276083
|
+
/* harmony export */ "DDoSProtection": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.DDoSProtection),
|
|
276084
|
+
/* harmony export */ "DuplicateOrderId": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.DuplicateOrderId),
|
|
274932
276085
|
/* harmony export */ "Exchange": () => (/* reexport safe */ _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__.e),
|
|
274933
|
-
/* harmony export */ "ExchangeError": () => (/* reexport safe */
|
|
274934
|
-
/* harmony export */ "ExchangeNotAvailable": () => (/* reexport safe */
|
|
274935
|
-
/* harmony export */ "InsufficientFunds": () => (/* reexport safe */
|
|
274936
|
-
/* harmony export */ "InvalidAddress": () => (/* reexport safe */
|
|
274937
|
-
/* harmony export */ "InvalidNonce": () => (/* reexport safe */
|
|
274938
|
-
/* harmony export */ "InvalidOrder": () => (/* reexport safe */
|
|
274939
|
-
/* harmony export */ "MarginModeAlreadySet": () => (/* reexport safe */
|
|
274940
|
-
/* harmony export */ "NetworkError": () => (/* reexport safe */
|
|
274941
|
-
/* harmony export */ "NoChange": () => (/* reexport safe */
|
|
274942
|
-
/* harmony export */ "NotSupported": () => (/* reexport safe */
|
|
274943
|
-
/* harmony export */ "NullResponse": () => (/* reexport safe */
|
|
274944
|
-
/* harmony export */ "OnMaintenance": () => (/* reexport safe */
|
|
274945
|
-
/* harmony export */ "OrderImmediatelyFillable": () => (/* reexport safe */
|
|
274946
|
-
/* harmony export */ "OrderNotCached": () => (/* reexport safe */
|
|
274947
|
-
/* harmony export */ "OrderNotFillable": () => (/* reexport safe */
|
|
274948
|
-
/* harmony export */ "OrderNotFound": () => (/* reexport safe */
|
|
274949
|
-
/* harmony export */ "PermissionDenied": () => (/* reexport safe */
|
|
274950
|
-
/* harmony export */ "Precise": () => (/* reexport safe */
|
|
274951
|
-
/* harmony export */ "RateLimitExceeded": () => (/* reexport safe */
|
|
274952
|
-
/* harmony export */ "RequestTimeout": () => (/* reexport safe */
|
|
276086
|
+
/* harmony export */ "ExchangeError": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.ExchangeError),
|
|
276087
|
+
/* harmony export */ "ExchangeNotAvailable": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.ExchangeNotAvailable),
|
|
276088
|
+
/* harmony export */ "InsufficientFunds": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.InsufficientFunds),
|
|
276089
|
+
/* harmony export */ "InvalidAddress": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.InvalidAddress),
|
|
276090
|
+
/* harmony export */ "InvalidNonce": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.InvalidNonce),
|
|
276091
|
+
/* harmony export */ "InvalidOrder": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.InvalidOrder),
|
|
276092
|
+
/* harmony export */ "MarginModeAlreadySet": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.MarginModeAlreadySet),
|
|
276093
|
+
/* harmony export */ "NetworkError": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.NetworkError),
|
|
276094
|
+
/* harmony export */ "NoChange": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.NoChange),
|
|
276095
|
+
/* harmony export */ "NotSupported": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.NotSupported),
|
|
276096
|
+
/* harmony export */ "NullResponse": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.NullResponse),
|
|
276097
|
+
/* harmony export */ "OnMaintenance": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.OnMaintenance),
|
|
276098
|
+
/* harmony export */ "OrderImmediatelyFillable": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.OrderImmediatelyFillable),
|
|
276099
|
+
/* harmony export */ "OrderNotCached": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.OrderNotCached),
|
|
276100
|
+
/* harmony export */ "OrderNotFillable": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.OrderNotFillable),
|
|
276101
|
+
/* harmony export */ "OrderNotFound": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.OrderNotFound),
|
|
276102
|
+
/* harmony export */ "PermissionDenied": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.PermissionDenied),
|
|
276103
|
+
/* harmony export */ "Precise": () => (/* reexport safe */ _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_166__.O),
|
|
276104
|
+
/* harmony export */ "RateLimitExceeded": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.RateLimitExceeded),
|
|
276105
|
+
/* harmony export */ "RequestTimeout": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__.RequestTimeout),
|
|
274953
276106
|
/* harmony export */ "ace": () => (/* reexport safe */ _src_ace_js__WEBPACK_IMPORTED_MODULE_1__.Z),
|
|
274954
276107
|
/* harmony export */ "alpaca": () => (/* reexport safe */ _src_alpaca_js__WEBPACK_IMPORTED_MODULE_2__.Z),
|
|
274955
276108
|
/* harmony export */ "ascendex": () => (/* reexport safe */ _src_ascendex_js__WEBPACK_IMPORTED_MODULE_3__.Z),
|
|
@@ -275006,11 +276159,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
275006
276159
|
/* harmony export */ "delta": () => (/* reexport safe */ _src_delta_js__WEBPACK_IMPORTED_MODULE_53__.Z),
|
|
275007
276160
|
/* harmony export */ "deribit": () => (/* reexport safe */ _src_deribit_js__WEBPACK_IMPORTED_MODULE_54__.Z),
|
|
275008
276161
|
/* harmony export */ "digifinex": () => (/* reexport safe */ _src_digifinex_js__WEBPACK_IMPORTED_MODULE_55__.Z),
|
|
275009
|
-
/* harmony export */ "errors": () => (/* reexport module object */
|
|
276162
|
+
/* harmony export */ "errors": () => (/* reexport module object */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__),
|
|
275010
276163
|
/* harmony export */ "exchanges": () => (/* binding */ exchanges),
|
|
275011
276164
|
/* harmony export */ "exmo": () => (/* reexport safe */ _src_exmo_js__WEBPACK_IMPORTED_MODULE_56__.Z),
|
|
275012
276165
|
/* harmony export */ "fmfwio": () => (/* reexport safe */ _src_fmfwio_js__WEBPACK_IMPORTED_MODULE_57__.Z),
|
|
275013
|
-
/* harmony export */ "functions": () => (/* reexport module object */
|
|
276166
|
+
/* harmony export */ "functions": () => (/* reexport module object */ _src_base_functions_js__WEBPACK_IMPORTED_MODULE_167__),
|
|
275014
276167
|
/* harmony export */ "gate": () => (/* reexport safe */ _src_gate_js__WEBPACK_IMPORTED_MODULE_58__.Z),
|
|
275015
276168
|
/* harmony export */ "gateio": () => (/* reexport safe */ _src_gateio_js__WEBPACK_IMPORTED_MODULE_59__.Z),
|
|
275016
276169
|
/* harmony export */ "gemini": () => (/* reexport safe */ _src_gemini_js__WEBPACK_IMPORTED_MODULE_60__.Z),
|
|
@@ -275063,9 +276216,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
275063
276216
|
/* harmony export */ "zonda": () => (/* reexport safe */ _src_zonda_js__WEBPACK_IMPORTED_MODULE_105__.Z)
|
|
275064
276217
|
/* harmony export */ });
|
|
275065
276218
|
/* harmony import */ var _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3043);
|
|
275066
|
-
/* harmony import */ var
|
|
275067
|
-
/* harmony import */ var
|
|
275068
|
-
/* harmony import */ var
|
|
276219
|
+
/* harmony import */ var _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_166__ = __webpack_require__(2194);
|
|
276220
|
+
/* harmony import */ var _src_base_functions_js__WEBPACK_IMPORTED_MODULE_167__ = __webpack_require__(7100);
|
|
276221
|
+
/* harmony import */ var _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__ = __webpack_require__(6689);
|
|
275069
276222
|
/* harmony import */ var _src_ace_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9869);
|
|
275070
276223
|
/* harmony import */ var _src_alpaca_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5660);
|
|
275071
276224
|
/* harmony import */ var _src_ascendex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9612);
|
|
@@ -275178,58 +276331,59 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
275178
276331
|
/* harmony import */ var _src_pro_binancecoinm_js__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(5078);
|
|
275179
276332
|
/* harmony import */ var _src_pro_binanceus_js__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(1326);
|
|
275180
276333
|
/* harmony import */ var _src_pro_binanceusdm_js__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(1230);
|
|
275181
|
-
/* harmony import */ var
|
|
275182
|
-
/* harmony import */ var
|
|
275183
|
-
/* harmony import */ var
|
|
275184
|
-
/* harmony import */ var
|
|
275185
|
-
/* harmony import */ var
|
|
275186
|
-
/* harmony import */ var
|
|
275187
|
-
/* harmony import */ var
|
|
275188
|
-
/* harmony import */ var
|
|
275189
|
-
/* harmony import */ var
|
|
275190
|
-
/* harmony import */ var
|
|
275191
|
-
/* harmony import */ var
|
|
275192
|
-
/* harmony import */ var
|
|
275193
|
-
/* harmony import */ var
|
|
275194
|
-
/* harmony import */ var
|
|
275195
|
-
/* harmony import */ var
|
|
275196
|
-
/* harmony import */ var
|
|
275197
|
-
/* harmony import */ var
|
|
275198
|
-
/* harmony import */ var
|
|
275199
|
-
/* harmony import */ var
|
|
275200
|
-
/* harmony import */ var
|
|
275201
|
-
/* harmony import */ var
|
|
275202
|
-
/* harmony import */ var
|
|
275203
|
-
/* harmony import */ var
|
|
275204
|
-
/* harmony import */ var
|
|
275205
|
-
/* harmony import */ var
|
|
275206
|
-
/* harmony import */ var
|
|
275207
|
-
/* harmony import */ var
|
|
275208
|
-
/* harmony import */ var
|
|
275209
|
-
/* harmony import */ var
|
|
275210
|
-
/* harmony import */ var
|
|
275211
|
-
/* harmony import */ var
|
|
275212
|
-
/* harmony import */ var
|
|
275213
|
-
/* harmony import */ var
|
|
275214
|
-
/* harmony import */ var
|
|
275215
|
-
/* harmony import */ var
|
|
275216
|
-
/* harmony import */ var
|
|
275217
|
-
/* harmony import */ var
|
|
275218
|
-
/* harmony import */ var
|
|
275219
|
-
/* harmony import */ var
|
|
275220
|
-
/* harmony import */ var
|
|
275221
|
-
/* harmony import */ var
|
|
275222
|
-
/* harmony import */ var
|
|
275223
|
-
/* harmony import */ var
|
|
275224
|
-
/* harmony import */ var
|
|
275225
|
-
/* harmony import */ var
|
|
275226
|
-
/* harmony import */ var
|
|
275227
|
-
/* harmony import */ var
|
|
275228
|
-
/* harmony import */ var
|
|
275229
|
-
/* harmony import */ var
|
|
275230
|
-
/* harmony import */ var
|
|
275231
|
-
/* harmony import */ var
|
|
275232
|
-
/* harmony import */ var
|
|
276334
|
+
/* harmony import */ var _src_pro_bingx_js__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(6955);
|
|
276335
|
+
/* harmony import */ var _src_pro_bitcoincom_js__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(453);
|
|
276336
|
+
/* harmony import */ var _src_pro_bitfinex_js__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(9772);
|
|
276337
|
+
/* harmony import */ var _src_pro_bitfinex2_js__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(588);
|
|
276338
|
+
/* harmony import */ var _src_pro_bitget_js__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(1885);
|
|
276339
|
+
/* harmony import */ var _src_pro_bitmart_js__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(7504);
|
|
276340
|
+
/* harmony import */ var _src_pro_bitmex_js__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(2302);
|
|
276341
|
+
/* harmony import */ var _src_pro_bitopro_js__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(2191);
|
|
276342
|
+
/* harmony import */ var _src_pro_bitpanda_js__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(1297);
|
|
276343
|
+
/* harmony import */ var _src_pro_bitrue_js__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(3005);
|
|
276344
|
+
/* harmony import */ var _src_pro_bitstamp_js__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(3623);
|
|
276345
|
+
/* harmony import */ var _src_pro_bittrex_js__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(2883);
|
|
276346
|
+
/* harmony import */ var _src_pro_bitvavo_js__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__(6977);
|
|
276347
|
+
/* harmony import */ var _src_pro_blockchaincom_js__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(2519);
|
|
276348
|
+
/* harmony import */ var _src_pro_bybit_js__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(5030);
|
|
276349
|
+
/* harmony import */ var _src_pro_cex_js__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(5272);
|
|
276350
|
+
/* harmony import */ var _src_pro_coinbase_js__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(3414);
|
|
276351
|
+
/* harmony import */ var _src_pro_coinbaseprime_js__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__(3848);
|
|
276352
|
+
/* harmony import */ var _src_pro_coinbasepro_js__WEBPACK_IMPORTED_MODULE_131__ = __webpack_require__(8368);
|
|
276353
|
+
/* harmony import */ var _src_pro_coinex_js__WEBPACK_IMPORTED_MODULE_132__ = __webpack_require__(204);
|
|
276354
|
+
/* harmony import */ var _src_pro_cryptocom_js__WEBPACK_IMPORTED_MODULE_133__ = __webpack_require__(6820);
|
|
276355
|
+
/* harmony import */ var _src_pro_currencycom_js__WEBPACK_IMPORTED_MODULE_134__ = __webpack_require__(2952);
|
|
276356
|
+
/* harmony import */ var _src_pro_deribit_js__WEBPACK_IMPORTED_MODULE_135__ = __webpack_require__(1788);
|
|
276357
|
+
/* harmony import */ var _src_pro_exmo_js__WEBPACK_IMPORTED_MODULE_136__ = __webpack_require__(9004);
|
|
276358
|
+
/* harmony import */ var _src_pro_gate_js__WEBPACK_IMPORTED_MODULE_137__ = __webpack_require__(8335);
|
|
276359
|
+
/* harmony import */ var _src_pro_gateio_js__WEBPACK_IMPORTED_MODULE_138__ = __webpack_require__(1465);
|
|
276360
|
+
/* harmony import */ var _src_pro_gemini_js__WEBPACK_IMPORTED_MODULE_139__ = __webpack_require__(9488);
|
|
276361
|
+
/* harmony import */ var _src_pro_hitbtc_js__WEBPACK_IMPORTED_MODULE_140__ = __webpack_require__(5189);
|
|
276362
|
+
/* harmony import */ var _src_pro_hollaex_js__WEBPACK_IMPORTED_MODULE_141__ = __webpack_require__(8559);
|
|
276363
|
+
/* harmony import */ var _src_pro_huobi_js__WEBPACK_IMPORTED_MODULE_142__ = __webpack_require__(8384);
|
|
276364
|
+
/* harmony import */ var _src_pro_huobijp_js__WEBPACK_IMPORTED_MODULE_143__ = __webpack_require__(9021);
|
|
276365
|
+
/* harmony import */ var _src_pro_huobipro_js__WEBPACK_IMPORTED_MODULE_144__ = __webpack_require__(4625);
|
|
276366
|
+
/* harmony import */ var _src_pro_idex_js__WEBPACK_IMPORTED_MODULE_145__ = __webpack_require__(3484);
|
|
276367
|
+
/* harmony import */ var _src_pro_independentreserve_js__WEBPACK_IMPORTED_MODULE_146__ = __webpack_require__(1311);
|
|
276368
|
+
/* harmony import */ var _src_pro_kraken_js__WEBPACK_IMPORTED_MODULE_147__ = __webpack_require__(736);
|
|
276369
|
+
/* harmony import */ var _src_pro_krakenfutures_js__WEBPACK_IMPORTED_MODULE_148__ = __webpack_require__(449);
|
|
276370
|
+
/* harmony import */ var _src_pro_kucoin_js__WEBPACK_IMPORTED_MODULE_149__ = __webpack_require__(2387);
|
|
276371
|
+
/* harmony import */ var _src_pro_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_150__ = __webpack_require__(7181);
|
|
276372
|
+
/* harmony import */ var _src_pro_luno_js__WEBPACK_IMPORTED_MODULE_151__ = __webpack_require__(627);
|
|
276373
|
+
/* harmony import */ var _src_pro_mexc_js__WEBPACK_IMPORTED_MODULE_152__ = __webpack_require__(6484);
|
|
276374
|
+
/* harmony import */ var _src_pro_mexc3_js__WEBPACK_IMPORTED_MODULE_153__ = __webpack_require__(5351);
|
|
276375
|
+
/* harmony import */ var _src_pro_ndax_js__WEBPACK_IMPORTED_MODULE_154__ = __webpack_require__(8080);
|
|
276376
|
+
/* harmony import */ var _src_pro_okcoin_js__WEBPACK_IMPORTED_MODULE_155__ = __webpack_require__(7105);
|
|
276377
|
+
/* harmony import */ var _src_pro_okex_js__WEBPACK_IMPORTED_MODULE_156__ = __webpack_require__(1530);
|
|
276378
|
+
/* harmony import */ var _src_pro_okx_js__WEBPACK_IMPORTED_MODULE_157__ = __webpack_require__(2214);
|
|
276379
|
+
/* harmony import */ var _src_pro_phemex_js__WEBPACK_IMPORTED_MODULE_158__ = __webpack_require__(4360);
|
|
276380
|
+
/* harmony import */ var _src_pro_poloniex_js__WEBPACK_IMPORTED_MODULE_159__ = __webpack_require__(7924);
|
|
276381
|
+
/* harmony import */ var _src_pro_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_160__ = __webpack_require__(3541);
|
|
276382
|
+
/* harmony import */ var _src_pro_probit_js__WEBPACK_IMPORTED_MODULE_161__ = __webpack_require__(9782);
|
|
276383
|
+
/* harmony import */ var _src_pro_upbit_js__WEBPACK_IMPORTED_MODULE_162__ = __webpack_require__(7614);
|
|
276384
|
+
/* harmony import */ var _src_pro_wazirx_js__WEBPACK_IMPORTED_MODULE_163__ = __webpack_require__(4828);
|
|
276385
|
+
/* harmony import */ var _src_pro_whitebit_js__WEBPACK_IMPORTED_MODULE_164__ = __webpack_require__(5630);
|
|
276386
|
+
/* harmony import */ var _src_pro_woo_js__WEBPACK_IMPORTED_MODULE_165__ = __webpack_require__(3910);
|
|
275233
276387
|
/*
|
|
275234
276388
|
|
|
275235
276389
|
MIT License
|
|
@@ -275264,7 +276418,7 @@ SOFTWARE.
|
|
|
275264
276418
|
|
|
275265
276419
|
//-----------------------------------------------------------------------------
|
|
275266
276420
|
// this is updated by vss.js when building
|
|
275267
|
-
const version = '4.1.
|
|
276421
|
+
const version = '4.1.10';
|
|
275268
276422
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
|
|
275269
276423
|
//-----------------------------------------------------------------------------
|
|
275270
276424
|
|
|
@@ -275430,6 +276584,7 @@ _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e
|
|
|
275430
276584
|
|
|
275431
276585
|
|
|
275432
276586
|
|
|
276587
|
+
|
|
275433
276588
|
|
|
275434
276589
|
|
|
275435
276590
|
const exchanges = {
|
|
@@ -275547,58 +276702,59 @@ const pro = {
|
|
|
275547
276702
|
'binancecoinm': _src_pro_binancecoinm_js__WEBPACK_IMPORTED_MODULE_110__/* ["default"] */ .Z,
|
|
275548
276703
|
'binanceus': _src_pro_binanceus_js__WEBPACK_IMPORTED_MODULE_111__/* ["default"] */ .Z,
|
|
275549
276704
|
'binanceusdm': _src_pro_binanceusdm_js__WEBPACK_IMPORTED_MODULE_112__/* ["default"] */ .Z,
|
|
275550
|
-
'
|
|
275551
|
-
'
|
|
275552
|
-
'
|
|
275553
|
-
'
|
|
275554
|
-
'
|
|
275555
|
-
'
|
|
275556
|
-
'
|
|
275557
|
-
'
|
|
275558
|
-
'
|
|
275559
|
-
'
|
|
275560
|
-
'
|
|
275561
|
-
'
|
|
275562
|
-
'
|
|
275563
|
-
'
|
|
275564
|
-
'
|
|
275565
|
-
'
|
|
275566
|
-
'
|
|
275567
|
-
'
|
|
275568
|
-
'
|
|
275569
|
-
'
|
|
275570
|
-
'
|
|
275571
|
-
'
|
|
275572
|
-
'
|
|
275573
|
-
'
|
|
275574
|
-
'
|
|
275575
|
-
'
|
|
275576
|
-
'
|
|
275577
|
-
'
|
|
275578
|
-
'
|
|
275579
|
-
'
|
|
275580
|
-
'
|
|
275581
|
-
'
|
|
275582
|
-
'
|
|
275583
|
-
'
|
|
275584
|
-
'
|
|
275585
|
-
'
|
|
275586
|
-
'
|
|
275587
|
-
'
|
|
275588
|
-
'
|
|
275589
|
-
'
|
|
275590
|
-
'
|
|
275591
|
-
'
|
|
275592
|
-
'
|
|
275593
|
-
'
|
|
275594
|
-
'
|
|
275595
|
-
'
|
|
275596
|
-
'
|
|
275597
|
-
'
|
|
275598
|
-
'
|
|
275599
|
-
'
|
|
275600
|
-
'
|
|
275601
|
-
'
|
|
276705
|
+
'bingx': _src_pro_bingx_js__WEBPACK_IMPORTED_MODULE_113__/* ["default"] */ .Z,
|
|
276706
|
+
'bitcoincom': _src_pro_bitcoincom_js__WEBPACK_IMPORTED_MODULE_114__/* ["default"] */ .Z,
|
|
276707
|
+
'bitfinex': _src_pro_bitfinex_js__WEBPACK_IMPORTED_MODULE_115__/* ["default"] */ .Z,
|
|
276708
|
+
'bitfinex2': _src_pro_bitfinex2_js__WEBPACK_IMPORTED_MODULE_116__/* ["default"] */ .Z,
|
|
276709
|
+
'bitget': _src_pro_bitget_js__WEBPACK_IMPORTED_MODULE_117__/* ["default"] */ .Z,
|
|
276710
|
+
'bitmart': _src_pro_bitmart_js__WEBPACK_IMPORTED_MODULE_118__/* ["default"] */ .Z,
|
|
276711
|
+
'bitmex': _src_pro_bitmex_js__WEBPACK_IMPORTED_MODULE_119__/* ["default"] */ .Z,
|
|
276712
|
+
'bitopro': _src_pro_bitopro_js__WEBPACK_IMPORTED_MODULE_120__/* ["default"] */ .Z,
|
|
276713
|
+
'bitpanda': _src_pro_bitpanda_js__WEBPACK_IMPORTED_MODULE_121__/* ["default"] */ .Z,
|
|
276714
|
+
'bitrue': _src_pro_bitrue_js__WEBPACK_IMPORTED_MODULE_122__/* ["default"] */ .Z,
|
|
276715
|
+
'bitstamp': _src_pro_bitstamp_js__WEBPACK_IMPORTED_MODULE_123__/* ["default"] */ .Z,
|
|
276716
|
+
'bittrex': _src_pro_bittrex_js__WEBPACK_IMPORTED_MODULE_124__/* ["default"] */ .Z,
|
|
276717
|
+
'bitvavo': _src_pro_bitvavo_js__WEBPACK_IMPORTED_MODULE_125__/* ["default"] */ .Z,
|
|
276718
|
+
'blockchaincom': _src_pro_blockchaincom_js__WEBPACK_IMPORTED_MODULE_126__/* ["default"] */ .Z,
|
|
276719
|
+
'bybit': _src_pro_bybit_js__WEBPACK_IMPORTED_MODULE_127__/* ["default"] */ .Z,
|
|
276720
|
+
'cex': _src_pro_cex_js__WEBPACK_IMPORTED_MODULE_128__/* ["default"] */ .Z,
|
|
276721
|
+
'coinbase': _src_pro_coinbase_js__WEBPACK_IMPORTED_MODULE_129__/* ["default"] */ .Z,
|
|
276722
|
+
'coinbaseprime': _src_pro_coinbaseprime_js__WEBPACK_IMPORTED_MODULE_130__/* ["default"] */ .Z,
|
|
276723
|
+
'coinbasepro': _src_pro_coinbasepro_js__WEBPACK_IMPORTED_MODULE_131__/* ["default"] */ .Z,
|
|
276724
|
+
'coinex': _src_pro_coinex_js__WEBPACK_IMPORTED_MODULE_132__/* ["default"] */ .Z,
|
|
276725
|
+
'cryptocom': _src_pro_cryptocom_js__WEBPACK_IMPORTED_MODULE_133__/* ["default"] */ .Z,
|
|
276726
|
+
'currencycom': _src_pro_currencycom_js__WEBPACK_IMPORTED_MODULE_134__/* ["default"] */ .Z,
|
|
276727
|
+
'deribit': _src_pro_deribit_js__WEBPACK_IMPORTED_MODULE_135__/* ["default"] */ .Z,
|
|
276728
|
+
'exmo': _src_pro_exmo_js__WEBPACK_IMPORTED_MODULE_136__/* ["default"] */ .Z,
|
|
276729
|
+
'gate': _src_pro_gate_js__WEBPACK_IMPORTED_MODULE_137__/* ["default"] */ .Z,
|
|
276730
|
+
'gateio': _src_pro_gateio_js__WEBPACK_IMPORTED_MODULE_138__/* ["default"] */ .Z,
|
|
276731
|
+
'gemini': _src_pro_gemini_js__WEBPACK_IMPORTED_MODULE_139__/* ["default"] */ .Z,
|
|
276732
|
+
'hitbtc': _src_pro_hitbtc_js__WEBPACK_IMPORTED_MODULE_140__/* ["default"] */ .Z,
|
|
276733
|
+
'hollaex': _src_pro_hollaex_js__WEBPACK_IMPORTED_MODULE_141__/* ["default"] */ .Z,
|
|
276734
|
+
'huobi': _src_pro_huobi_js__WEBPACK_IMPORTED_MODULE_142__/* ["default"] */ .Z,
|
|
276735
|
+
'huobijp': _src_pro_huobijp_js__WEBPACK_IMPORTED_MODULE_143__/* ["default"] */ .Z,
|
|
276736
|
+
'huobipro': _src_pro_huobipro_js__WEBPACK_IMPORTED_MODULE_144__/* ["default"] */ .Z,
|
|
276737
|
+
'idex': _src_pro_idex_js__WEBPACK_IMPORTED_MODULE_145__/* ["default"] */ .Z,
|
|
276738
|
+
'independentreserve': _src_pro_independentreserve_js__WEBPACK_IMPORTED_MODULE_146__/* ["default"] */ .Z,
|
|
276739
|
+
'kraken': _src_pro_kraken_js__WEBPACK_IMPORTED_MODULE_147__/* ["default"] */ .Z,
|
|
276740
|
+
'krakenfutures': _src_pro_krakenfutures_js__WEBPACK_IMPORTED_MODULE_148__/* ["default"] */ .Z,
|
|
276741
|
+
'kucoin': _src_pro_kucoin_js__WEBPACK_IMPORTED_MODULE_149__/* ["default"] */ .Z,
|
|
276742
|
+
'kucoinfutures': _src_pro_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_150__/* ["default"] */ .Z,
|
|
276743
|
+
'luno': _src_pro_luno_js__WEBPACK_IMPORTED_MODULE_151__/* ["default"] */ .Z,
|
|
276744
|
+
'mexc': _src_pro_mexc_js__WEBPACK_IMPORTED_MODULE_152__/* ["default"] */ .Z,
|
|
276745
|
+
'mexc3': _src_pro_mexc3_js__WEBPACK_IMPORTED_MODULE_153__/* ["default"] */ .Z,
|
|
276746
|
+
'ndax': _src_pro_ndax_js__WEBPACK_IMPORTED_MODULE_154__/* ["default"] */ .Z,
|
|
276747
|
+
'okcoin': _src_pro_okcoin_js__WEBPACK_IMPORTED_MODULE_155__/* ["default"] */ .Z,
|
|
276748
|
+
'okex': _src_pro_okex_js__WEBPACK_IMPORTED_MODULE_156__/* ["default"] */ .Z,
|
|
276749
|
+
'okx': _src_pro_okx_js__WEBPACK_IMPORTED_MODULE_157__/* ["default"] */ .Z,
|
|
276750
|
+
'phemex': _src_pro_phemex_js__WEBPACK_IMPORTED_MODULE_158__/* ["default"] */ .Z,
|
|
276751
|
+
'poloniex': _src_pro_poloniex_js__WEBPACK_IMPORTED_MODULE_159__/* ["default"] */ .Z,
|
|
276752
|
+
'poloniexfutures': _src_pro_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_160__/* ["default"] */ .Z,
|
|
276753
|
+
'probit': _src_pro_probit_js__WEBPACK_IMPORTED_MODULE_161__/* ["default"] */ .Z,
|
|
276754
|
+
'upbit': _src_pro_upbit_js__WEBPACK_IMPORTED_MODULE_162__/* ["default"] */ .Z,
|
|
276755
|
+
'wazirx': _src_pro_wazirx_js__WEBPACK_IMPORTED_MODULE_163__/* ["default"] */ .Z,
|
|
276756
|
+
'whitebit': _src_pro_whitebit_js__WEBPACK_IMPORTED_MODULE_164__/* ["default"] */ .Z,
|
|
276757
|
+
'woo': _src_pro_woo_js__WEBPACK_IMPORTED_MODULE_165__/* ["default"] */ .Z,
|
|
275602
276758
|
};
|
|
275603
276759
|
for (const exchange in pro) {
|
|
275604
276760
|
// const ccxtExchange = exchanges[exchange]
|
|
@@ -275611,7 +276767,7 @@ for (const exchange in pro) {
|
|
|
275611
276767
|
pro.exchanges = Object.keys(pro);
|
|
275612
276768
|
pro['Exchange'] = _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e; // now the same for rest and ts
|
|
275613
276769
|
//-----------------------------------------------------------------------------
|
|
275614
|
-
const ccxt = Object.assign({ version, Exchange: _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e, Precise:
|
|
276770
|
+
const ccxt = Object.assign({ version, Exchange: _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e, Precise: _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_166__/* .Precise */ .O, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, _src_base_functions_js__WEBPACK_IMPORTED_MODULE_167__, _src_base_errors_js__WEBPACK_IMPORTED_MODULE_168__);
|
|
275615
276771
|
|
|
275616
276772
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ccxt);
|
|
275617
276773
|
//-----------------------------------------------------------------------------
|