ccxt 4.5.44 → 4.5.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -12
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -12
- package/dist/cjs/src/abstract/kucoinfutures.js +1 -1
- package/dist/cjs/src/base/Exchange.js +39 -3
- package/dist/cjs/src/base/functions/encode.js +2 -2
- package/dist/cjs/src/base/functions/generic.js +8 -2
- package/dist/cjs/src/binance.js +11 -2
- package/dist/cjs/src/bitget.js +3 -1
- package/dist/cjs/src/bitmart.js +144 -21
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bitteam.js +1 -1
- package/dist/cjs/src/btcbox.js +1 -1
- package/dist/cjs/src/bybit.js +58 -56
- package/dist/cjs/src/bydfi.js +102 -100
- package/dist/cjs/src/cex.js +1 -0
- package/dist/cjs/src/gate.js +264 -170
- package/dist/cjs/src/grvt.js +3 -2
- package/dist/cjs/src/hyperliquid.js +16 -5
- package/dist/cjs/src/kraken.js +4 -2
- package/dist/cjs/src/krakenfutures.js +1 -5
- package/dist/cjs/src/kucoin.js +4733 -972
- package/dist/cjs/src/kucoinfutures.js +14 -3434
- package/dist/cjs/src/lbank.js +1 -1
- package/dist/cjs/src/okx.js +75 -57
- package/dist/cjs/src/paradex.js +2 -6
- package/dist/cjs/src/poloniex.js +1 -1
- package/dist/cjs/src/pro/bydfi.js +19 -19
- package/dist/cjs/src/pro/gate.js +114 -53
- package/dist/cjs/src/pro/grvt.js +5 -3
- package/dist/cjs/src/pro/htx.js +4 -4
- package/dist/cjs/src/pro/kucoin.js +819 -178
- package/dist/cjs/src/pro/kucoinfutures.js +95 -1261
- package/dist/cjs/src/pro/mexc.js +10 -5
- package/dist/cjs/src/pro/okx.js +85 -40
- package/index.d.cts +2 -0
- package/js/ccxt.d.ts +2 -14
- package/js/ccxt.js +2 -10
- package/js/src/abstract/bitmart.d.ts +7 -0
- package/js/src/abstract/bydfi.d.ts +29 -29
- package/js/src/abstract/kraken.d.ts +1 -0
- package/js/src/abstract/kucoin.d.ts +46 -2
- package/js/src/abstract/kucoinfutures.d.ts +27 -11
- package/js/src/base/Exchange.d.ts +13 -1
- package/js/src/base/Exchange.js +39 -3
- package/js/src/base/functions/encode.js +2 -2
- package/js/src/base/functions/generic.js +9 -3
- package/js/src/binance.js +11 -2
- package/js/src/bitget.js +3 -1
- package/js/src/bitmart.d.ts +18 -4
- package/js/src/bitmart.js +144 -21
- package/js/src/bitrue.js +1 -1
- package/js/src/bitteam.js +1 -1
- package/js/src/btcbox.js +1 -1
- package/js/src/bybit.d.ts +1 -0
- package/js/src/bybit.js +58 -56
- package/js/src/bydfi.d.ts +31 -31
- package/js/src/bydfi.js +102 -100
- package/js/src/cex.js +2 -1
- package/js/src/gate.d.ts +125 -119
- package/js/src/gate.js +264 -170
- package/js/src/grvt.js +3 -2
- package/js/src/hyperliquid.d.ts +3 -1
- package/js/src/hyperliquid.js +16 -5
- package/js/src/kraken.js +4 -2
- package/js/src/krakenfutures.js +1 -5
- package/js/src/kucoin.d.ts +696 -100
- package/js/src/kucoin.js +4734 -973
- package/js/src/kucoinfutures.d.ts +4 -522
- package/js/src/kucoinfutures.js +14 -3434
- package/js/src/lbank.js +1 -1
- package/js/src/okx.d.ts +1 -0
- package/js/src/okx.js +75 -57
- package/js/src/paradex.d.ts +0 -1
- package/js/src/paradex.js +2 -6
- package/js/src/poloniex.js +1 -1
- package/js/src/pro/bydfi.d.ts +18 -18
- package/js/src/pro/bydfi.js +19 -19
- package/js/src/pro/gate.d.ts +30 -1
- package/js/src/pro/gate.js +114 -53
- package/js/src/pro/grvt.js +5 -3
- package/js/src/pro/htx.js +4 -4
- package/js/src/pro/kucoin.d.ts +70 -30
- package/js/src/pro/kucoin.js +821 -180
- package/js/src/pro/kucoinfutures.d.ts +17 -195
- package/js/src/pro/kucoinfutures.js +96 -1262
- package/js/src/pro/mexc.js +10 -5
- package/js/src/pro/okx.d.ts +1 -0
- package/js/src/pro/okx.js +85 -40
- package/package.json +2 -2
- package/dist/cjs/src/abstract/alp.js +0 -11
- package/dist/cjs/src/abstract/defx.js +0 -11
- package/dist/cjs/src/abstract/timex.js +0 -11
- package/dist/cjs/src/alp.js +0 -1059
- package/dist/cjs/src/defx.js +0 -2142
- package/dist/cjs/src/pro/defx.js +0 -866
- package/dist/cjs/src/timex.js +0 -1793
- package/js/src/abstract/alp.d.ts +0 -21
- package/js/src/abstract/alp.js +0 -5
- package/js/src/abstract/defx.d.ts +0 -72
- package/js/src/abstract/defx.js +0 -5
- package/js/src/abstract/timex.d.ts +0 -65
- package/js/src/abstract/timex.js +0 -5
- package/js/src/alp.d.ts +0 -209
- package/js/src/alp.js +0 -1052
- package/js/src/defx.d.ts +0 -348
- package/js/src/defx.js +0 -2135
- package/js/src/pro/defx.d.ts +0 -236
- package/js/src/pro/defx.js +0 -859
- package/js/src/timex.d.ts +0 -247
- package/js/src/timex.js +0 -1786
package/dist/cjs/src/bydfi.js
CHANGED
|
@@ -201,16 +201,16 @@ class bydfi extends bydfi$1["default"] {
|
|
|
201
201
|
'public': {
|
|
202
202
|
'get': {
|
|
203
203
|
'v1/public/api_limits': 1,
|
|
204
|
-
'v1/
|
|
205
|
-
'v1/
|
|
206
|
-
'v1/
|
|
207
|
-
'v1/
|
|
208
|
-
'v1/
|
|
209
|
-
'v1/
|
|
210
|
-
'v1/
|
|
211
|
-
'v1/
|
|
212
|
-
'v1/
|
|
213
|
-
'v1/
|
|
204
|
+
'v1/fapi/market/exchange_info': 1,
|
|
205
|
+
'v1/fapi/market/depth': 1,
|
|
206
|
+
'v1/fapi/market/trades': 1,
|
|
207
|
+
'v1/fapi/market/klines': 1,
|
|
208
|
+
'v1/fapi/market/ticker/24hr': 1,
|
|
209
|
+
'v1/fapi/market/ticker/price': 1,
|
|
210
|
+
'v1/fapi/market/mark_price': 1,
|
|
211
|
+
'v1/fapi/market/funding_rate': 1,
|
|
212
|
+
'v1/fapi/market/funding_rate_history': 1,
|
|
213
|
+
'v1/fapi/market/risk_limit': 1, // https://developers.bydfi.com/en/futures/market#risk-limit
|
|
214
214
|
},
|
|
215
215
|
},
|
|
216
216
|
'private': {
|
|
@@ -219,16 +219,16 @@ class bydfi extends bydfi$1["default"] {
|
|
|
219
219
|
'v1/account/transfer_records': 1,
|
|
220
220
|
'v1/spot/deposit_records': 1,
|
|
221
221
|
'v1/spot/withdraw_records': 1,
|
|
222
|
-
'v1/
|
|
223
|
-
'v1/
|
|
224
|
-
'v1/
|
|
225
|
-
'v1/
|
|
226
|
-
'v1/
|
|
227
|
-
'v1/
|
|
228
|
-
'v1/
|
|
229
|
-
'v1/
|
|
230
|
-
'v1/
|
|
231
|
-
'v1/
|
|
222
|
+
'v1/fapi/trade/open_order': 1,
|
|
223
|
+
'v1/fapi/trade/plan_order': 1,
|
|
224
|
+
'v1/fapi/trade/leverage': 1,
|
|
225
|
+
'v1/fapi/trade/history_order': 1,
|
|
226
|
+
'v1/fapi/trade/history_trade': 1,
|
|
227
|
+
'v1/fapi/trade/position_history': 1,
|
|
228
|
+
'v1/fapi/trade/positions': 1,
|
|
229
|
+
'v1/fapi/account/balance': 1,
|
|
230
|
+
'v1/fapi/user_data/assets_margin': 1,
|
|
231
|
+
'v1/fapi/user_data/position_side/dual': 1,
|
|
232
232
|
'v1/agent/teams': 1,
|
|
233
233
|
'v1/agent/agent_links': 1,
|
|
234
234
|
'v1/agent/regular_overview': 1,
|
|
@@ -241,15 +241,15 @@ class bydfi extends bydfi$1["default"] {
|
|
|
241
241
|
},
|
|
242
242
|
'post': {
|
|
243
243
|
'v1/account/transfer': 1,
|
|
244
|
-
'v1/
|
|
245
|
-
'v1/
|
|
246
|
-
'v1/
|
|
247
|
-
'v1/
|
|
248
|
-
'v1/
|
|
249
|
-
'v1/
|
|
250
|
-
'v1/
|
|
251
|
-
'v1/
|
|
252
|
-
'v1/
|
|
244
|
+
'v1/fapi/trade/place_order': 1,
|
|
245
|
+
'v1/fapi/trade/batch_place_order': 1,
|
|
246
|
+
'v1/fapi/trade/edit_order': 1,
|
|
247
|
+
'v1/fapi/trade/batch_edit_order': 1,
|
|
248
|
+
'v1/fapi/trade/cancel_all_order': 1,
|
|
249
|
+
'v1/fapi/trade/leverage': 1,
|
|
250
|
+
'v1/fapi/trade/batch_leverage_margin': 1,
|
|
251
|
+
'v1/fapi/user_data/margin_type': 1,
|
|
252
|
+
'v1/fapi/user_data/position_side/dual': 1,
|
|
253
253
|
'v1/agent/internal_withdrawal': 1, // https://developers.bydfi.com/en/agent/#internal-withdrawal
|
|
254
254
|
},
|
|
255
255
|
},
|
|
@@ -381,13 +381,15 @@ class bydfi extends bydfi$1["default"] {
|
|
|
381
381
|
},
|
|
382
382
|
'accountsByType': {
|
|
383
383
|
'spot': 'SPOT',
|
|
384
|
-
'swap': '
|
|
385
|
-
'funding': '
|
|
384
|
+
'swap': 'UMFUTURE',
|
|
385
|
+
'funding': 'FUNDING',
|
|
386
|
+
'inverse': 'CMFUTURE',
|
|
386
387
|
},
|
|
387
388
|
'accountsById': {
|
|
388
389
|
'SPOT': 'spot',
|
|
389
|
-
'
|
|
390
|
-
'
|
|
390
|
+
'UMFUTURE': 'swap',
|
|
391
|
+
'FUNDING': 'funding',
|
|
392
|
+
'CMFUTURE': 'inverse',
|
|
391
393
|
},
|
|
392
394
|
},
|
|
393
395
|
});
|
|
@@ -396,12 +398,12 @@ class bydfi extends bydfi$1["default"] {
|
|
|
396
398
|
* @method
|
|
397
399
|
* @name bydfi#fetchMarkets
|
|
398
400
|
* @description retrieves data on all markets for bydfi
|
|
399
|
-
* @see https://developers.bydfi.com/en/
|
|
401
|
+
* @see https://developers.bydfi.com/en/futures/market#fetching-trading-rules-and-pairs
|
|
400
402
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
401
403
|
* @returns {object[]} an array of objects representing market data
|
|
402
404
|
*/
|
|
403
405
|
async fetchMarkets(params = {}) {
|
|
404
|
-
const response = await this.
|
|
406
|
+
const response = await this.publicGetV1FapiMarketExchangeInfo(params);
|
|
405
407
|
//
|
|
406
408
|
// {
|
|
407
409
|
// "code": "200",
|
|
@@ -556,7 +558,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
556
558
|
* @method
|
|
557
559
|
* @name bydfi#fetchOrderBook
|
|
558
560
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
559
|
-
* @see https://developers.bydfi.com/en/
|
|
561
|
+
* @see https://developers.bydfi.com/en/futures/market#depth-information
|
|
560
562
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
561
563
|
* @param {int} [limit] the maximum amount of order book entries to return, could be 5, 10, 20, 50, 100, 500 or 1000 (default 500)
|
|
562
564
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -572,7 +574,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
572
574
|
if (limit !== undefined) {
|
|
573
575
|
request['limit'] = this.getClosestLimit(limit);
|
|
574
576
|
}
|
|
575
|
-
const response = await this.
|
|
577
|
+
const response = await this.publicGetV1FapiMarketDepth(this.extend(request, params));
|
|
576
578
|
//
|
|
577
579
|
// {
|
|
578
580
|
// "code": 200,
|
|
@@ -620,7 +622,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
620
622
|
* @method
|
|
621
623
|
* @name bydfi#fetchTrades
|
|
622
624
|
* @description get the list of most recent trades for a particular symbol
|
|
623
|
-
* @see https://developers.bydfi.com/en/
|
|
625
|
+
* @see https://developers.bydfi.com/en/futures/market#recent-trades
|
|
624
626
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
625
627
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
626
628
|
* @param {int} [limit] the maximum amount of trades to fetch (default 500, max 1000)
|
|
@@ -637,7 +639,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
637
639
|
if (limit !== undefined) {
|
|
638
640
|
request['limit'] = limit;
|
|
639
641
|
}
|
|
640
|
-
const response = await this.
|
|
642
|
+
const response = await this.publicGetV1FapiMarketTrades(this.extend(request, params));
|
|
641
643
|
//
|
|
642
644
|
// {
|
|
643
645
|
// "code": 200,
|
|
@@ -662,7 +664,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
662
664
|
* @method
|
|
663
665
|
* @name bydfi#fetchMyTrades
|
|
664
666
|
* @description fetch all trades made by the user
|
|
665
|
-
* @see https://developers.bydfi.com/en/
|
|
667
|
+
* @see https://developers.bydfi.com/en/futures/trade#historical-trades-query
|
|
666
668
|
* @param {string} symbol unified market symbol
|
|
667
669
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
668
670
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
@@ -697,7 +699,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
697
699
|
if (limit !== undefined) {
|
|
698
700
|
request['limit'] = limit;
|
|
699
701
|
}
|
|
700
|
-
const response = await this.
|
|
702
|
+
const response = await this.privateGetV1FapiTradeHistoryTrade(this.extend(request, params));
|
|
701
703
|
//
|
|
702
704
|
// {
|
|
703
705
|
// "code": 200,
|
|
@@ -804,7 +806,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
804
806
|
* @method
|
|
805
807
|
* @name bydfi#fetchOHLCV
|
|
806
808
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
807
|
-
* @see https://developers.bydfi.com/en/
|
|
809
|
+
* @see https://developers.bydfi.com/en/futures/market#candlestick-data
|
|
808
810
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
809
811
|
* @param {string} timeframe the length of time each candle represents
|
|
810
812
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -852,7 +854,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
852
854
|
if (limit !== undefined) {
|
|
853
855
|
request['limit'] = limit;
|
|
854
856
|
}
|
|
855
|
-
const response = await this.
|
|
857
|
+
const response = await this.publicGetV1FapiMarketKlines(this.extend(request, params));
|
|
856
858
|
//
|
|
857
859
|
// {
|
|
858
860
|
// "code": 200,
|
|
@@ -899,7 +901,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
899
901
|
/**
|
|
900
902
|
* @method
|
|
901
903
|
* @name bydfi#fetchTickers
|
|
902
|
-
* @see https://developers.bydfi.com/en/
|
|
904
|
+
* @see https://developers.bydfi.com/en/futures/market#24hr-price-change-statistics
|
|
903
905
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
904
906
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
905
907
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -907,7 +909,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
907
909
|
*/
|
|
908
910
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
909
911
|
await this.loadMarkets();
|
|
910
|
-
const response = await this.
|
|
912
|
+
const response = await this.publicGetV1FapiMarketTicker24hr(params);
|
|
911
913
|
//
|
|
912
914
|
// {
|
|
913
915
|
// "code": 200,
|
|
@@ -933,7 +935,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
933
935
|
* @method
|
|
934
936
|
* @name bydfi#fetchTicker
|
|
935
937
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
936
|
-
* @see https://developers.bydfi.com/en/
|
|
938
|
+
* @see https://developers.bydfi.com/en/futures/market#24hr-price-change-statistics
|
|
937
939
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
938
940
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
939
941
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
@@ -944,7 +946,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
944
946
|
const request = {
|
|
945
947
|
'symbol': market['id'],
|
|
946
948
|
};
|
|
947
|
-
const response = await this.
|
|
949
|
+
const response = await this.publicGetV1FapiMarketTicker24hr(this.extend(request, params));
|
|
948
950
|
const data = this.safeList(response, 'data', []);
|
|
949
951
|
const ticker = this.safeDict(data, 0, {});
|
|
950
952
|
return this.parseTicker(ticker, market);
|
|
@@ -995,7 +997,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
995
997
|
* @method
|
|
996
998
|
* @name bydfi#fetchFundingRate
|
|
997
999
|
* @description fetch the current funding rate
|
|
998
|
-
* @see https://developers.bydfi.com/en/
|
|
1000
|
+
* @see https://developers.bydfi.com/en/futures/market#recent-funding-rate
|
|
999
1001
|
* @param {string} symbol unified market symbol
|
|
1000
1002
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1001
1003
|
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/?id=funding-rate-structure}
|
|
@@ -1006,7 +1008,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1006
1008
|
const request = {
|
|
1007
1009
|
'symbol': market['id'],
|
|
1008
1010
|
};
|
|
1009
|
-
const response = await this.
|
|
1011
|
+
const response = await this.publicGetV1FapiMarketFundingRate(this.extend(request, params));
|
|
1010
1012
|
//
|
|
1011
1013
|
// {
|
|
1012
1014
|
// "code": 200,
|
|
@@ -1061,7 +1063,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1061
1063
|
* @method
|
|
1062
1064
|
* @name bydfi#fetchFundingRateHistory
|
|
1063
1065
|
* @description fetches historical funding rate prices
|
|
1064
|
-
* @see https://developers.bydfi.com/en/
|
|
1066
|
+
* @see https://developers.bydfi.com/en/futures/market#historical-funding-rates
|
|
1065
1067
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
1066
1068
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
1067
1069
|
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/?id=funding-rate-history-structure} to fetch
|
|
@@ -1089,7 +1091,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1089
1091
|
if (until !== undefined) {
|
|
1090
1092
|
request['endTime'] = until;
|
|
1091
1093
|
}
|
|
1092
|
-
const response = await this.
|
|
1094
|
+
const response = await this.publicGetV1FapiMarketFundingRateHistory(this.extend(request, params));
|
|
1093
1095
|
//
|
|
1094
1096
|
// {
|
|
1095
1097
|
// "code": 200,
|
|
@@ -1131,7 +1133,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1131
1133
|
* @method
|
|
1132
1134
|
* @name bydfi#createOrder
|
|
1133
1135
|
* @description create a trade order
|
|
1134
|
-
* @see https://developers.bydfi.com/en/
|
|
1136
|
+
* @see https://developers.bydfi.com/en/futures/trade#placing-an-order
|
|
1135
1137
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
1136
1138
|
* @param {string} type 'market' or 'limit'
|
|
1137
1139
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -1159,7 +1161,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1159
1161
|
let wallet = 'W001';
|
|
1160
1162
|
[wallet, params] = this.handleOptionAndParams(params, 'createOrder', 'wallet', wallet);
|
|
1161
1163
|
orderRequest = this.extend(orderRequest, { 'wallet': wallet });
|
|
1162
|
-
const response = await this.
|
|
1164
|
+
const response = await this.privatePostV1FapiTradePlaceOrder(orderRequest);
|
|
1163
1165
|
//
|
|
1164
1166
|
// {
|
|
1165
1167
|
// "code": 200,
|
|
@@ -1312,7 +1314,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1312
1314
|
* @method
|
|
1313
1315
|
* @name bydfi#createOrders
|
|
1314
1316
|
* @description create a list of trade orders
|
|
1315
|
-
* @see https://developers.bydfi.com/en/
|
|
1317
|
+
* @see https://developers.bydfi.com/en/futures/trade#batch-order-placement
|
|
1316
1318
|
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
1317
1319
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1318
1320
|
* @param {string} [params.wallet] The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
|
|
@@ -1342,7 +1344,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1342
1344
|
'wallet': wallet,
|
|
1343
1345
|
'orders': ordersRequests,
|
|
1344
1346
|
};
|
|
1345
|
-
const response = await this.
|
|
1347
|
+
const response = await this.privatePostV1FapiTradeBatchPlaceOrder(this.extend(request, params));
|
|
1346
1348
|
const data = this.safeList(response, 'data', []);
|
|
1347
1349
|
return this.parseOrders(data);
|
|
1348
1350
|
}
|
|
@@ -1350,7 +1352,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1350
1352
|
* @method
|
|
1351
1353
|
* @name bydfi#editOrder
|
|
1352
1354
|
* @description edit a trade order
|
|
1353
|
-
* @see https://developers.bydfi.com/en/
|
|
1355
|
+
* @see https://developers.bydfi.com/en/futures/trade#order-modification
|
|
1354
1356
|
* @param {string} id order id (mandatory if params.clientOrderId is not provided)
|
|
1355
1357
|
* @param {string} [symbol] unified symbol of the market to create an order in
|
|
1356
1358
|
* @param {string} [type] not used by bydfi editOrder
|
|
@@ -1368,7 +1370,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1368
1370
|
let wallet = 'W001';
|
|
1369
1371
|
[wallet, params] = this.handleOptionAndParams(params, 'editOrder', 'wallet', wallet);
|
|
1370
1372
|
request['wallet'] = wallet;
|
|
1371
|
-
const response = await this.
|
|
1373
|
+
const response = await this.privatePostV1FapiTradeEditOrder(request);
|
|
1372
1374
|
const data = this.safeDict(response, 'data', {});
|
|
1373
1375
|
return this.parseOrder(data);
|
|
1374
1376
|
}
|
|
@@ -1376,7 +1378,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1376
1378
|
* @method
|
|
1377
1379
|
* @name bydfi#editOrders
|
|
1378
1380
|
* @description edit a list of trade orders
|
|
1379
|
-
* @see https://developers.bydfi.com/en/
|
|
1381
|
+
* @see https://developers.bydfi.com/en/futures/trade#batch-order-modification
|
|
1380
1382
|
* @param {Array} orders list of orders to edit, each object should contain the parameters required by editOrder, namely id, symbol, amount, price and params
|
|
1381
1383
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1382
1384
|
* @param {string} [params.wallet] The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
|
|
@@ -1406,7 +1408,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1406
1408
|
'wallet': wallet,
|
|
1407
1409
|
'editOrders': ordersRequests,
|
|
1408
1410
|
};
|
|
1409
|
-
const response = await this.
|
|
1411
|
+
const response = await this.privatePostV1FapiTradeBatchEditOrder(this.extend(request, params));
|
|
1410
1412
|
const data = this.safeList(response, 'data', []);
|
|
1411
1413
|
return this.parseOrders(data);
|
|
1412
1414
|
}
|
|
@@ -1436,7 +1438,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1436
1438
|
* @method
|
|
1437
1439
|
* @name bydfi#cancelAllOrders
|
|
1438
1440
|
* @description cancel all open orders in a market
|
|
1439
|
-
* @see https://developers.bydfi.com/en/
|
|
1441
|
+
* @see https://developers.bydfi.com/en/futures/trade#complete-order-cancellation
|
|
1440
1442
|
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
1441
1443
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1442
1444
|
* @param {string} [params.wallet] The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
|
|
@@ -1454,7 +1456,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1454
1456
|
'symbol': market['id'],
|
|
1455
1457
|
'wallet': wallet,
|
|
1456
1458
|
};
|
|
1457
|
-
const response = await this.
|
|
1459
|
+
const response = await this.privatePostV1FapiTradeCancelAllOrder(this.extend(request, params));
|
|
1458
1460
|
//
|
|
1459
1461
|
// {
|
|
1460
1462
|
// "code": 200,
|
|
@@ -1494,8 +1496,8 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1494
1496
|
* @method
|
|
1495
1497
|
* @name bydfi#fetchOpenOrders
|
|
1496
1498
|
* @description fetch all unfilled currently open orders
|
|
1497
|
-
* @see https://developers.bydfi.com/en/
|
|
1498
|
-
* @see https://developers.bydfi.com/en/
|
|
1499
|
+
* @see https://developers.bydfi.com/en/futures/trade#pending-order-query
|
|
1500
|
+
* @see https://developers.bydfi.com/en/futures/trade#planned-order-query
|
|
1499
1501
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1500
1502
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1501
1503
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -1552,10 +1554,10 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1552
1554
|
// "success": true
|
|
1553
1555
|
// }
|
|
1554
1556
|
//
|
|
1555
|
-
response = await this.
|
|
1557
|
+
response = await this.privateGetV1FapiTradeOpenOrder(this.extend(request, params));
|
|
1556
1558
|
}
|
|
1557
1559
|
else {
|
|
1558
|
-
response = await this.
|
|
1560
|
+
response = await this.privateGetV1FapiTradePlanOrder(this.extend(request, params));
|
|
1559
1561
|
}
|
|
1560
1562
|
const data = this.safeList(response, 'data', []);
|
|
1561
1563
|
return this.parseOrders(data, market, since, limit);
|
|
@@ -1564,8 +1566,8 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1564
1566
|
* @method
|
|
1565
1567
|
* @name bydfi#fetchOpenOrder
|
|
1566
1568
|
* @description fetch an open order by the id
|
|
1567
|
-
* @see https://developers.bydfi.com/en/
|
|
1568
|
-
* @see https://developers.bydfi.com/en/
|
|
1569
|
+
* @see https://developers.bydfi.com/en/futures/trade#pending-order-query
|
|
1570
|
+
* @see https://developers.bydfi.com/en/futures/trade#planned-order-query
|
|
1569
1571
|
* @param {string} id order id (mandatory if params.clientOrderId is not provided)
|
|
1570
1572
|
* @param {string} symbol unified market symbol
|
|
1571
1573
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -1597,10 +1599,10 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1597
1599
|
let trigger = false;
|
|
1598
1600
|
[trigger, params] = this.handleOptionAndParams(params, 'fetchOpenOrder', 'trigger', trigger);
|
|
1599
1601
|
if (!trigger) {
|
|
1600
|
-
response = await this.
|
|
1602
|
+
response = await this.privateGetV1FapiTradeOpenOrder(this.extend(request, params));
|
|
1601
1603
|
}
|
|
1602
1604
|
else {
|
|
1603
|
-
response = await this.
|
|
1605
|
+
response = await this.privateGetV1FapiTradePlanOrder(this.extend(request, params));
|
|
1604
1606
|
}
|
|
1605
1607
|
const data = this.safeList(response, 'data', []);
|
|
1606
1608
|
const order = this.safeDict(data, 0, {});
|
|
@@ -1610,7 +1612,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1610
1612
|
* @method
|
|
1611
1613
|
* @name bydfi#fetchCanceledAndClosedOrders
|
|
1612
1614
|
* @description fetches information on multiple canceled and closed orders made by the user
|
|
1613
|
-
* @see https://developers.bydfi.com/en/
|
|
1615
|
+
* @see https://developers.bydfi.com/en/futures/trade#historical-orders-query
|
|
1614
1616
|
* @param {string} symbol unified market symbol of the closed orders
|
|
1615
1617
|
* @param {int} [since] timestamp in ms of the earliest order
|
|
1616
1618
|
* @param {int} [limit] the max number of closed orders to return
|
|
@@ -1645,7 +1647,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1645
1647
|
if (limit !== undefined) {
|
|
1646
1648
|
request['limit'] = limit;
|
|
1647
1649
|
}
|
|
1648
|
-
const response = await this.
|
|
1650
|
+
const response = await this.privateGetV1FapiTradeHistoryOrder(this.extend(request, params));
|
|
1649
1651
|
//
|
|
1650
1652
|
// {
|
|
1651
1653
|
// "code": 200,
|
|
@@ -1879,7 +1881,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1879
1881
|
* @method
|
|
1880
1882
|
* @name bydfi#setLeverage
|
|
1881
1883
|
* @description set the level of leverage for a market
|
|
1882
|
-
* @see https://developers.bydfi.com/en/
|
|
1884
|
+
* @see https://developers.bydfi.com/en/futures/trade#set-leverage-for-single-trading-pair
|
|
1883
1885
|
* @param {float} leverage the rate of leverage
|
|
1884
1886
|
* @param {string} symbol unified market symbol
|
|
1885
1887
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -1899,7 +1901,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1899
1901
|
'leverage': leverage,
|
|
1900
1902
|
'wallet': wallet,
|
|
1901
1903
|
};
|
|
1902
|
-
const response = await this.
|
|
1904
|
+
const response = await this.privatePostV1FapiTradeLeverage(this.extend(request, params));
|
|
1903
1905
|
const data = this.safeDict(response, 'data', {});
|
|
1904
1906
|
return data;
|
|
1905
1907
|
}
|
|
@@ -1907,7 +1909,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1907
1909
|
* @method
|
|
1908
1910
|
* @name bydfi#fetchLeverage
|
|
1909
1911
|
* @description fetch the set leverage for a market
|
|
1910
|
-
* @see https://developers.bydfi.com/en/
|
|
1912
|
+
* @see https://developers.bydfi.com/en/futures/trade#get-leverage-for-single-trading-pair
|
|
1911
1913
|
* @param {string} symbol unified market symbol
|
|
1912
1914
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1913
1915
|
* @param {string} [params.wallet] The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
|
|
@@ -1925,7 +1927,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1925
1927
|
'symbol': market['id'],
|
|
1926
1928
|
'wallet': wallet,
|
|
1927
1929
|
};
|
|
1928
|
-
const response = await this.
|
|
1930
|
+
const response = await this.privateGetV1FapiTradeLeverage(this.extend(request, params));
|
|
1929
1931
|
//
|
|
1930
1932
|
// {
|
|
1931
1933
|
// "code": 200,
|
|
@@ -1955,7 +1957,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1955
1957
|
* @method
|
|
1956
1958
|
* @name bydfi#fetchPositions
|
|
1957
1959
|
* @description fetch all open positions
|
|
1958
|
-
* @see https://developers.bydfi.com/en/
|
|
1960
|
+
* @see https://developers.bydfi.com/en/futures/trade#positions-query
|
|
1959
1961
|
* @param {string[]} [symbols] list of unified market symbols
|
|
1960
1962
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1961
1963
|
* @param {string} [params.contractType] FUTURE or DELIVERY, default is FUTURE
|
|
@@ -1969,7 +1971,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1969
1971
|
const request = {
|
|
1970
1972
|
'contractType': contractType,
|
|
1971
1973
|
};
|
|
1972
|
-
const response = await this.
|
|
1974
|
+
const response = await this.privateGetV1FapiTradePositions(this.extend(request, params));
|
|
1973
1975
|
//
|
|
1974
1976
|
// {
|
|
1975
1977
|
// "code": 200,
|
|
@@ -1999,7 +2001,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
1999
2001
|
* @method
|
|
2000
2002
|
* @name bydfi#fetchPositionsForSymbol
|
|
2001
2003
|
* @description fetch open positions for a single market
|
|
2002
|
-
* @see https://developers.bydfi.com/en/
|
|
2004
|
+
* @see https://developers.bydfi.com/en/futures/trade#positions-query
|
|
2003
2005
|
* @description fetch all open positions for specific symbol
|
|
2004
2006
|
* @param {string} symbol unified market symbol
|
|
2005
2007
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -2015,7 +2017,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
2015
2017
|
'contractType': contractType,
|
|
2016
2018
|
'symbol': market['id'],
|
|
2017
2019
|
};
|
|
2018
|
-
const response = await this.
|
|
2020
|
+
const response = await this.privateGetV1FapiTradePositions(this.extend(request, params));
|
|
2019
2021
|
const data = this.safeList(response, 'data', []);
|
|
2020
2022
|
return this.parsePositions(data, [market['symbol']]);
|
|
2021
2023
|
}
|
|
@@ -2135,7 +2137,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
2135
2137
|
* @method
|
|
2136
2138
|
* @name bydfi#fetchPositionHistory
|
|
2137
2139
|
* @description fetches historical positions
|
|
2138
|
-
* @see https://developers.bydfi.com/en/
|
|
2140
|
+
* @see https://developers.bydfi.com/en/futures/trade#query-historical-position-profit-and-loss-records
|
|
2139
2141
|
* @param {string} symbol a unified market symbol
|
|
2140
2142
|
* @param {int} [since] timestamp in ms of the earliest position to fetch , params["until"] - since <= 7 days
|
|
2141
2143
|
* @param {int} [limit] the maximum amount of records to fetch (default 500, max 500)
|
|
@@ -2158,7 +2160,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
2158
2160
|
if (limit !== undefined) {
|
|
2159
2161
|
request['limit'] = limit;
|
|
2160
2162
|
}
|
|
2161
|
-
const response = await this.
|
|
2163
|
+
const response = await this.privateGetV1FapiTradePositionHistory(this.extend(request, params));
|
|
2162
2164
|
//
|
|
2163
2165
|
//
|
|
2164
2166
|
const data = this.safeList(response, 'data', []);
|
|
@@ -2169,7 +2171,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
2169
2171
|
* @method
|
|
2170
2172
|
* @name bydfi#fetchPositionsHistory
|
|
2171
2173
|
* @description fetches historical positions
|
|
2172
|
-
* @see https://developers.bydfi.com/en/
|
|
2174
|
+
* @see https://developers.bydfi.com/en/futures/trade#query-historical-position-profit-and-loss-records
|
|
2173
2175
|
* @param {string[]} symbols a list of unified market symbols
|
|
2174
2176
|
* @param {int} [since] timestamp in ms of the earliest position to fetch , params["until"] - since <= 7 days
|
|
2175
2177
|
* @param {int} [limit] the maximum amount of records to fetch (default 500, max 500)
|
|
@@ -2190,7 +2192,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
2190
2192
|
if (limit !== undefined) {
|
|
2191
2193
|
request['limit'] = limit;
|
|
2192
2194
|
}
|
|
2193
|
-
const response = await this.
|
|
2195
|
+
const response = await this.privateGetV1FapiTradePositionHistory(this.extend(request, params));
|
|
2194
2196
|
//
|
|
2195
2197
|
// {
|
|
2196
2198
|
// "code": 200,
|
|
@@ -2241,7 +2243,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
2241
2243
|
* @method
|
|
2242
2244
|
* @name bydfi#fetchMarginMode
|
|
2243
2245
|
* @description fetches the margin mode of a trading pair
|
|
2244
|
-
* @see https://developers.bydfi.com/en/
|
|
2246
|
+
* @see https://developers.bydfi.com/en/futures/user#margin-mode-query
|
|
2245
2247
|
* @param {string} symbol unified symbol of the market to fetch the margin mode for
|
|
2246
2248
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2247
2249
|
* @param {string} [params.contractType] FUTURE or DELIVERY, default is FUTURE
|
|
@@ -2260,7 +2262,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
2260
2262
|
'symbol': market['id'],
|
|
2261
2263
|
'wallet': wallet,
|
|
2262
2264
|
};
|
|
2263
|
-
const response = await this.
|
|
2265
|
+
const response = await this.privateGetV1FapiUserDataAssetsMargin(this.extend(request, params));
|
|
2264
2266
|
//
|
|
2265
2267
|
// {
|
|
2266
2268
|
// "code": 200,
|
|
@@ -2288,7 +2290,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
2288
2290
|
* @method
|
|
2289
2291
|
* @name bydfi#setMarginMode
|
|
2290
2292
|
* @description set margin mode to 'cross' or 'isolated'
|
|
2291
|
-
* @see https://developers.bydfi.com/en/
|
|
2293
|
+
* @see https://developers.bydfi.com/en/futures/user#change-margin-type-cross-margin
|
|
2292
2294
|
* @param {string} marginMode 'cross' or 'isolated'
|
|
2293
2295
|
* @param {string} symbol unified market symbol
|
|
2294
2296
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -2316,13 +2318,13 @@ class bydfi extends bydfi$1["default"] {
|
|
|
2316
2318
|
'marginType': marginMode.toUpperCase(),
|
|
2317
2319
|
'wallet': wallet,
|
|
2318
2320
|
};
|
|
2319
|
-
return await this.
|
|
2321
|
+
return await this.privatePostV1FapiUserDataMarginType(this.extend(request, params));
|
|
2320
2322
|
}
|
|
2321
2323
|
/**
|
|
2322
2324
|
* @method
|
|
2323
2325
|
* @name bydfi#setPositionMode
|
|
2324
2326
|
* @description set hedged to true or false for a market, hedged for bydfi is set identically for all markets with same settle currency
|
|
2325
|
-
* @see https://developers.bydfi.com/en/
|
|
2327
|
+
* @see https://developers.bydfi.com/en/futures/user#change-position-mode-dual
|
|
2326
2328
|
* @param {bool} hedged set to true to use dualSidePosition
|
|
2327
2329
|
* @param {string} [symbol] not used by bydfi setPositionMode ()
|
|
2328
2330
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -2356,13 +2358,13 @@ class bydfi extends bydfi$1["default"] {
|
|
|
2356
2358
|
// "success": true
|
|
2357
2359
|
// }
|
|
2358
2360
|
//
|
|
2359
|
-
return await this.
|
|
2361
|
+
return await this.privatePostV1FapiUserDataPositionSideDual(this.extend(request, params));
|
|
2360
2362
|
}
|
|
2361
2363
|
/**
|
|
2362
2364
|
* @method
|
|
2363
2365
|
* @name bydfi#fetchPositionMode
|
|
2364
2366
|
* @description fetchs the position mode, hedged or one way, hedged for bydfi is set identically for all markets with same settle currency
|
|
2365
|
-
* @see https://developers.bydfi.com/en/
|
|
2367
|
+
* @see https://developers.bydfi.com/en/futures/user#get-position-mode
|
|
2366
2368
|
* @param {string} [symbol] unified symbol of the market to fetch the order book for
|
|
2367
2369
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2368
2370
|
* @param {string} [params.contractType] FUTURE or DELIVERY, default is FUTURE
|
|
@@ -2389,7 +2391,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
2389
2391
|
'settleCoin': settleCoin,
|
|
2390
2392
|
'wallet': wallet,
|
|
2391
2393
|
};
|
|
2392
|
-
const response = await this.
|
|
2394
|
+
const response = await this.privateGetV1FapiUserDataPositionSideDual(this.extend(request, params));
|
|
2393
2395
|
//
|
|
2394
2396
|
// {
|
|
2395
2397
|
// "code": 200,
|
|
@@ -2419,22 +2421,24 @@ class bydfi extends bydfi$1["default"] {
|
|
|
2419
2421
|
* @name bydfi#fetchBalance
|
|
2420
2422
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
2421
2423
|
* @see https://developers.bydfi.com/en/account#asset-inquiry
|
|
2422
|
-
* @see https://developers.bydfi.com/en/
|
|
2424
|
+
* @see https://developers.bydfi.com/en/futures/user#asset-query
|
|
2423
2425
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2424
|
-
* @param {string} [params.
|
|
2426
|
+
* @param {string} [params.account] the type of account to fetch the balance for, either 'SPOT' or 'UMFUTURE' or 'CMFUTURE' or 'COPY' or 'GRID' or 'FUNDING' (default is 'SPOT')
|
|
2425
2427
|
* @param {string} [params.wallet] *swap only* The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
|
|
2426
2428
|
* @param {string} [params.asset] currency id for the balance to fetch
|
|
2427
2429
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
|
|
2428
2430
|
*/
|
|
2429
2431
|
async fetchBalance(params = {}) {
|
|
2430
2432
|
await this.loadMarkets();
|
|
2431
|
-
let
|
|
2432
|
-
[
|
|
2433
|
+
let type = undefined;
|
|
2434
|
+
[type, params] = this.handleMarketTypeAndParams('fetchBalance', undefined, params);
|
|
2435
|
+
let wallet = undefined;
|
|
2436
|
+
[wallet, params] = this.handleOptionAndParams(params, 'fetchBalance', 'wallet');
|
|
2433
2437
|
const request = {};
|
|
2434
2438
|
let response = undefined;
|
|
2435
|
-
if (
|
|
2439
|
+
if (wallet === undefined) {
|
|
2436
2440
|
const options = this.safeDict(this.options, 'accountsByType', {});
|
|
2437
|
-
const parsedAccountType = this.
|
|
2441
|
+
const parsedAccountType = this.safeStringUpper(options, type, type);
|
|
2438
2442
|
request['walletType'] = parsedAccountType;
|
|
2439
2443
|
//
|
|
2440
2444
|
// {
|
|
@@ -2455,8 +2459,6 @@ class bydfi extends bydfi$1["default"] {
|
|
|
2455
2459
|
response = await this.privateGetV1AccountAssets(this.extend(request, params));
|
|
2456
2460
|
}
|
|
2457
2461
|
else {
|
|
2458
|
-
let wallet = 'W001';
|
|
2459
|
-
[wallet, params] = this.handleOptionAndParams(params, 'fetchBalance', 'wallet', wallet);
|
|
2460
2462
|
request['wallet'] = wallet;
|
|
2461
2463
|
//
|
|
2462
2464
|
// {
|
|
@@ -2486,7 +2488,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
2486
2488
|
// ],
|
|
2487
2489
|
// "success": true
|
|
2488
2490
|
// }
|
|
2489
|
-
response = await this.
|
|
2491
|
+
response = await this.privateGetV1FapiAccountBalance(this.extend(request, params));
|
|
2490
2492
|
}
|
|
2491
2493
|
const data = this.safeList(response, 'data', []);
|
|
2492
2494
|
return this.parseBalance(data);
|
package/dist/cjs/src/cex.js
CHANGED
|
@@ -245,6 +245,7 @@ class cex extends cex$1["default"] {
|
|
|
245
245
|
'Get deposit address for main account is not allowed': errors.PermissionDenied,
|
|
246
246
|
'Market Trigger orders are not allowed': errors.BadRequest,
|
|
247
247
|
'key not passed or incorrect': errors.AuthenticationError,
|
|
248
|
+
'API rate limit reached': errors.RateLimitExceeded, // {"error":"API rate limit reached"}
|
|
248
249
|
},
|
|
249
250
|
},
|
|
250
251
|
'timeframes': {
|