ccxt 4.5.46 → 4.5.47

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.
Files changed (63) hide show
  1. package/README.md +5 -6
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -6
  4. package/dist/cjs/src/aftermath.js +1 -1
  5. package/dist/cjs/src/backpack.js +1 -1
  6. package/dist/cjs/src/base/Exchange.js +24 -0
  7. package/dist/cjs/src/binance.js +12 -15
  8. package/dist/cjs/src/bitfinex.js +6 -11
  9. package/dist/cjs/src/bitget.js +6 -3
  10. package/dist/cjs/src/bitmex.js +46 -0
  11. package/dist/cjs/src/bitstamp.js +14 -1
  12. package/dist/cjs/src/bittrade.js +1 -1
  13. package/dist/cjs/src/blofin.js +137 -29
  14. package/dist/cjs/src/hollaex.js +1 -1
  15. package/dist/cjs/src/kraken.js +39 -31
  16. package/dist/cjs/src/kucoin.js +2158 -461
  17. package/dist/cjs/src/lighter.js +2 -2
  18. package/dist/cjs/src/okx.js +0 -1
  19. package/dist/cjs/src/pro/bittrade.js +4 -0
  20. package/dist/cjs/src/pro/grvt.js +1 -1
  21. package/dist/cjs/src/pro/lighter.js +1 -1
  22. package/dist/cjs/src/whitebit.js +21 -2
  23. package/js/ccxt.d.ts +2 -8
  24. package/js/ccxt.js +2 -6
  25. package/js/src/abstract/blofin.d.ts +28 -12
  26. package/js/src/abstract/kraken.d.ts +36 -30
  27. package/js/src/abstract/kucoin.d.ts +1 -0
  28. package/js/src/abstract/kucoinfutures.d.ts +1 -0
  29. package/js/src/aftermath.js +1 -1
  30. package/js/src/backpack.js +1 -1
  31. package/js/src/base/Exchange.d.ts +1 -0
  32. package/js/src/base/Exchange.js +24 -0
  33. package/js/src/binance.js +12 -15
  34. package/js/src/bitfinex.js +6 -11
  35. package/js/src/bitget.d.ts +1 -1
  36. package/js/src/bitget.js +6 -3
  37. package/js/src/bitmex.d.ts +12 -0
  38. package/js/src/bitmex.js +46 -0
  39. package/js/src/bitstamp.js +14 -1
  40. package/js/src/bittrade.js +1 -1
  41. package/js/src/blofin.d.ts +2 -0
  42. package/js/src/blofin.js +137 -29
  43. package/js/src/hollaex.js +1 -1
  44. package/js/src/kraken.js +39 -31
  45. package/js/src/kucoin.d.ts +249 -8
  46. package/js/src/kucoin.js +2158 -461
  47. package/js/src/lighter.js +2 -2
  48. package/js/src/okx.js +0 -1
  49. package/js/src/pro/bittrade.js +4 -0
  50. package/js/src/pro/grvt.js +1 -1
  51. package/js/src/pro/lighter.js +1 -1
  52. package/js/src/whitebit.d.ts +1 -1
  53. package/js/src/whitebit.js +21 -2
  54. package/package.json +1 -1
  55. package/dist/cjs/src/abstract/coincatch.js +0 -11
  56. package/dist/cjs/src/coincatch.js +0 -5495
  57. package/dist/cjs/src/pro/coincatch.js +0 -1563
  58. package/js/src/abstract/coincatch.d.ts +0 -97
  59. package/js/src/abstract/coincatch.js +0 -5
  60. package/js/src/coincatch.d.ts +0 -788
  61. package/js/src/coincatch.js +0 -5488
  62. package/js/src/pro/coincatch.d.ts +0 -207
  63. package/js/src/pro/coincatch.js +0 -1556
package/js/src/bitget.js CHANGED
@@ -5104,7 +5104,7 @@ export default class bitget extends Exchange {
5104
5104
  * @param {string} type 'market' or 'limit'
5105
5105
  * @param {string} side 'buy' or 'sell'
5106
5106
  * @param {float} amount how much you want to trade in units of the base currency
5107
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
5107
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders, and used as the execution price for contract stop-loss / take-profit orders
5108
5108
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5109
5109
  * @param {float} [params.cost] *spot only* how much you want to trade in units of the quote currency, for market buy orders only
5110
5110
  * @param {float} [params.triggerPrice] *swap only* The price at which a trigger order is triggered at
@@ -5435,8 +5435,11 @@ export default class bitget extends Exchange {
5435
5435
  }
5436
5436
  }
