okx-api 1.5.0 → 1.5.2

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.
@@ -99,6 +99,10 @@ class RestClient extends BaseRestClient_1.default {
99
99
  getAccountInstruments(params) {
100
100
  return this.getPrivate('/api/v5/account/instruments', params);
101
101
  }
102
+ /**
103
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
104
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
105
+ */
102
106
  getBalance(ccy) {
103
107
  return this.getPrivate('/api/v5/account/balance', { ccy });
104
108
  }
@@ -108,6 +112,10 @@ class RestClient extends BaseRestClient_1.default {
108
112
  getPositionsHistory(params) {
109
113
  return this.getPrivate('/api/v5/account/positions-history', params);
110
114
  }
115
+ /**
116
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
117
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
118
+ */
111
119
  getAccountPositionRisk(instType) {
112
120
  return this.getPrivate('/api/v5/account/account-position-risk', {
113
121
  instType,
@@ -142,6 +150,10 @@ class RestClient extends BaseRestClient_1.default {
142
150
  getAccountConfiguration() {
143
151
  return this.getPrivate('/api/v5/account/config');
144
152
  }
153
+ /**
154
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
155
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
156
+ */
145
157
  setPositionMode(posMode) {
146
158
  return this.postPrivate('/api/v5/account/set-position-mode', { posMode });
147
159
  }
@@ -159,7 +171,8 @@ class RestClient extends BaseRestClient_1.default {
159
171
  return this.postPrivate('/api/v5/account/position/margin-balance', params);
160
172
  }
161
173
  /**
162
- * @deprecated - Use getLeverageV2() instead, which uses an object for all parameters.
174
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
175
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
163
176
  */
164
177
  getLeverage(instId, mgnMode) {
165
178
  return this.getPrivate('/api/v5/account/leverage-info', {
@@ -174,8 +187,8 @@ class RestClient extends BaseRestClient_1.default {
174
187
  return this.getPrivate('/api/v5/account/adjust-leverage-info', params);
175
188
  }
176
189
  /**
177
- * @deprecated - Use getMaxLoanV2() instead, which uses an object for all parameters.
178
- * In future, getMaxLoan() will also use an object for params (breaking change if you continue using getMaxLoan() as is)
190
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
191
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
179
192
  */
180
193
  getMaxLoan(instId, mgnMode, mgnCcy, ccy) {
181
194
  return this.getPrivate('/api/v5/account/max-loan', {
@@ -189,8 +202,8 @@ class RestClient extends BaseRestClient_1.default {
189
202
  return this.getPrivate('/api/v5/account/max-loan', params);
190
203
  }
191
204
  /**
192
- * @deprecated - Use getFeeRatesV2() instead, which uses an object for all parameters.
193
- * In future, getFeeRates() will also use an object for params (breaking change if you continue using getFeeRates() as is)
205
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
206
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
194
207
  */
195
208
  getFeeRates(instType, instId, uly, instFamily, ruleType) {
196
209
  return this.getPrivate('/api/v5/account/trade-fee', {
@@ -207,18 +220,34 @@ class RestClient extends BaseRestClient_1.default {
207
220
  getInterestAccrued(params) {
208
221
  return this.getPrivate('/api/v5/account/interest-accrued', params);
209
222
  }
223
+ /**
224
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
225
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
226
+ */
210
227
  getInterestRate(ccy) {
211
228
  return this.getPrivate('/api/v5/account/interest-rate', { ccy });
212
229
  }
230
+ /**
231
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
232
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
233
+ */
213
234
  setGreeksDisplayType(greeksType) {
214
235
  return this.postPrivate('/api/v5/account/set-greeks', { greeksType });
215
236
  }
237
+ /**
238
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
239
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
240
+ */
216
241
  setIsolatedMode(isoMode, type) {
217
242
  return this.postPrivate('/api/v5/account/set-isolated-mode', {
218
243
  isoMode,
219
244
  type,
220
245
  });
221
246
  }
247
+ /**
248
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
249
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
250
+ */
222
251
  getMaxWithdrawals(ccy) {
223
252
  return this.getPrivate('/api/v5/account/max-withdrawal', { ccy });
224
253
  }
@@ -231,6 +260,10 @@ class RestClient extends BaseRestClient_1.default {
231
260
  getQuickMarginBorrowRepayHistory(params) {
232
261
  return this.getPrivate('/api/v5/account/quick-margin-borrow-repay-history', params);
233
262
  }
263
+ /**
264
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
265
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
266
+ */
234
267
  borrowRepayVIPLoan(ccy, side, amt, ordId) {
235
268
  return this.postPrivate('/api/v5/account/borrow-repay', {
236
269
  ccy,
@@ -299,6 +332,10 @@ class RestClient extends BaseRestClient_1.default {
299
332
  updateRiskOffsetAmount(params) {
300
333
  return this.postPrivate('/api/v5/account/set-riskOffset-amt', params);
301
334
  }
335
+ /**
336
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
337
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
338
+ */
302
339
  getGreeks(ccy) {
303
340
  return this.getPrivate('/api/v5/account/greeks', { ccy });
304
341
  }
@@ -393,11 +430,16 @@ class RestClient extends BaseRestClient_1.default {
393
430
  return this.getPrivate('/api/v5/trade/easy-convert-currency-list', params);
394
431
  }
395
432
  /**
433
+ *
434
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
435
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
436
+ *
396
437
  * Place easy convert : Convert small currencies to mainstream currencies.
397
438
  * Only applicable to the crypto balance less than $10.
398
439
  *
399
440
  * Maximum 5 currencies can be selected in one order.
400
441
  * If there are multiple currencies, separate them with commas in the "from" field.
442
+ *
401
443
  */
402
444
  submitEasyConvert(fromCcys, toCcy, source) {
403
445
  return this.postPrivate('/api/v5/trade/easy-convert', {
@@ -411,6 +453,10 @@ class RestClient extends BaseRestClient_1.default {
411
453
  return this.getPrivate('/api/v5/trade/easy-convert-history', params);
412
454
  }
413
455
  /**
456
+ *
457
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
458
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
459
+ *
414
460
  * Get one-click repay currency list : Get list of debt currency data and repay currencies.
415
461
  * Debt currencies include both cross and isolated debts.
416
462
  */
@@ -420,6 +466,9 @@ class RestClient extends BaseRestClient_1.default {
420
466
  });
421
467
  }
422
468
  /**
469
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
470
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
471
+ *
423
472
  * Trade one-click repay to repay cross debts.
424
473
  * Isolated debts are not applicable.
425
474
  * The maximum repayment amount is based on the remaining available balance of funding and trading accounts.
@@ -480,6 +529,10 @@ class RestClient extends BaseRestClient_1.default {
480
529
  placeGridAlgoOrder(params) {
481
530
  return this.postPrivate('/api/v5/tradingBot/grid/order-algo', params);
482
531
  }
532
+ /**
533
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
534
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
535
+ */
483
536
  amendGridAlgoOrder(algoId, instId, triggerPx) {
484
537
  return this.postPrivate('/api/v5/tradingBot/grid/amend-order-algo', Object.assign({ algoId,
485
538
  instId }, triggerPx));
@@ -502,30 +555,49 @@ class RestClient extends BaseRestClient_1.default {
502
555
  getGridAlgoOrderHistory(params) {
503
556
  return this.getPrivate('/api/v5/tradingBot/grid/orders-algo-history', params);
504
557
  }
558
+ /**
559
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
560
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
561
+ */
505
562
  getGridAlgoOrderDetails(algoOrdType, algoId) {
506
563
  return this.getPrivate('/api/v5/tradingBot/grid/orders-algo-details', {
507
564
  algoOrdType,
508
565
  algoId,
509
566
  });
510
567
  }
568
+ /**
569
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
570
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
571
+ */
511
572
  getGridAlgoSubOrders(algoOrdType, algoId, type, groupId, pagination) {
512
573
  return this.getPrivate('/api/v5/tradingBot/grid/sub-orders', Object.assign({ algoOrdType,
513
574
  algoId,
514
575
  type,
515
576
  groupId }, pagination));
516
577
  }
517
- /** Only contract grid supports this method */
578
+ /**
579
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
580
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
581
+ */
518
582
  getGridAlgoOrderPositions(algoOrdType, algoId) {
519
583
  return this.getPrivate('/api/v5/tradingBot/grid/positions', {
520
584
  algoOrdType,
521
585
  algoId,
522
586
  });
523
587
  }
588
+ /**
589
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
590
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
591
+ */
524
592
  spotGridWithdrawIncome(algoId) {
525
593
  return this.postPrivate('/api/v5/tradingBot/grid/withdraw-income', {
526
594
  algoId,
527
595
  });
528
596
  }
597
+ /**
598
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
599
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
600
+ */
529
601
  computeGridMarginBalance(algoId, type, amt) {
530
602
  return this.postPrivate('/api/v5/tradingBot/grid/compute-margin-balance', {
531
603
  algoId,
@@ -533,6 +605,10 @@ class RestClient extends BaseRestClient_1.default {
533
605
  amt,
534
606
  });
535
607
  }
608
+ /**
609
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
610
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
611
+ */
536
612
  adjustGridMarginBalance(algoId, type, change) {
537
613
  return this.postPrivate('/api/v5/tradingBot/grid/margin-balance', Object.assign({ algoId,
538
614
  type }, change));
@@ -540,6 +616,10 @@ class RestClient extends BaseRestClient_1.default {
540
616
  adjustGridInvestment(params) {
541
617
  return this.postPrivate('/api/v5/tradingBot/grid/adjust-investment', params);
542
618
  }
619
+ /**
620
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
621
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
622
+ */
543
623
  getGridAIParameter(algoOrdType, instId, direction, duration) {
544
624
  return this.get('/api/v5/tradingBot/grid/ai-param', {
545
625
  algoOrdType,
@@ -766,17 +846,29 @@ class RestClient extends BaseRestClient_1.default {
766
846
  * Orderbook trading - Market data endpoints
767
847
  *
768
848
  */
849
+ /**
850
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
851
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
852
+ */
769
853
  getTickers(instrumentType, uly) {
770
854
  return this.get('/api/v5/market/tickers', {
771
855
  instType: instrumentType,
772
856
  uly,
773
857
  });
774
858
  }
859
+ /**
860
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
861
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
862
+ */
775
863
  getTicker(instId) {
776
864
  return this.get('/api/v5/market/ticker', {
777
865
  instId,
778
866
  });
779
867
  }
868
+ /**
869
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
870
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
871
+ */
780
872
  getOrderBook(instId, sz) {
781
873
  return this.get('/api/v5/market/books', { instId, sz });
782
874
  }
@@ -784,12 +876,8 @@ class RestClient extends BaseRestClient_1.default {
784
876
  return this.get('/api/v5/market/books-full', params);
785
877
  }
786
878
  /**
787
- * @deprecated this method's parameters will change to an object in the next release. Use getCandlesV2 instead.
788
- *
789
- * @param instId
790
- * @param bar
791
- * @param pagination
792
- * @returns
879
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
880
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
793
881
  */
794
882
  getCandles(instId, bar = '1m', pagination) {
795
883
  return this.get('/api/v5/market/candles', Object.assign({ instId,
@@ -799,12 +887,8 @@ class RestClient extends BaseRestClient_1.default {
799
887
  return this.get('/api/v5/market/candles', params);
800
888
  }
801
889
  /**
802
- * @deprecated this method's parameters will change to an object in the next release. Use getHistoricCandlesV2 instead.
803
- *
804
- * @param instId
805
- * @param bar
806
- * @param pagination
807
- * @returns
890
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
891
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
808
892
  */
809
893
  getHistoricCandles(instId, bar = '1m', pagination) {
810
894
  return this.get('/api/v5/market/history-candles', Object.assign({ instId,
@@ -813,9 +897,17 @@ class RestClient extends BaseRestClient_1.default {
813
897
  getHistoricCandlesV2(params) {
814
898
  return this.get('/api/v5/market/history-candles', params);
815
899
  }
900
+ /**
901
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
902
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
903
+ */
816
904
  getTrades(instId, limit) {
817
905
  return this.get('/api/v5/market/trades', { instId, limit });
818
906
  }
907
+ /**
908
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
909
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
910
+ */
819
911
  getHistoricTrades(instId, pagination) {
820
912
  return this.get('/api/v5/market/history-trades', Object.assign({ instId }, pagination));
821
913
  }
@@ -893,9 +985,17 @@ class RestClient extends BaseRestClient_1.default {
893
985
  getPublicRFQBlockTrades(params) {
894
986
  return this.get('/api/v5/rfq/public-trades', params);
895
987
  }
988
+ /**
989
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
990
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
991
+ */
896
992
  getBlockTickers(instType, uly) {
897
993
  return this.get('/api/v5/market/block-tickers', { instType, uly });
898
994
  }
995
+ /**
996
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
997
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
998
+ */
899
999
  getBlockTicker(instId) {
900
1000
  return this.get('/api/v5/market/block-ticker', { instId });
901
1001
  }
@@ -960,6 +1060,10 @@ class RestClient extends BaseRestClient_1.default {
960
1060
  * Public data - rest endpoints
961
1061
  *
962
1062
  */
1063
+ /**
1064
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1065
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1066
+ */
963
1067
  getInstruments(instType, uly, instFamily, instId) {
964
1068
  return this.get('/api/v5/public/instruments', {
965
1069
  instType,
@@ -1022,16 +1126,16 @@ class RestClient extends BaseRestClient_1.default {
1022
1126
  getPremiumHistory(params) {
1023
1127
  return this.get('/api/v5/public/premium-history', params);
1024
1128
  }
1129
+ /**
1130
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1131
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1132
+ */
1025
1133
  getIndexTickers(params) {
1026
1134
  return this.get('/api/v5/market/index-tickers', Object.assign({}, params));
1027
1135
  }
1028
1136
  /**
1029
- * @deprecated this method's parameters will change to an object in the next release. Use getIndexCandlesV2 instead.
1030
- *
1031
- * @param instId
1032
- * @param bar
1033
- * @param pagination
1034
- * @returns
1137
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1138
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1035
1139
  */
1036
1140
  getIndexCandles(instId, bar = '1m', pagination) {
1037
1141
  return this.get('/api/v5/market/index-candles', Object.assign({ instId,
@@ -1041,12 +1145,8 @@ class RestClient extends BaseRestClient_1.default {
1041
1145
  return this.get('/api/v5/market/index-candles', params);
1042
1146
  }
1043
1147
  /**
1044
- * @deprecated this method's parameters will change to an object in the next release. Use getHistoricIndexCandlesV2 instead.
1045
- *
1046
- * @param instId
1047
- * @param bar
1048
- * @param pagination
1049
- * @returns
1148
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1149
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1050
1150
  */
1051
1151
  getHistoricIndexCandles(instId, bar = '1m', pagination) {
1052
1152
  return this.get('/api/v5/market/history-index-candles', Object.assign({ instId,
@@ -1056,12 +1156,8 @@ class RestClient extends BaseRestClient_1.default {
1056
1156
  return this.get('/api/v5/market/history-index-candles', params);
1057
1157
  }
1058
1158
  /**
1059
- * @deprecated this method's parameters will change to an object in the next release. Use getMarkPriceCandlesV2 instead.
1060
- *
1061
- * @param instId
1062
- * @param bar
1063
- * @param pagination
1064
- * @returns
1159
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1160
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1065
1161
  */
1066
1162
  getMarkPriceCandles(instId, bar = '1m', pagination) {
1067
1163
  return this.get('/api/v5/market/mark-price-candles', Object.assign({ instId,
@@ -1071,12 +1167,8 @@ class RestClient extends BaseRestClient_1.default {
1071
1167
  return this.get('/api/v5/market/mark-price-candles', params);
1072
1168
  }
1073
1169
  /**
1074
- * @deprecated this method's parameters will change to an object in the next release. Use getHistoricMarkPriceCandlesV2 instead.
1075
- *
1076
- * @param instId
1077
- * @param bar
1078
- * @param pagination
1079
- * @returns
1170
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1171
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1080
1172
  */
1081
1173
  getHistoricMarkPriceCandles(instId, bar = '1m', pagination) {
1082
1174
  return this.get('/api/v5/market/historic-mark-price-candles', Object.assign({ instId,
@@ -1091,6 +1183,10 @@ class RestClient extends BaseRestClient_1.default {
1091
1183
  getExchangeRate() {
1092
1184
  return this.get('/api/v5/market/exchange-rate');
1093
1185
  }
1186
+ /**
1187
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1188
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1189
+ */
1094
1190
  getIndexComponents(index) {
1095
1191
  return this.get('/api/v5/market/index-components', { index });
1096
1192
  }
@@ -1098,7 +1194,8 @@ class RestClient extends BaseRestClient_1.default {
1098
1194
  return this.getPrivate('/api/v5/public/economic-calendar', params);
1099
1195
  }
1100
1196
  /**
1101
- * @deprecated
1197
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1198
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1102
1199
  */
1103
1200
  getPublicBlockTrades(instId) {
1104
1201
  return this.get('/api/v5/market/block-trades', { instId });
@@ -1164,15 +1261,27 @@ class RestClient extends BaseRestClient_1.default {
1164
1261
  * Funding account - REST endpoints
1165
1262
  *
1166
1263
  */
1264
+ /**
1265
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1266
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1267
+ */
1167
1268
  getCurrencies(ccy) {
1168
1269
  return this.getPrivate('/api/v5/asset/currencies', { ccy });
1169
1270
  }
1271
+ /**
1272
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1273
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1274
+ */
1170
1275
  getBalances(ccy) {
1171
1276
  return this.getPrivate('/api/v5/asset/balances', { ccy });
1172
1277
  }
1173
1278
  getNonTradableAssets(params) {
1174
1279
  return this.getPrivate('/api/v5/asset/non-tradable-assets', params);
1175
1280
  }
1281
+ /**
1282
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1283
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1284
+ */
1176
1285
  getAccountAssetValuation(ccy) {
1177
1286
  return this.getPrivate('/api/v5/asset/asset-valuation', { ccy });
1178
1287
  }
@@ -1186,9 +1295,17 @@ class RestClient extends BaseRestClient_1.default {
1186
1295
  getAssetBillsDetails(params) {
1187
1296
  return this.getPrivate('/api/v5/asset/bills', params);
1188
1297
  }
1298
+ /**
1299
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1300
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1301
+ */
1189
1302
  getLightningDeposits(ccy, amt, to) {
1190
1303
  return this.getPrivate('/api/v5/asset/deposit-lightning', { ccy, amt, to });
1191
1304
  }
1305
+ /**
1306
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1307
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1308
+ */
1192
1309
  getDepositAddress(ccy) {
1193
1310
  return this.getPrivate('/api/v5/asset/deposit-address', { ccy });
1194
1311
  }
@@ -1198,6 +1315,10 @@ class RestClient extends BaseRestClient_1.default {
1198
1315
  submitWithdraw(params) {
1199
1316
  return this.postPrivate('/api/v5/asset/withdrawal', params);
1200
1317
  }
1318
+ /**
1319
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1320
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1321
+ */
1201
1322
  submitWithdrawLightning(ccy, invoice, memo) {
1202
1323
  return this.postPrivate('/api/v5/asset/withdrawal-lightning', {
1203
1324
  ccy,
@@ -1205,6 +1326,10 @@ class RestClient extends BaseRestClient_1.default {
1205
1326
  memo,
1206
1327
  });
1207
1328
  }
1329
+ /**
1330
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1331
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1332
+ */
1208
1333
  cancelWithdrawal(wdId) {
1209
1334
  return this.postPrivate('/api/v5/asset/cancel-withdrawal', { wdId });
1210
1335
  }
@@ -1214,7 +1339,8 @@ class RestClient extends BaseRestClient_1.default {
1214
1339
  getDepositWithdrawStatus(params) {
1215
1340
  return this.getPrivate('/api/v5/asset/deposit-withdraw-status', params);
1216
1341
  }
1217
- /** @deprecated
1342
+ /**
1343
+ * @deprecated
1218
1344
  * use submitEasyConvert() instead
1219
1345
  */
1220
1346
  smallAssetsConvert(ccy) {
@@ -1232,6 +1358,10 @@ class RestClient extends BaseRestClient_1.default {
1232
1358
  getConvertCurrencies() {
1233
1359
  return this.getPrivate('/api/v5/asset/convert/currencies');
1234
1360
  }
1361
+ /**
1362
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1363
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1364
+ */
1235
1365
  getConvertCurrencyPair(fromCcy, toCcy) {
1236
1366
  return this.getPrivate('/api/v5/asset/convert/currency-pair', {
1237
1367
  fromCcy,
@@ -1256,16 +1386,25 @@ class RestClient extends BaseRestClient_1.default {
1256
1386
  getSubAccountList(params) {
1257
1387
  return this.getPrivate('/api/v5/users/subaccount/list', params);
1258
1388
  }
1259
- /** Reset the APIKey of a sub-account */
1389
+ /**
1390
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1391
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1392
+ */
1260
1393
  resetSubAccountAPIKey(subAcct, apiKey, options) {
1261
1394
  return this.postPrivate('/api/v5/users/subaccount/modify-apikey', Object.assign({ subAcct,
1262
1395
  apiKey }, options));
1263
1396
  }
1264
- /** Get sub-account trading balance */
1397
+ /**
1398
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1399
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1400
+ */
1265
1401
  getSubAccountBalances(subAcct) {
1266
1402
  return this.getPrivate('/api/v5/account/subaccount/balances', { subAcct });
1267
1403
  }
1268
- /** Get sub-account funding balance */
1404
+ /**
1405
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1406
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1407
+ */
1269
1408
  getSubAccountFundingBalances(subAcct, ccy) {
1270
1409
  return this.getPrivate('/api/v5/asset/subaccount/balances', {
1271
1410
  subAcct,
@@ -1286,14 +1425,20 @@ class RestClient extends BaseRestClient_1.default {
1286
1425
  transferSubAccountBalance(params) {
1287
1426
  return this.postPrivate('/api/v5/asset/subaccount/transfer', params);
1288
1427
  }
1289
- /** Set Permission Of Transfer Out */
1428
+ /**
1429
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1430
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1431
+ */
1290
1432
  setSubAccountTransferOutPermission(subAcct, canTransOut = true) {
1291
1433
  return this.postPrivate('/api/v5/users/subaccount/set-transfer-out', {
1292
1434
  subAcct,
1293
1435
  canTransOut,
1294
1436
  });
1295
1437
  }
1296
- /** Get custody trading sub-account list */
1438
+ /**
1439
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1440
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1441
+ */
1297
1442
  getSubAccountCustodyTradingList(subAcct) {
1298
1443
  return this.getPrivate('/api/v5/users/entrust-subaccount-list', {
1299
1444
  subAcct,
@@ -1314,7 +1459,10 @@ class RestClient extends BaseRestClient_1.default {
1314
1459
  getStakingOffers(params) {
1315
1460
  return this.getPrivate('/api/v5/finance/staking-defi/offers', params);
1316
1461
  }
1317
- /** Earn/staking purchase */
1462
+ /**
1463
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1464
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1465
+ */
1318
1466
  submitStake(productId, investData, term) {
1319
1467
  return this.postPrivate('/api/v5/finance/staking-defi/purchase', {
1320
1468
  productId,
@@ -1322,7 +1470,10 @@ class RestClient extends BaseRestClient_1.default {
1322
1470
  term,
1323
1471
  });
1324
1472
  }
1325
- /** Earn/staking redeem */
1473
+ /**
1474
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1475
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1476
+ */
1326
1477
  redeemStake(ordId, protocolType, allowEarlyRedeem) {
1327
1478
  return this.postPrivate('/api/v5/finance/staking-defi/redeem', {
1328
1479
  ordId,
@@ -1330,7 +1481,10 @@ class RestClient extends BaseRestClient_1.default {
1330
1481
  allowEarlyRedeem,
1331
1482
  });
1332
1483
  }
1333
- /** Earn/staking cancel purchases/redemptions */
1484
+ /**
1485
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1486
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1487
+ */
1334
1488
  cancelStakingRequest(ordId, protocolType) {
1335
1489
  return this.postPrivate('/api/v5/finance/staking-defi/cancel', {
1336
1490
  ordId,
@@ -1373,9 +1527,17 @@ class RestClient extends BaseRestClient_1.default {
1373
1527
  * Financial product - simple earn flexible endpoints
1374
1528
  *
1375
1529
  */
1530
+ /**
1531
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1532
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1533
+ */
1376
1534
  getSavingBalance(ccy) {
1377
1535
  return this.getPrivate('/api/v5/finance/savings/balance', { ccy });
1378
1536
  }
1537
+ /**
1538
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1539
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1540
+ */
1379
1541
  savingsPurchaseRedemption(ccy, amt, side, rate) {
1380
1542
  return this.postPrivate('/api/v5/finance/savings/purchase-redempt', {
1381
1543
  ccy,
@@ -1384,6 +1546,10 @@ class RestClient extends BaseRestClient_1.default {
1384
1546
  rate,
1385
1547
  });
1386
1548
  }
1549
+ /**
1550
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1551
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1552
+ */
1387
1553
  setLendingRate(ccy, rate) {
1388
1554
  return this.postPrivate('/api/v5/finance/savings/set-lending-rate', {
1389
1555
  ccy,
@@ -1393,6 +1559,10 @@ class RestClient extends BaseRestClient_1.default {
1393
1559
  getLendingHistory(params) {
1394
1560
  return this.getPrivate('/api/v5/finance/savings/lending-history', params);
1395
1561
  }
1562
+ /**
1563
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1564
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1565
+ */
1396
1566
  getPublicBorrowInfo(ccy) {
1397
1567
  return this.get('/api/v5/finance/savings/lending-rate-summary', { ccy });
1398
1568
  }
@@ -1467,6 +1637,10 @@ class RestClient extends BaseRestClient_1.default {
1467
1637
  * Status endpoints (public)
1468
1638
  *
1469
1639
  */
1640
+ /**
1641
+ * @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
1642
+ * See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
1643
+ */
1470
1644
  getSystemStatus(state) {
1471
1645
  return this.get('/api/v5/system/status', { state });
1472
1646
  }