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.
- package/lib/rest-client.d.ts +226 -52
- package/lib/rest-client.js +226 -52
- package/lib/rest-client.js.map +1 -1
- package/lib/types/rest/response/public-data.d.ts +1 -1
- package/package.json +1 -1
package/lib/rest-client.d.ts
CHANGED
|
@@ -33,9 +33,17 @@ export declare class RestClient extends BaseRestClient {
|
|
|
33
33
|
*
|
|
34
34
|
*/
|
|
35
35
|
getAccountInstruments(params: GetInstrumentsRequest): Promise<AccountInstrument[]>;
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
38
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
39
|
+
*/
|
|
36
40
|
getBalance(ccy?: string): Promise<AccountBalance[]>;
|
|
37
41
|
getPositions(params?: GetPositionsParams): Promise<AccountPosition[]>;
|
|
38
42
|
getPositionsHistory(params?: GetHistoricPositionParams): Promise<HistoricAccountPosition[]>;
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
45
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
46
|
+
*/
|
|
39
47
|
getAccountPositionRisk(instType?: Omit<'SPOT', InstrumentType>): Promise<AccountPositionRisk[]>;
|
|
40
48
|
/** Up to last 7 days */
|
|
41
49
|
getBills(params?: any): Promise<AccountBill[]>;
|
|
@@ -62,6 +70,10 @@ export declare class RestClient extends BaseRestClient {
|
|
|
62
70
|
quarter: 'Q1' | 'Q2' | 'Q3' | 'Q4';
|
|
63
71
|
}): Promise<AccountHistoryBill[]>;
|
|
64
72
|
getAccountConfiguration(): Promise<AccountConfiguration[]>;
|
|
73
|
+
/**
|
|
74
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
75
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
76
|
+
*/
|
|
65
77
|
setPositionMode(posMode: PosMode): Promise<AccountPositionModeResult[]>;
|
|
66
78
|
setLeverage(params: SetLeverageRequest): Promise<AccountLeverageResult[]>;
|
|
67
79
|
/** Max buy/sell amount or open amount */
|
|
@@ -82,7 +94,8 @@ export declare class RestClient extends BaseRestClient {
|
|
|
82
94
|
}): Promise<AccountMaxTradableAmount[]>;
|
|
83
95
|
changePositionMargin(params: ChangePositionMarginRequest): Promise<AccountChangeMarginResult[]>;
|
|
84
96
|
/**
|
|
85
|
-
* @deprecated
|
|
97
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
98
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
86
99
|
*/
|
|
87
100
|
getLeverage(instId: string, mgnMode: MarginMode): Promise<AccountLeverage[]>;
|
|
88
101
|
getLeverageV2(params: {
|
|
@@ -99,8 +112,8 @@ export declare class RestClient extends BaseRestClient {
|
|
|
99
112
|
posSide: PositionSide;
|
|
100
113
|
}): Promise<AdjustLeverageInfo[]>;
|
|
101
114
|
/**
|
|
102
|
-
* @deprecated
|
|
103
|
-
*
|
|
115
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
116
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
104
117
|
*/
|
|
105
118
|
getMaxLoan(instId: string, mgnMode: MarginMode, mgnCcy?: string | undefined, ccy?: string): Promise<AccountMaxLoan[]>;
|
|
106
119
|
getMaxLoanV2(params: {
|
|
@@ -110,8 +123,8 @@ export declare class RestClient extends BaseRestClient {
|
|
|
110
123
|
ccy?: string;
|
|
111
124
|
}): Promise<AccountMaxLoan[]>;
|
|
112
125
|
/**
|
|
113
|
-
* @deprecated
|
|
114
|
-
*
|
|
126
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
127
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
115
128
|
*/
|
|
116
129
|
getFeeRates(instType: InstrumentType, instId?: string, uly?: string, instFamily?: string, ruleType?: string): Promise<AccountFeeRate[]>;
|
|
117
130
|
getFeeRatesV2(params: {
|
|
@@ -130,13 +143,33 @@ export declare class RestClient extends BaseRestClient {
|
|
|
130
143
|
before?: string;
|
|
131
144
|
limit?: string;
|
|
132
145
|
}): Promise<InterestAccrued[]>;
|
|
146
|
+
/**
|
|
147
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
148
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
149
|
+
*/
|
|
133
150
|
getInterestRate(ccy?: string): Promise<InterestRate[]>;
|
|
151
|
+
/**
|
|
152
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
153
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
154
|
+
*/
|
|
134
155
|
setGreeksDisplayType(greeksType: 'PA' | 'BS'): Promise<Greeks[]>;
|
|
156
|
+
/**
|
|
157
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
158
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
159
|
+
*/
|
|
135
160
|
setIsolatedMode(isoMode: 'automatic' | 'autonomy', type: 'MARGIN' | 'CONTRACTS'): Promise<AccountIsolatedMode[]>;
|
|
161
|
+
/**
|
|
162
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
163
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
164
|
+
*/
|
|
136
165
|
getMaxWithdrawals(ccy?: string): Promise<MaxWithdrawal[]>;
|
|
137
166
|
getAccountRiskState(): Promise<AccountRiskState[]>;
|
|
138
167
|
submitQuickMarginBorrowRepay(params: QuickMarginBorrowRepayRequest): Promise<QuickMarginBorrowRepayResult[]>;
|
|
139
168
|
getQuickMarginBorrowRepayHistory(params: GetQuickMarginBorrowRepayHistoryRequest): Promise<QuickMarginBorrowRepayRecord[]>;
|
|
169
|
+
/**
|
|
170
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
171
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
172
|
+
*/
|
|
140
173
|
borrowRepayVIPLoan(ccy: string, side: 'borrow' | 'repay', amt: numberInString, ordId?: string): Promise<any[]>;
|
|
141
174
|
getVIPLoanBorrowRepayHistory(params?: any): Promise<any[]>;
|
|
142
175
|
getVIPInterestAccrued(params: GetVIPInterestRequest): Promise<VIPInterest[]>;
|
|
@@ -202,6 +235,10 @@ export declare class RestClient extends BaseRestClient {
|
|
|
202
235
|
ccy: string;
|
|
203
236
|
clSpotInUseAmt: string;
|
|
204
237
|
}[]>;
|
|
238
|
+
/**
|
|
239
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
240
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
241
|
+
*/
|
|
205
242
|
getGreeks(ccy?: string): Promise<any[]>;
|
|
206
243
|
getPMLimitation(params: {
|
|
207
244
|
instType: 'SWAP' | 'FUTURES' | 'OPTION';
|
|
@@ -275,21 +312,33 @@ export declare class RestClient extends BaseRestClient {
|
|
|
275
312
|
source?: string;
|
|
276
313
|
}): Promise<any>;
|
|
277
314
|
/**
|
|
315
|
+
*
|
|
316
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
317
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
318
|
+
*
|
|
278
319
|
* Place easy convert : Convert small currencies to mainstream currencies.
|
|
279
320
|
* Only applicable to the crypto balance less than $10.
|
|
280
321
|
*
|
|
281
322
|
* Maximum 5 currencies can be selected in one order.
|
|
282
323
|
* If there are multiple currencies, separate them with commas in the "from" field.
|
|
324
|
+
*
|
|
283
325
|
*/
|
|
284
326
|
submitEasyConvert(fromCcys: string[], toCcy: string, source?: string): Promise<APIResponse<any>>;
|
|
285
327
|
/** Get easy convert history : Get the history and status of easy convert trades. */
|
|
286
328
|
getEasyConvertHistory(params?: Pagination): Promise<APIResponse<any>>;
|
|
287
329
|
/**
|
|
330
|
+
*
|
|
331
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
332
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
333
|
+
*
|
|
288
334
|
* Get one-click repay currency list : Get list of debt currency data and repay currencies.
|
|
289
335
|
* Debt currencies include both cross and isolated debts.
|
|
290
336
|
*/
|
|
291
337
|
getOneClickRepayCurrencyList(debtType?: 'cross' | 'isolated'): Promise<APIResponse<any>>;
|
|
292
338
|
/**
|
|
339
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
340
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
341
|
+
*
|
|
293
342
|
* Trade one-click repay to repay cross debts.
|
|
294
343
|
* Isolated debts are not applicable.
|
|
295
344
|
* The maximum repayment amount is based on the remaining available balance of funding and trading accounts.
|
|
@@ -328,6 +377,10 @@ export declare class RestClient extends BaseRestClient {
|
|
|
328
377
|
*
|
|
329
378
|
*/
|
|
330
379
|
placeGridAlgoOrder(params: GridAlgoOrderRequest): Promise<any[]>;
|
|
380
|
+
/**
|
|
381
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
382
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
383
|
+
*/
|
|
331
384
|
amendGridAlgoOrder(algoId: string, instId: string, triggerPx: {
|
|
332
385
|
slTriggerPx?: numberInString;
|
|
333
386
|
tpTriggerPx?: numberInString;
|
|
@@ -346,16 +399,39 @@ export declare class RestClient extends BaseRestClient {
|
|
|
346
399
|
}[]>;
|
|
347
400
|
getGridAlgoOrderList(params: GetGridAlgoOrdersRequest): Promise<any[]>;
|
|
348
401
|
getGridAlgoOrderHistory(params: GetGridAlgoOrdersRequest): Promise<any[]>;
|
|
402
|
+
/**
|
|
403
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
404
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
405
|
+
*/
|
|
349
406
|
getGridAlgoOrderDetails(algoOrdType: GridAlgoOrderType, algoId: string): Promise<any[]>;
|
|
407
|
+
/**
|
|
408
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
409
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
410
|
+
*/
|
|
350
411
|
getGridAlgoSubOrders(algoOrdType: GridAlgoOrderType, algoId: string, type: GridAlgoSubOrderType, groupId?: string, pagination?: {
|
|
351
412
|
after?: numberInString;
|
|
352
413
|
before?: numberInString;
|
|
353
414
|
limit?: number;
|
|
354
415
|
}): Promise<any[]>;
|
|
355
|
-
/**
|
|
416
|
+
/**
|
|
417
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
418
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
419
|
+
*/
|
|
356
420
|
getGridAlgoOrderPositions(algoOrdType: 'contract_grid', algoId: string): Promise<any[]>;
|
|
421
|
+
/**
|
|
422
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
423
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
424
|
+
*/
|
|
357
425
|
spotGridWithdrawIncome(algoId: string): Promise<any[]>;
|
|
426
|
+
/**
|
|
427
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
428
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
429
|
+
*/
|
|
358
430
|
computeGridMarginBalance(algoId: string, type: 'add' | 'reduce', amt?: numberInString): Promise<any[]>;
|
|
431
|
+
/**
|
|
432
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
433
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
434
|
+
*/
|
|
359
435
|
adjustGridMarginBalance(algoId: string, type: 'add' | 'reduce', change: {
|
|
360
436
|
amt?: numberInString;
|
|
361
437
|
percent?: numberInString;
|
|
@@ -366,6 +442,10 @@ export declare class RestClient extends BaseRestClient {
|
|
|
366
442
|
}): Promise<{
|
|
367
443
|
algoId: string;
|
|
368
444
|
}[]>;
|
|
445
|
+
/**
|
|
446
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
447
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
448
|
+
*/
|
|
369
449
|
getGridAIParameter(algoOrdType: GridAlgoOrderType, instId: string, direction: ContractGridDirection, duration?: '7D' | '30D' | '180D'): Promise<any[]>;
|
|
370
450
|
computeGridMinInvestment(params: {
|
|
371
451
|
amt: string;
|
|
@@ -549,34 +629,46 @@ export declare class RestClient extends BaseRestClient {
|
|
|
549
629
|
* Orderbook trading - Market data endpoints
|
|
550
630
|
*
|
|
551
631
|
*/
|
|
632
|
+
/**
|
|
633
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
634
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
635
|
+
*/
|
|
552
636
|
getTickers(instrumentType: InstrumentType, uly?: string): Promise<Ticker[]>;
|
|
637
|
+
/**
|
|
638
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
639
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
640
|
+
*/
|
|
553
641
|
getTicker(instId: string): Promise<Ticker[]>;
|
|
642
|
+
/**
|
|
643
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
644
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
645
|
+
*/
|
|
554
646
|
getOrderBook(instId: string, sz?: numberInString): Promise<OrderBook[]>;
|
|
555
647
|
getFullOrderBook(params: {
|
|
556
648
|
instId: string;
|
|
557
649
|
sz?: string;
|
|
558
650
|
}): Promise<OrderBook[]>;
|
|
559
651
|
/**
|
|
560
|
-
* @deprecated this
|
|
561
|
-
*
|
|
562
|
-
* @param instId
|
|
563
|
-
* @param bar
|
|
564
|
-
* @param pagination
|
|
565
|
-
* @returns
|
|
652
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
653
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
566
654
|
*/
|
|
567
655
|
getCandles(instId: string, bar?: string, pagination?: Pagination): Promise<Candle[]>;
|
|
568
656
|
getCandlesV2(params: CandleRequest): Promise<Candle[]>;
|
|
569
657
|
/**
|
|
570
|
-
* @deprecated this
|
|
571
|
-
*
|
|
572
|
-
* @param instId
|
|
573
|
-
* @param bar
|
|
574
|
-
* @param pagination
|
|
575
|
-
* @returns
|
|
658
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
659
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
576
660
|
*/
|
|
577
661
|
getHistoricCandles(instId: string, bar?: string, pagination?: Pagination): Promise<Candle[]>;
|
|
578
662
|
getHistoricCandlesV2(params: CandleRequest): Promise<Candle[]>;
|
|
663
|
+
/**
|
|
664
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
665
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
666
|
+
*/
|
|
579
667
|
getTrades(instId: string, limit?: number): Promise<Trade[]>;
|
|
668
|
+
/**
|
|
669
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
670
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
671
|
+
*/
|
|
580
672
|
getHistoricTrades(instId: string, pagination?: {
|
|
581
673
|
after?: numberInString;
|
|
582
674
|
before?: numberInString;
|
|
@@ -622,7 +714,15 @@ export declare class RestClient extends BaseRestClient {
|
|
|
622
714
|
getBlockQuotes(params?: GetBlockQuoteParams): Promise<GetBlockQuoteResult[]>;
|
|
623
715
|
getBlockTrades(params?: any): Promise<any[]>;
|
|
624
716
|
getPublicRFQBlockTrades(params?: any): Promise<any[]>;
|
|
717
|
+
/**
|
|
718
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
719
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
720
|
+
*/
|
|
625
721
|
getBlockTickers(instType: InstrumentType, uly?: string): Promise<any[]>;
|
|
722
|
+
/**
|
|
723
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
724
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
725
|
+
*/
|
|
626
726
|
getBlockTicker(instId: string): Promise<any[]>;
|
|
627
727
|
getBlockPublicTrades(params: {
|
|
628
728
|
instId: string;
|
|
@@ -675,6 +775,10 @@ export declare class RestClient extends BaseRestClient {
|
|
|
675
775
|
* Public data - rest endpoints
|
|
676
776
|
*
|
|
677
777
|
*/
|
|
778
|
+
/**
|
|
779
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
780
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
781
|
+
*/
|
|
678
782
|
getInstruments(instType: InstrumentType, uly?: string, instFamily?: string, instId?: string): Promise<Instrument[]>;
|
|
679
783
|
getDeliveryExerciseHistory(params: any): Promise<any[]>;
|
|
680
784
|
getOpenInterest(params: any): Promise<any[]>;
|
|
@@ -697,56 +801,49 @@ export declare class RestClient extends BaseRestClient {
|
|
|
697
801
|
instFamily?: string;
|
|
698
802
|
}): Promise<any[]>;
|
|
699
803
|
getPremiumHistory(params: GetPremiumHistoryRequest): Promise<any[]>;
|
|
804
|
+
/**
|
|
805
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
806
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
807
|
+
*/
|
|
700
808
|
getIndexTickers(params: {
|
|
701
809
|
quoteCcy?: string;
|
|
702
810
|
instId?: string;
|
|
703
811
|
}): Promise<IndexTicker[]>;
|
|
704
812
|
/**
|
|
705
|
-
* @deprecated this
|
|
706
|
-
*
|
|
707
|
-
* @param instId
|
|
708
|
-
* @param bar
|
|
709
|
-
* @param pagination
|
|
710
|
-
* @returns
|
|
813
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
814
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
711
815
|
*/
|
|
712
816
|
getIndexCandles(instId: string, bar?: string, pagination?: Pagination): Promise<CandleNoVolume[]>;
|
|
713
817
|
getIndexCandlesV2(params: CandleRequest): Promise<CandleNoVolume[]>;
|
|
714
818
|
/**
|
|
715
|
-
* @deprecated this
|
|
716
|
-
*
|
|
717
|
-
* @param instId
|
|
718
|
-
* @param bar
|
|
719
|
-
* @param pagination
|
|
720
|
-
* @returns
|
|
819
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
820
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
721
821
|
*/
|
|
722
822
|
getHistoricIndexCandles(instId: string, bar?: string, pagination?: Pagination): Promise<CandleNoVolume[]>;
|
|
723
823
|
getHistoricIndexCandlesV2(params: CandleRequest): Promise<CandleNoVolume[]>;
|
|
724
824
|
/**
|
|
725
|
-
* @deprecated this
|
|
726
|
-
*
|
|
727
|
-
* @param instId
|
|
728
|
-
* @param bar
|
|
729
|
-
* @param pagination
|
|
730
|
-
* @returns
|
|
825
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
826
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
731
827
|
*/
|
|
732
828
|
getMarkPriceCandles(instId: string, bar?: string, pagination?: Pagination): Promise<CandleNoVolume[]>;
|
|
733
829
|
getMarkPriceCandlesV2(params: CandleRequest): Promise<CandleNoVolume[]>;
|
|
734
830
|
/**
|
|
735
|
-
* @deprecated this
|
|
736
|
-
*
|
|
737
|
-
* @param instId
|
|
738
|
-
* @param bar
|
|
739
|
-
* @param pagination
|
|
740
|
-
* @returns
|
|
831
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
832
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
741
833
|
*/
|
|
742
834
|
getHistoricMarkPriceCandles(instId: string, bar?: string, pagination?: Pagination): Promise<CandleNoVolume[]>;
|
|
743
835
|
getHistoricMarkPriceCandlesV2(params: CandleRequest): Promise<CandleNoVolume[]>;
|
|
744
836
|
getOracle(): Promise<any[]>;
|
|
745
837
|
getExchangeRate(): Promise<any[]>;
|
|
838
|
+
/**
|
|
839
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
840
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
841
|
+
*/
|
|
746
842
|
getIndexComponents(index: string): Promise<any[]>;
|
|
747
843
|
getEconomicCalendar(params: EconomicCalendarRequest): Promise<EconomicCalendarData[]>;
|
|
748
844
|
/**
|
|
749
|
-
* @deprecated
|
|
845
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
846
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
750
847
|
*/
|
|
751
848
|
getPublicBlockTrades(instId: string): Promise<any[]>;
|
|
752
849
|
/**
|
|
@@ -815,11 +912,23 @@ export declare class RestClient extends BaseRestClient {
|
|
|
815
912
|
* Funding account - REST endpoints
|
|
816
913
|
*
|
|
817
914
|
*/
|
|
915
|
+
/**
|
|
916
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
917
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
918
|
+
*/
|
|
818
919
|
getCurrencies(ccy?: string): Promise<FundingCurrency[]>;
|
|
920
|
+
/**
|
|
921
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
922
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
923
|
+
*/
|
|
819
924
|
getBalances(ccy?: string): Promise<FundingBalance[]>;
|
|
820
925
|
getNonTradableAssets(params?: {
|
|
821
926
|
ccy?: string;
|
|
822
927
|
}): Promise<NonTradableAsset[]>;
|
|
928
|
+
/**
|
|
929
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
930
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
931
|
+
*/
|
|
823
932
|
getAccountAssetValuation(ccy?: string): Promise<AccountAssetValuation[]>;
|
|
824
933
|
fundsTransfer(params: FundsTransferRequest): Promise<FundTransferResult[]>;
|
|
825
934
|
/** Either parameter transId or clientId is required. */
|
|
@@ -836,15 +945,32 @@ export declare class RestClient extends BaseRestClient {
|
|
|
836
945
|
before?: numberInString;
|
|
837
946
|
limit?: numberInString;
|
|
838
947
|
}): Promise<AssetBillDetails[]>;
|
|
948
|
+
/**
|
|
949
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
950
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
951
|
+
*/
|
|
839
952
|
getLightningDeposits(ccy: string, amt: numberInString, to?: '6' | '18'): Promise<any[]>;
|
|
953
|
+
/**
|
|
954
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
955
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
956
|
+
*/
|
|
840
957
|
getDepositAddress(ccy: string): Promise<any[]>;
|
|
841
958
|
getDepositHistory(params?: any): Promise<any[]>;
|
|
842
959
|
submitWithdraw(params: WithdrawRequest): Promise<WithdrawResponse[]>;
|
|
960
|
+
/**
|
|
961
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
962
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
963
|
+
*/
|
|
843
964
|
submitWithdrawLightning(ccy: string, invoice: string, memo?: string): Promise<any[]>;
|
|
965
|
+
/**
|
|
966
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
967
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
968
|
+
*/
|
|
844
969
|
cancelWithdrawal(wdId: string): Promise<any[]>;
|
|
845
970
|
getWithdrawalHistory(params?: WithdrawalHistoryRequest): Promise<any[]>;
|
|
846
971
|
getDepositWithdrawStatus(params: GetDepositWithdrawStatusRequest): Promise<any[]>;
|
|
847
|
-
/**
|
|
972
|
+
/**
|
|
973
|
+
* @deprecated
|
|
848
974
|
* use submitEasyConvert() instead
|
|
849
975
|
*/
|
|
850
976
|
smallAssetsConvert(ccy: string[]): Promise<any[]>;
|
|
@@ -856,6 +982,10 @@ export declare class RestClient extends BaseRestClient {
|
|
|
856
982
|
month: string;
|
|
857
983
|
}): Promise<any[]>;
|
|
858
984
|
getConvertCurrencies(): Promise<any[]>;
|
|
985
|
+
/**
|
|
986
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
987
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
988
|
+
*/
|
|
859
989
|
getConvertCurrencyPair(fromCcy: string, toCcy: string): Promise<any[]>;
|
|
860
990
|
estimateConvertQuote(params: ConvertQuoteEstimateRequest): Promise<any[]>;
|
|
861
991
|
convertTrade(params: ConvertTradeRequest): Promise<any[]>;
|
|
@@ -867,15 +997,24 @@ export declare class RestClient extends BaseRestClient {
|
|
|
867
997
|
*/
|
|
868
998
|
/** View sub-account list */
|
|
869
999
|
getSubAccountList(params?: any): Promise<SubAccount[]>;
|
|
870
|
-
/**
|
|
1000
|
+
/**
|
|
1001
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
1002
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
1003
|
+
*/
|
|
871
1004
|
resetSubAccountAPIKey(subAcct: string, apiKey: string, options?: {
|
|
872
1005
|
label?: string;
|
|
873
1006
|
perm?: string;
|
|
874
1007
|
ip?: string;
|
|
875
1008
|
}): Promise<SubAccountAPIReset[]>;
|
|
876
|
-
/**
|
|
1009
|
+
/**
|
|
1010
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
1011
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
1012
|
+
*/
|
|
877
1013
|
getSubAccountBalances(subAcct: string): Promise<SubAccountBalances[]>;
|
|
878
|
-
/**
|
|
1014
|
+
/**
|
|
1015
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
1016
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
1017
|
+
*/
|
|
879
1018
|
getSubAccountFundingBalances(subAcct: string, ccy?: string): Promise<FundingBalance[]>;
|
|
880
1019
|
getSubAccountMaxWithdrawal(params: GetSubAccountMaxWithdrawalsRequest): Promise<SubAccountMaxWithdrawal[]>;
|
|
881
1020
|
/** History of sub-account transfer */
|
|
@@ -890,9 +1029,15 @@ export declare class RestClient extends BaseRestClient {
|
|
|
890
1029
|
getManagedSubAccountTransferHistory(params: GetManagedSubAccountTransferHistoryRequest): Promise<ManagedSubAccountTransfer[]>;
|
|
891
1030
|
/** Master accounts manage the transfers between sub-accounts */
|
|
892
1031
|
transferSubAccountBalance(params: SubAccountTransferRequest): Promise<SubAccountTransferResult[]>;
|
|
893
|
-
/**
|
|
1032
|
+
/**
|
|
1033
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
1034
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
1035
|
+
*/
|
|
894
1036
|
setSubAccountTransferOutPermission(subAcct: string, canTransOut?: boolean): Promise<any[]>;
|
|
895
|
-
/**
|
|
1037
|
+
/**
|
|
1038
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
1039
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
1040
|
+
*/
|
|
896
1041
|
getSubAccountCustodyTradingList(subAcct?: string): Promise<any[]>;
|
|
897
1042
|
setSubAccountLoanAllocation(params: SetSubAccountLoanAllocationRequest): Promise<{
|
|
898
1043
|
result: boolean;
|
|
@@ -912,14 +1057,23 @@ export declare class RestClient extends BaseRestClient {
|
|
|
912
1057
|
protocolType?: 'staking' | 'defi';
|
|
913
1058
|
ccy?: string;
|
|
914
1059
|
}): Promise<any[]>;
|
|
915
|
-
/**
|
|
1060
|
+
/**
|
|
1061
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
1062
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
1063
|
+
*/
|
|
916
1064
|
submitStake(productId: string, investData: {
|
|
917
1065
|
ccy: string;
|
|
918
1066
|
amt: string;
|
|
919
1067
|
}[], term?: string): Promise<any[]>;
|
|
920
|
-
/**
|
|
1068
|
+
/**
|
|
1069
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
1070
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
1071
|
+
*/
|
|
921
1072
|
redeemStake(ordId: string, protocolType: 'staking' | 'defi', allowEarlyRedeem?: boolean): Promise<any[]>;
|
|
922
|
-
/**
|
|
1073
|
+
/**
|
|
1074
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
1075
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
1076
|
+
*/
|
|
923
1077
|
cancelStakingRequest(ordId: string, protocolType: 'staking' | 'defi'): Promise<any[]>;
|
|
924
1078
|
/** Earn/staking get active orders */
|
|
925
1079
|
getActiveStakingOrders(params?: {
|
|
@@ -965,10 +1119,26 @@ export declare class RestClient extends BaseRestClient {
|
|
|
965
1119
|
* Financial product - simple earn flexible endpoints
|
|
966
1120
|
*
|
|
967
1121
|
*/
|
|
1122
|
+
/**
|
|
1123
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
1124
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
1125
|
+
*/
|
|
968
1126
|
getSavingBalance(ccy?: string): Promise<any[]>;
|
|
1127
|
+
/**
|
|
1128
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
1129
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
1130
|
+
*/
|
|
969
1131
|
savingsPurchaseRedemption(ccy: string, amt: numberInString, side: 'purchase' | 'redempt', rate: numberInString): Promise<any[]>;
|
|
1132
|
+
/**
|
|
1133
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
1134
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
1135
|
+
*/
|
|
970
1136
|
setLendingRate(ccy: string, rate: numberInString): Promise<any[]>;
|
|
971
1137
|
getLendingHistory(params?: PaginatedSymbolRequest): Promise<any[]>;
|
|
1138
|
+
/**
|
|
1139
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
1140
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
1141
|
+
*/
|
|
972
1142
|
getPublicBorrowInfo(ccy?: string): Promise<any[]>;
|
|
973
1143
|
getPublicBorrowHistory(params?: PaginatedSymbolRequest): Promise<any[]>;
|
|
974
1144
|
/**
|
|
@@ -1024,6 +1194,10 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1024
1194
|
* Status endpoints (public)
|
|
1025
1195
|
*
|
|
1026
1196
|
*/
|
|
1197
|
+
/**
|
|
1198
|
+
* @deprecated Breaking change: this function will change soon to accept a single object for all REST API parameters.
|
|
1199
|
+
* See issue https://github.com/tiagosiebler/okx-api/issues/88 for more details.
|
|
1200
|
+
*/
|
|
1027
1201
|
getSystemStatus(state?: 'scheduled' | 'ongoing' | 'pre_open' | 'completed' | 'canceled'): Promise<any[]>;
|
|
1028
1202
|
/**
|
|
1029
1203
|
*
|