5437
5437
  else if (isStopLossOrTakeProfitTrigger) {
5438
- if (!isMarketOrder) {
5439
- throw new ExchangeError(this.id + ' createOrder() bitget stopLoss or takeProfit orders must be market orders');
5438
+ if (price !== undefined) {
5439
+ request['executePrice'] = this.priceToPrecision(symbol, price);
5440
+ if ('price' in request) {
5441
+ delete request['price'];
5442
+ }
5440
5443
  }
5441
5444
  if (hedged) {
5442
5445
  request['holdSide'] = (side === 'sell') ? 'long' : 'short';
@@ -433,6 +433,18 @@ export default class bitmex extends Exchange {
433
433
  timestamp: number;
434
434
  datetime: string;
435
435
  };
436
+ /**
437
+ * @method
438
+ * @name bitmex#closePosition
439
+ * @description closes open positions for a market
440
+ * @see https://docs.bitmex.com/api-explorer/order-new
441
+ * @see https://docs.bitmex.com/api-explorer/order-close-position
442
+ * @param {string} symbol Unified CCXT market symbol
443
+ * @param {string} side the buy or sell side of the closing order, if the position is long set the side to sell, reduceOnly is implied
444
+ * @param {object} [params] extra parameters specific to the bingx api endpoint
445
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
446
+ */
447
+ closePosition(symbol: string, side?: OrderSide, params?: {}): Promise<Order>;
436
448
  handleErrors(code: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): any;
437
449
  nonce(): number;
438
450
  sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
package/js/src/bitmex.js CHANGED
@@ -3474,6 +3474,52 @@ export default class bitmex extends Exchange {
3474
3474
  'datetime': datetime,
3475
3475
  };
3476
3476
  }
3477
+ /**
3478
+ * @method
3479
+ * @name bitmex#closePosition
3480
+ * @description closes open positions for a market
3481
+ * @see https://docs.bitmex.com/api-explorer/order-new
3482
+ * @see https://docs.bitmex.com/api-explorer/order-close-position
3483
+ * @param {string} symbol Unified CCXT market symbol
3484
+ * @param {string} side the buy or sell side of the closing order, if the position is long set the side to sell, reduceOnly is implied
3485
+ * @param {object} [params] extra parameters specific to the bingx api endpoint
3486
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
3487
+ */
3488
+ async closePosition(symbol, side = undefined, params = {}) {
3489
+ await this.loadMarkets();
3490
+ const market = this.market(symbol);
3491
+ const request = {
3492
+ 'symbol': market['id'],
3493
+ 'side': this.capitalize(side),
3494
+ 'execInst': 'Close',
3495
+ };
3496
+ const response = await this.privatePostOrder(this.extend(request, params));
3497
+ //
3498
+ // {
3499
+ // "account": 395724,
3500
+ // "avgPx": 66358.8,
3501
+ // "cumQty": 200,
3502
+ // "currency": "USDT",
3503
+ // "execInst": "Close",
3504
+ // "leavesQty": 0,
3505
+ // "ordStatus": "Filled",
3506
+ // "ordType": "Market",
3507
+ // "orderID": "4e1ef998-33c1-4736-b58b-9d8b4d085c49",
3508
+ // "orderQty": 200,
3509
+ // "pool": "Primary",
3510
+ // "settlCurrency": "USDt",
3511
+ // "side": "Sell",
3512
+ // "strategy": "OneWay",
3513
+ // "symbol": "XBTUSDT",
3514
+ // "text": "Submitted via API.",
3515
+ // "timeInForce": "ImmediateOrCancel",
3516
+ // "timestamp": "2026-04-02T05:20:26.607Z",
3517
+ // "transactTime": "2026-04-02T05:20:26.606Z",
3518
+ // "workingIndicator": false
3519
+ // }
3520
+ //
3521
+ return this.parseOrder(response, market);
3522
+ }
3477
3523
  handleErrors(code, reason, url, method, headers, body, response, requestHeaders, requestBody) {
3478
3524
  if (response === undefined) {
3479
3525
  return undefined;
@@ -519,7 +519,6 @@ export default class bitstamp extends Exchange {
519
519
  'Your account is frozen': PermissionDenied,
520
520
  'Please update your profile with your FATCA information, before using API.': PermissionDenied,
521
521
  'Order not found.': OrderNotFound,
522
- 'Price is more than 20% below market price.': InvalidOrder,
523
522
  "Bitstamp.net is under scheduled maintenance. We'll be back soon.": OnMaintenance,
524
523
  'Order could not be placed.': ExchangeNotAvailable,
525
524
  'Invalid offset.': BadRequest,
@@ -527,6 +526,7 @@ export default class bitstamp extends Exchange {
527
526
  },
528
527
  'broad': {
529
528
  'Minimum order size is': InvalidOrder,
529
+ 'Price is more than': InvalidOrder,
530
530
  'Check your account balance for details.': InsufficientFunds,
531
531
  'Ensure this value has at least': InvalidAddress,
532
532
  'Ensure that there are no more than': InvalidOrder, // {"status": "error", "reason": {"amount": ["Ensure that there are no more than 0 decimal places."], "__all__": [""]}}
@@ -1132,6 +1132,19 @@ export default class bitstamp extends Exchange {
1132
1132
  priceString = this.safeString(trade, priceId, priceString);
1133
1133
  amountString = this.safeString(trade, market['baseId'], amountString);
1134
1134
  costString = this.safeString(trade, market['quoteId'], costString);
1135
+ // this endpoint is not aligned with "markets" endpoint
1136
+ const baseIdLower = market['baseId'].toLowerCase();
1137
+ const quoteIdLower = market['quoteId'].toLowerCase();
1138
+ const dashedIdLower = baseIdLower + '_' + quoteIdLower;
1139
+ if (priceString === undefined) {
1140
+ priceString = this.safeString(trade, dashedIdLower);
1141
+ }
1142
+ if (amountString === undefined) {
1143
+ amountString = this.safeString(trade, baseIdLower);
1144
+ }
1145
+ if (costString === undefined) {
1146
+ costString = this.safeString(trade, quoteIdLower);
1147
+ }
1135
1148
  symbol = market['symbol'];
1136
1149
  const datetimeString = this.safeString2(trade, 'date', 'datetime');
1137
1150
  let timestamp = undefined;
@@ -1212,7 +1212,7 @@ export default class bittrade extends Exchange {
1212
1212
  const response = await this[method](this.extend(request, params));
1213
1213
  //
1214
1214
  // { "status": "ok",
1215
- // "data": [ { id: 13997833014,
1215
+ // "data": [ { id: 13997833015,
1216
1216
  // "symbol": "ethbtc",
1217
1217
  // "account-id": 3398321,
1218
1218
  // "amount": "0.045000000000000000",
@@ -213,6 +213,8 @@ export default class blofin extends Exchange {
213
213
  * @param {int} [limit] the maximum number of trades structures to retrieve
214
214
  * @param {object} [params] extra parameters specific to the exchange API endpoint
215
215
  * @param {int} [params.until] Timestamp in ms of the latest time to retrieve trades for
216
+ * @param {string} [params.type] 'swap' or 'spot' (defaults to 'swap'), required to fetch spot trade history
217
+ * @param {string} [params.instId] *spot markets only* the market id of the spot market to fetch the trade history for (e.g. 'BTC-USDT')
216
218
  * @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)
217
219
  * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=trade-structure}
218
220
  */
package/js/src/blofin.js CHANGED
@@ -175,35 +175,52 @@ export default class blofin extends Exchange {
175
175
  'market/tickers': 1,
176
176
  'market/books': 1,
177
177
  'market/trades': 1,
178
- 'market/candles': 1,
179
178
  'market/mark-price': 1,
180
179
  'market/funding-rate': 1,
181
180
  'market/funding-rate-history': 1,
181
+ 'market/candles': 1,
182
+ 'market/index-candles': 1,
183
+ 'market/mark-price-candles': 1,
184
+ 'market/position-tiers': 1,
182
185
  },
183
186
  },
184
187
  'private': {
185
188
  'get': {
189
+ // account
186
190
  'asset/balances': 1,
187
- 'trade/orders-pending': 1,
188
- 'trade/fills-history': 1,
189
- 'asset/deposit-history': 1,
190
- 'asset/withdrawal-history': 1,
191
191
  'asset/bills': 1,
192
+ 'asset/withdrawal-history': 1,
193
+ 'asset/deposit-history': 1,
194
+ 'account/config': 1,
195
+ 'asset/currencies': 1,
196
+ // trading
192
197
  'account/balance': 1,
193
198
  'account/positions': 1,
194
- 'account/leverage-info': 1,
199
+ 'account/positions-history': 1,
195
200
  'account/margin-mode': 1,
196
201
  'account/position-mode': 1,
202
+ 'account/leverage-info': 1,
197
203
  'account/batch-leverage-info': 1,
204
+ 'trade/orders-pending': 1,
205
+ 'trade/order-detail': 1,
198
206
  'trade/orders-tpsl-pending': 1,
207
+ 'trade/order-tpsl-detail': 1,
199
208
  'trade/orders-algo-pending': 1,
200
209
  'trade/orders-history': 1,
201
210
  'trade/orders-tpsl-history': 1,
202
211
  'trade/orders-algo-history': 1,
212
+ 'trade/fills-history': 1,
203
213
  'trade/order/price-range': 1,
204
- 'user/query-apikey': 1,
214
+ // affiliate
205
215
  'affiliate/basic': 1,
216
+ 'affiliate/referral-code': 1,
217
+ 'affiliate/invitees': 1,
218
+ 'affiliate/sub-invitees': 1,
219
+ 'affiliate/sub-affiliates': 1,
220
+ 'affiliate/invitees/daily/info': 1,
221
+ // copy trading
206
222
  'copytrading/instruments': 1,
223
+ 'copytrading/config': 1,
207
224
  'copytrading/account/balance': 1,
208
225
  'copytrading/account/positions-by-order': 1,
209
226
  'copytrading/account/positions-details-by-order': 1,
@@ -215,21 +232,29 @@ export default class blofin extends Exchange {
215
232
  'copytrading/trade/position-history-by-order': 1,
216
233
  'copytrading/trade/orders-history': 1,
217
234
  'copytrading/trade/pending-tpsl-by-order': 1,
235
+ // user
236
+ 'user/query-apikey': 1,
237
+ // tax
238
+ 'spot/trade/fills-history': 1,
218
239
  },
219
240
  'post': {
241
+ // account
242
+ 'asset/transfer': 1,
243
+ 'asset/demo-apply-money': 1,
244
+ // trading
220
245
  'account/set-margin-mode': 1,
221
246
  'account/set-position-mode': 1,
222
- 'trade/order': 1,
223
- 'trade/order-algo': 1,
224
- 'trade/cancel-order': 1,
225
- 'trade/cancel-algo': 1,
226
247
  'account/set-leverage': 1,
248
+ 'trade/order': 1,
227
249
  'trade/batch-orders': 1,
228
250
  'trade/order-tpsl': 1,
251
+ 'trade/order-algo': 1,
252
+ 'trade/cancel-order': 1,
229
253
  'trade/cancel-batch-orders': 1,
230
254
  'trade/cancel-tpsl': 1,
255
+ 'trade/cancel-algo': 1,
231
256
  'trade/close-position': 1,
232
- 'asset/transfer': 1,
257
+ // copy trading
233
258
  'copytrading/account/set-position-mode': 1,
234
259
  'copytrading/account/set-leverage': 1,
235
260
  'copytrading/trade/place-order': 1,
@@ -761,6 +786,21 @@ export default class blofin extends Exchange {
761
786
  // "brokerId": ""
762
787
  // }
763
788
  //
789
+ // fetchMyTrades spot
790
+ // {
791
+ // "instId": "DOGE-USDT",
792
+ // "tradeId": "6000001623870",
793
+ // "orderId": "6000011777113",
794
+ // "fillPrice": "0.091480000000000000",
795
+ // "fillSize": "30.000000000000000000",
796
+ // "fillPnl": null,
797
+ // "side": "buy",
798
+ // "fee": "0.030000000000000000",
799
+ // "ts": "1775213753407",
800
+ // "brokerId": null,
801
+ // "feeCurrency": "base_currency"
802
+ // }
803
+ //
764
804
  const id = this.safeString(trade, 'tradeId');
765
805
  const marketId = this.safeString(trade, 'instId');
766
806
  market = this.safeMarket(marketId, market, '-');
@@ -772,27 +812,63 @@ export default class blofin extends Exchange {
772
812
  const orderId = this.safeString(trade, 'orderId');
773
813
  const feeCost = this.safeString(trade, 'fee');
774
814
  let fee = undefined;
815
+ let feeCurrency = this.safeString(trade, 'feeCurrency');
816
+ const isSpot = feeCurrency !== undefined;
817
+ if (feeCurrency === undefined) {
818
+ feeCurrency = market['settle'];
819
+ }
820
+ else if (feeCurrency === 'base_currency') {
821
+ feeCurrency = market['base'];
822
+ }
823
+ else if (feeCurrency === 'quote_currency') {
824
+ feeCurrency = market['quote'];
825
+ }
775
826
  if (feeCost !== undefined) {
776
827
  fee = {
777
828
  'cost': feeCost,
778
- 'currency': market['settle'],
829
+ 'currency': feeCurrency,
779
830
  };
780
831
  }
781
- return this.safeTrade({
782
- 'info': trade,
783
- 'timestamp': timestamp,
784
- 'datetime': this.iso8601(timestamp),
785
- 'symbol': symbol,
786
- 'id': id,
787
- 'order': orderId,
788
- 'type': undefined,
789
- 'takerOrMaker': undefined,
790
- 'side': side,
791
- 'price': price,
792
- 'amount': amount,
793
- 'cost': undefined,
794
- 'fee': fee,
795
- }, market);
832
+ if (isSpot) {
833
+ const spotSymbol = market['base'] + '/' + market['quote'];
834
+ const cost = this.parseNumber(Precise.stringMul(price, amount));
835
+ const result = {
836
+ 'info': trade,
837
+ 'timestamp': timestamp,
838
+ 'datetime': this.iso8601(timestamp),
839
+ 'symbol': spotSymbol,
840
+ 'id': id,
841
+ 'order': orderId,
842
+ 'type': undefined,
843
+ 'takerOrMaker': undefined,
844
+ 'side': side,
845
+ 'price': this.parseNumber(price),
846
+ 'amount': this.parseNumber(amount),
847
+ 'cost': cost,
848
+ 'fee': {
849
+ 'cost': this.parseNumber(feeCost),
850
+ 'currency': feeCurrency,
851
+ },
852
+ };
853
+ return result;
854
+ }
855
+ else {
856
+ return this.safeTrade({
857
+ 'info': trade,
858
+ 'timestamp': timestamp,
859
+ 'datetime': this.iso8601(timestamp),
860
+ 'symbol': symbol,
861
+ 'id': id,
862
+ 'order': orderId,
863
+ 'type': undefined,
864
+ 'takerOrMaker': undefined,
865
+ 'side': side,
866
+ 'price': price,
867
+ 'amount': amount,
868
+ 'cost': undefined,
869
+ 'fee': fee,
870
+ }, market);
871
+ }
796
872
  }
797
873
  /**
798
874
  * @method
@@ -1603,6 +1679,8 @@ export default class blofin extends Exchange {
1603
1679
  * @param {int} [limit] the maximum number of trades structures to retrieve
1604
1680
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1605
1681
  * @param {int} [params.until] Timestamp in ms of the latest time to retrieve trades for
1682
+ * @param {string} [params.type] 'swap' or 'spot' (defaults to 'swap'), required to fetch spot trade history
1683
+ * @param {string} [params.instId] *spot markets only* the market id of the spot market to fetch the trade history for (e.g. 'BTC-USDT')
1606
1684
  * @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)
1607
1685
  * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=trade-structure}
1608
1686
  */
@@ -1623,7 +1701,37 @@ export default class blofin extends Exchange {
1623
1701
  if (limit !== undefined) {
1624
1702
  request['limit'] = limit; // default 100, max 100
1625
1703
  }
1626
- const response = await this.privateGetTradeFillsHistory(this.extend(request, params));
1704
+ let type = 'swap';
1705
+ [type, params] = this.handleMarketTypeAndParams('fetchMyTrades', market, params, type);
1706
+ let response = undefined;
1707
+ if (type === 'spot') {
1708
+ request['instType'] = 'SPOT';
1709
+ //
1710
+ // {
1711
+ // "code": "0",
1712
+ // "msg": "success",
1713
+ // "data": [
1714
+ // {
1715
+ // "instId": "DOGE-USDT",
1716
+ // "tradeId": "6000001623870",
1717
+ // "orderId": "6000011777113",
1718
+ // "fillPrice": "0.091480000000000000",
1719
+ // "fillSize": "30.000000000000000000",
1720
+ // "fillPnl": null,
1721
+ // "side": "buy",
1722
+ // "fee": "0.030000000000000000",
1723
+ // "ts": "1775213753407",
1724
+ // "brokerId": null,
1725
+ // "feeCurrency": "base_currency"
1726
+ // }
1727
+ // ]
1728
+ // }
1729
+ //
1730
+ response = await this.privateGetSpotTradeFillsHistory(this.extend(request, params));
1731
+ }
1732
+ else {
1733
+ response = await this.privateGetTradeFillsHistory(this.extend(request, params));
1734
+ }
1627
1735
  const data = this.safeList(response, 'data', []);
1628
1736
  return this.parseTrades(data, market, since, limit);
1629
1737
  }
package/js/src/hollaex.js CHANGED
@@ -635,7 +635,7 @@ export default class hollaex extends Exchange {
635
635
  // "low": 8607,
636
636
  // "last": 8841.05,
637
637
  // "volume": 20.2802,
638
- // "timestamp": "2020-03-03T03:11:18.964Z"
638
+ // "timestamp": "2020-03-03T03:11:18.965Z"
639
639
  // }
640
640
  //
641
641
  return this.parseTicker(response, market);
package/js/src/kraken.js CHANGED
@@ -161,56 +161,64 @@ export default class kraken extends Exchange {
161
161
  'public': {
162
162
  'get': {
163
163
  // rate-limits explained in comment in the top of this file
164
+ 'Time': 1,
165
+ 'SystemStatus': 1,
164
166
  'Assets': 1,
165
167
  'AssetPairs': 1,
166
- 'Depth': 1.2,
167
- 'OHLC': 1.2,
168
- 'Spread': 1,
169
- 'SystemStatus': 1,
170
168
  'Ticker': 1,
171
- 'Time': 1,
169
+ 'OHLC': 1.2,
170
+ 'Depth': 1.2,
171
+ 'Level3': 1.2,
172
+ 'GroupedBook': 1.2,
172
173
  'Trades': 1.2,
174
+ 'Spread': 1,
175
+ 'PreTrade': 1,
176
+ 'PostTrade': 1,
173
177
  },
174
178
  },
175
179
  'private': {
176
180
  'post': {
177
- 'AddOrder': 0,
178
- 'AddOrderBatch': 0,
181
+ // account
182
+ 'Balance': 3,
183
+ 'BalanceEx': 3,
184
+ 'CreditLines': 3,
185
+ 'TradeBalance': 3,
186
+ 'OpenOrders': 3,
187
+ 'ClosedOrders': 3,
188
+ 'QueryOrders': 3,
189
+ 'OrderAmends': 3,
190
+ 'TradesHistory': 6,
191
+ 'QueryTrades': 3,
192
+ 'OpenPositions': 3,
193
+ 'Ledgers': 6,
194
+ 'QueryLedgers': 3,
195
+ 'TradeVolume': 3,
179
196
  'AddExport': 3,
197
+ 'ExportStatus': 3,
198
+ 'RetrieveExport': 3,
199
+ 'RemoveExport': 3,
200
+ 'GetApiKeyInfo': 3,
201
+ // trading
202
+ 'AddOrder': 0,
180
203
  'AmendOrder': 0,
181
- 'Balance': 3,
204
+ 'CancelOrder': 0,
182
205
  'CancelAll': 3,
183
206
  'CancelAllOrdersAfter': 3,
184
- 'CancelOrder': 0,
207
+ 'GetWebSocketsToken': 3,
208
+ 'AddOrderBatch': 0,
185
209
  'CancelOrderBatch': 0,
186
- 'ClosedOrders': 3,
187
- 'DepositAddresses': 3,
210
+ 'EditOrder': 0,
211
+ // funding
188
212
  'DepositMethods': 3,
213
+ 'DepositAddresses': 3,
189
214
  'DepositStatus': 3,
190
- 'EditOrder': 0,
191
- 'ExportStatus': 3,
192
- 'GetWebSocketsToken': 3,
193
- 'Ledgers': 6,
194
- 'OpenOrders': 3,
195
- 'OpenPositions': 3,
196
- 'QueryLedgers': 3,
197
- 'QueryOrders': 3,
198
- 'QueryTrades': 3,
199
- 'RetrieveExport': 3,
200
- 'RemoveExport': 3,
201
- 'BalanceEx': 3,
202
- 'TradeBalance': 3,
203
- 'TradesHistory': 6,
204
- 'TradeVolume': 3,
205
- 'Withdraw': 3,
206
- 'WithdrawCancel': 3,
207
- 'WithdrawInfo': 3,
208
215
  'WithdrawMethods': 3,
209
216
  'WithdrawAddresses': 3,
217
+ 'WithdrawInfo': 3,
218
+ 'Withdraw': 3,
210
219
  'WithdrawStatus': 3,
220
+ 'WithdrawCancel': 3,
211
221
  'WalletTransfer': 3,
212
- // account
213
- 'GetApiKeyInfo': 3,
214
222
  // sub accounts
215
223
  'CreateSubaccount': 3,
216
224
  'AccountTransfer': 3,