okx-api 3.1.2 → 3.1.4
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 +1 -0
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/rest-client.d.ts +66 -31
- package/dist/cjs/rest-client.js +71 -4
- package/dist/cjs/rest-client.js.map +1 -1
- package/dist/cjs/types/rest/request/account.d.ts +13 -1
- package/dist/cjs/types/rest/request/convert.d.ts +4 -0
- package/dist/cjs/types/rest/request/dual-investment.d.ts +35 -0
- package/dist/cjs/types/rest/request/dual-investment.js +3 -0
- package/dist/cjs/types/rest/request/dual-investment.js.map +1 -0
- package/dist/cjs/types/rest/request/funding.d.ts +8 -0
- package/dist/cjs/types/rest/request/public.d.ts +45 -0
- package/dist/cjs/types/rest/request/trade.d.ts +68 -48
- package/dist/cjs/types/rest/response/private-account.d.ts +42 -2
- package/dist/cjs/types/rest/response/private-dual-investment.d.ts +87 -0
- package/dist/cjs/types/rest/response/private-dual-investment.js +3 -0
- package/dist/cjs/types/rest/response/private-dual-investment.js.map +1 -0
- package/dist/cjs/types/rest/response/private-flexible-loan.d.ts +22 -0
- package/dist/cjs/types/rest/response/private-trade.d.ts +30 -6
- package/dist/cjs/types/rest/response/public-data.d.ts +147 -0
- package/dist/cjs/types/rest/shared.d.ts +1 -1
- package/dist/cjs/types/websockets/ws-api-request.d.ts +21 -2
- package/dist/cjs/types/websockets/ws-api-response.d.ts +11 -0
- package/dist/cjs/types/websockets/ws-events.d.ts +1 -0
- package/dist/cjs/types/websockets/ws-request.d.ts +11 -4
- package/dist/mjs/index.d.ts +2 -0
- package/dist/mjs/index.js +2 -0
- package/dist/mjs/index.js.map +1 -1
- package/dist/mjs/rest-client.d.ts +66 -31
- package/dist/mjs/rest-client.js +71 -4
- package/dist/mjs/rest-client.js.map +1 -1
- package/dist/mjs/types/rest/request/account.d.ts +13 -1
- package/dist/mjs/types/rest/request/convert.d.ts +4 -0
- package/dist/mjs/types/rest/request/dual-investment.d.ts +35 -0
- package/dist/mjs/types/rest/request/dual-investment.js +2 -0
- package/dist/mjs/types/rest/request/dual-investment.js.map +1 -0
- package/dist/mjs/types/rest/request/funding.d.ts +8 -0
- package/dist/mjs/types/rest/request/public.d.ts +45 -0
- package/dist/mjs/types/rest/request/trade.d.ts +68 -48
- package/dist/mjs/types/rest/response/private-account.d.ts +42 -2
- package/dist/mjs/types/rest/response/private-dual-investment.d.ts +87 -0
- package/dist/mjs/types/rest/response/private-dual-investment.js +2 -0
- package/dist/mjs/types/rest/response/private-dual-investment.js.map +1 -0
- package/dist/mjs/types/rest/response/private-flexible-loan.d.ts +22 -0
- package/dist/mjs/types/rest/response/private-trade.d.ts +30 -6
- package/dist/mjs/types/rest/response/public-data.d.ts +147 -0
- package/dist/mjs/types/rest/shared.d.ts +1 -1
- package/dist/mjs/types/websockets/ws-api-request.d.ts +21 -2
- package/dist/mjs/types/websockets/ws-api-response.d.ts +11 -0
- package/dist/mjs/types/websockets/ws-events.d.ts +1 -0
- package/dist/mjs/types/websockets/ws-request.d.ts +11 -4
- package/llms.txt +7972 -7170
- package/package.json +1 -1
|
@@ -72,8 +72,15 @@ export interface Trade {
|
|
|
72
72
|
ts: string;
|
|
73
73
|
source?: string;
|
|
74
74
|
}
|
|
75
|
+
export interface InstrumentUpcomingParamChange {
|
|
76
|
+
param: 'tickSz' | 'minSz' | 'maxMktSz' | string;
|
|
77
|
+
newValue: string;
|
|
78
|
+
effTime: string;
|
|
79
|
+
}
|
|
75
80
|
export interface Instrument {
|
|
76
81
|
instType: InstrumentType;
|
|
82
|
+
/** Series id for EVENTS, e.g. BTC-ABOVE-DAILY. */
|
|
83
|
+
seriesId?: string;
|
|
77
84
|
instId: string;
|
|
78
85
|
uly: string;
|
|
79
86
|
instFamily: string;
|
|
@@ -95,7 +102,14 @@ export interface Instrument {
|
|
|
95
102
|
lotSz: string;
|
|
96
103
|
minSz: string;
|
|
97
104
|
ctType: string;
|
|
105
|
+
/**
|
|
106
|
+
* FUTURES contract label (deprecated — prefer `expTime` for delivery time; removal planned).
|
|
107
|
+
* Includes `this_five_years` / `next_five_years` (X-Perps / 5Y-style contracts).
|
|
108
|
+
*/
|
|
98
109
|
alias: string;
|
|
110
|
+
/**
|
|
111
|
+
* Instrument status: live, suspend, rebase (SWAP only), preopen, test, expired, settling (EVENTS), …
|
|
112
|
+
*/
|
|
99
113
|
state: string;
|
|
100
114
|
openType?: string;
|
|
101
115
|
maxLmtSz: string;
|
|
@@ -106,15 +120,26 @@ export interface Instrument {
|
|
|
106
120
|
maxIcebergSz: string;
|
|
107
121
|
maxTriggerSz: string;
|
|
108
122
|
maxStopSz: string;
|
|
123
|
+
/**
|
|
124
|
+
* e.g. `normal`, `pre_market`, `rebase_contract`, `xperp` (perpetual-style expiry futures, some FUTURES only).
|
|
125
|
+
*/
|
|
109
126
|
ruleType: string;
|
|
110
127
|
auctionEndTime: string;
|
|
111
128
|
futureSettlement?: boolean;
|
|
112
129
|
tradeQuoteCcyList?: string[];
|
|
113
130
|
instIdCode?: number;
|
|
131
|
+
/**
|
|
132
|
+
* Asset category of the instrument's base asset (first segment of `instId`). E.g. BTC-USDT-SWAP → category of BTC.
|
|
133
|
+
* 1: Crypto, 3: Stocks, 4: Commodities, 5: Forex, 6: Bonds, "": not available
|
|
134
|
+
*/
|
|
135
|
+
instCategory?: string;
|
|
114
136
|
posLmtAmt?: string;
|
|
115
137
|
posLmtPct?: string;
|
|
138
|
+
longPosRemainingQuota?: string;
|
|
139
|
+
shortPosRemainingQuota?: string;
|
|
116
140
|
maxPlatOILmt?: string;
|
|
117
141
|
groupId?: string;
|
|
142
|
+
upcChg?: InstrumentUpcomingParamChange[];
|
|
118
143
|
}
|
|
119
144
|
export interface EconomicCalendarData {
|
|
120
145
|
calendarId: string;
|
|
@@ -140,17 +165,50 @@ export interface UnitConvertData {
|
|
|
140
165
|
sz: string;
|
|
141
166
|
unit: 'coin' | 'usds';
|
|
142
167
|
}
|
|
168
|
+
/**
|
|
169
|
+
* @see GET /api/v5/public/funding-rate
|
|
170
|
+
* `instType` is `SWAP` (perp) or `FUTURES` (X-Perp) when applicable.
|
|
171
|
+
*/
|
|
172
|
+
export interface PublicFundingRate {
|
|
173
|
+
instType: string;
|
|
174
|
+
instId: string;
|
|
175
|
+
method: string;
|
|
176
|
+
formulaType: string;
|
|
177
|
+
fundingRate: string;
|
|
178
|
+
nextFundingRate: string;
|
|
179
|
+
fundingTime: string;
|
|
180
|
+
nextFundingTime: string;
|
|
181
|
+
minFundingRate: string;
|
|
182
|
+
maxFundingRate: string;
|
|
183
|
+
interestRate: string;
|
|
184
|
+
impactValue: string;
|
|
185
|
+
settState: string;
|
|
186
|
+
settFundingRate: string;
|
|
187
|
+
premium: string;
|
|
188
|
+
ts: string;
|
|
189
|
+
}
|
|
143
190
|
export interface FundingRateHistory {
|
|
191
|
+
/** Perpetual (`SWAP`) or X-Perp (`FUTURES`). */
|
|
144
192
|
instType: string;
|
|
145
193
|
instId: string;
|
|
146
194
|
fundingRate: string;
|
|
147
195
|
realizedRate: string;
|
|
148
196
|
fundingTime: string;
|
|
149
197
|
method: string;
|
|
198
|
+
formulaType?: string;
|
|
150
199
|
}
|
|
151
200
|
export interface SystemTime {
|
|
152
201
|
ts: string;
|
|
153
202
|
}
|
|
203
|
+
/**
|
|
204
|
+
* @see GET /api/v5/public/estimated-price
|
|
205
|
+
*/
|
|
206
|
+
export interface EstimatedDeliveryExercisePrice {
|
|
207
|
+
instType: string;
|
|
208
|
+
instId: string;
|
|
209
|
+
settlePx: string;
|
|
210
|
+
ts: string;
|
|
211
|
+
}
|
|
154
212
|
export interface OptionsTradeInfo {
|
|
155
213
|
instId: string;
|
|
156
214
|
tradeId: string;
|
|
@@ -185,6 +243,14 @@ export interface Announcement {
|
|
|
185
243
|
title: string;
|
|
186
244
|
url: string;
|
|
187
245
|
}
|
|
246
|
+
/** Public borrow history record (GET /api/v5/finance/savings/lending-rate-history) */
|
|
247
|
+
export interface PublicBorrowHistoryRecord {
|
|
248
|
+
ccy: string;
|
|
249
|
+
amt: string;
|
|
250
|
+
rate: string;
|
|
251
|
+
lendingRate: string;
|
|
252
|
+
ts: string;
|
|
253
|
+
}
|
|
188
254
|
export interface BasicInterestRate {
|
|
189
255
|
ccy: string;
|
|
190
256
|
rate: string;
|
|
@@ -217,4 +283,85 @@ export interface InterestRateAndLoanQuota {
|
|
|
217
283
|
configCcyList: ConfigCcyItem[];
|
|
218
284
|
config: LoanQuotaConfig[];
|
|
219
285
|
}
|
|
286
|
+
/**
|
|
287
|
+
* @see GET /api/v5/public/market-data-history
|
|
288
|
+
*/
|
|
289
|
+
export interface MarketDataHistoryFileGroup {
|
|
290
|
+
dateTs: string;
|
|
291
|
+
filename: string;
|
|
292
|
+
sizeMB: string;
|
|
293
|
+
url: string;
|
|
294
|
+
}
|
|
295
|
+
export interface MarketDataHistoryGroupDetail {
|
|
296
|
+
instId: string;
|
|
297
|
+
instFamily: string;
|
|
298
|
+
instType: string;
|
|
299
|
+
dateRangeStart: string;
|
|
300
|
+
dateRangeEnd: string;
|
|
301
|
+
groupSizeMB: string;
|
|
302
|
+
groupDetails: MarketDataHistoryFileGroup[];
|
|
303
|
+
}
|
|
304
|
+
export interface MarketDataHistoryResult {
|
|
305
|
+
dateAggrType: string;
|
|
306
|
+
details: MarketDataHistoryGroupDetail[];
|
|
307
|
+
totalSizeMB: string;
|
|
308
|
+
ts: string;
|
|
309
|
+
}
|
|
310
|
+
/** @see GET /api/v5/finance/staking-defi/eth/product-info */
|
|
311
|
+
export interface EthStakingProductInfo {
|
|
312
|
+
fastRedemptionDailyLimit: string;
|
|
313
|
+
rate: string;
|
|
314
|
+
redemptDays: string;
|
|
315
|
+
minAmt: string;
|
|
316
|
+
}
|
|
317
|
+
/** @see GET /api/v5/finance/staking-defi/sol/product-info */
|
|
318
|
+
export interface SolStakingProductInfo {
|
|
319
|
+
fastRedemptionAvail: string;
|
|
320
|
+
fastRedemptionDailyLimit: string;
|
|
321
|
+
rate: string;
|
|
322
|
+
redemptDays: string;
|
|
323
|
+
minAmt: string;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* @see GET /api/v5/public/event-contract/series
|
|
327
|
+
*/
|
|
328
|
+
export interface EventContractSettlement {
|
|
329
|
+
method: string;
|
|
330
|
+
closeEarly: boolean;
|
|
331
|
+
srcName: string;
|
|
332
|
+
underlying: string;
|
|
333
|
+
}
|
|
334
|
+
export interface EventContractSeries {
|
|
335
|
+
seriesId: string;
|
|
336
|
+
freq: string;
|
|
337
|
+
title: string;
|
|
338
|
+
category: string;
|
|
339
|
+
settlement: EventContractSettlement;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* @see GET /api/v5/public/event-contract/events
|
|
343
|
+
*/
|
|
344
|
+
export interface EventContractEvent {
|
|
345
|
+
seriesId: string;
|
|
346
|
+
eventId: string;
|
|
347
|
+
expTime: string;
|
|
348
|
+
state: string;
|
|
349
|
+
fixTime?: string;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* @see GET /api/v5/public/event-contract/markets
|
|
353
|
+
*/
|
|
354
|
+
export interface EventContractMarket {
|
|
355
|
+
seriesId: string;
|
|
356
|
+
eventId: string;
|
|
357
|
+
instId: string;
|
|
358
|
+
listTime: string;
|
|
359
|
+
expTime: string;
|
|
360
|
+
state: string;
|
|
361
|
+
fixTime: string;
|
|
362
|
+
outcome: string;
|
|
363
|
+
floorStrike: string;
|
|
364
|
+
settleValue: string;
|
|
365
|
+
disputed: boolean;
|
|
366
|
+
}
|
|
220
367
|
export {};
|
|
@@ -9,7 +9,7 @@ export type AlgoOrderState = 'live' | 'pause' | 'partially_effective' | 'effecti
|
|
|
9
9
|
export type AlgoPositionSide = 'long' | 'short';
|
|
10
10
|
export type ContractGridDirection = 'long' | 'short' | 'neutral';
|
|
11
11
|
export type GridAlgoSubOrderType = 'live' | 'filled';
|
|
12
|
-
export type InstrumentType = 'SPOT' | 'MARGIN' | 'SWAP' | 'FUTURES' | 'OPTION';
|
|
12
|
+
export type InstrumentType = 'SPOT' | 'MARGIN' | 'SWAP' | 'FUTURES' | 'OPTION' | 'EVENTS';
|
|
13
13
|
export type MarginMode = 'cross' | 'isolated';
|
|
14
14
|
export type OrderSide = 'buy' | 'sell';
|
|
15
15
|
export type OrderType = 'market' | 'limit' | 'post_only' | 'fok' | 'ioc' | 'optimal_limit_ioc' | 'mmp' | 'mmp_and_post_only' | 'elp';
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import type { AmendAttachedTrailingStop, AttachAlgoOrdRequest } from '../rest/request/trade.js';
|
|
1
2
|
import { numberInString, OrderSide, OrderType, PositionSide, TradeMode } from '../rest/shared.js';
|
|
2
3
|
export interface WSAPIPlaceOrderRequestV5 {
|
|
3
|
-
|
|
4
|
+
/** Instrument ID. Deprecated March 2026; use instIdCode for lower latency. */
|
|
5
|
+
instId?: string;
|
|
6
|
+
/** Instrument ID code. Takes precedence over instId if both provided. Use Get instruments to map. */
|
|
7
|
+
instIdCode?: number;
|
|
4
8
|
tdMode: TradeMode;
|
|
5
9
|
ccy?: string;
|
|
6
10
|
clOrdId?: string;
|
|
@@ -19,9 +23,22 @@ export interface WSAPIPlaceOrderRequestV5 {
|
|
|
19
23
|
banAmend?: boolean;
|
|
20
24
|
tradeQuoteCcy?: string;
|
|
21
25
|
stpMode?: 'cancel_maker' | 'cancel_taker' | 'cancel_both';
|
|
26
|
+
/** ELP taker access. true = can trade with ELP orders (speed bump applied). Default false. Only applicable to ioc orders */
|
|
27
|
+
isElpTakerAccess?: boolean;
|
|
28
|
+
/** EVENTS: `"1"` for non-`post_only` orders when required (error 54086 if missing). */
|
|
29
|
+
speedBump?: string;
|
|
30
|
+
/** EVENTS: `yes` or `no`. */
|
|
31
|
+
outcome?: string;
|
|
32
|
+
attachAlgoOrds?: AttachAlgoOrdRequest[];
|
|
22
33
|
}
|
|
23
34
|
export interface WSAPIAmendOrderRequestV5 {
|
|
24
|
-
|
|
35
|
+
/**
|
|
36
|
+
* If set, ignored for `amend-order` / `batch-amend-orders` — use `ordId`/`clOrdId` to identify the order.
|
|
37
|
+
* Map codes via Get instruments as needed.
|
|
38
|
+
*/
|
|
39
|
+
instId?: string;
|
|
40
|
+
/** Use Get instruments to map. */
|
|
41
|
+
instIdCode?: number;
|
|
25
42
|
cxlOnFail?: boolean;
|
|
26
43
|
ordId?: string;
|
|
27
44
|
clOrdId?: string;
|
|
@@ -30,6 +47,8 @@ export interface WSAPIAmendOrderRequestV5 {
|
|
|
30
47
|
newPx?: string;
|
|
31
48
|
newPxUsd?: string;
|
|
32
49
|
newPxVol?: string;
|
|
50
|
+
speedBump?: string;
|
|
51
|
+
attachAlgoOrds?: AmendAttachedTrailingStop[];
|
|
33
52
|
}
|
|
34
53
|
export interface WSAPIMassCancelOrdersRequestV5 {
|
|
35
54
|
instType: string;
|
|
@@ -26,3 +26,14 @@ export interface WSAPISpreadCancelOrderResultV5 {
|
|
|
26
26
|
sCode: string;
|
|
27
27
|
sMsg: string;
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* @see Ws public channel: estimated-price
|
|
31
|
+
*/
|
|
32
|
+
export type WsEstimatedPriceSettleType = 'settlement' | 'delivery' | 'exercise';
|
|
33
|
+
export interface WsEstimatedPriceData {
|
|
34
|
+
instId: string;
|
|
35
|
+
instType: string;
|
|
36
|
+
settlePx: string;
|
|
37
|
+
settleType: WsEstimatedPriceSettleType;
|
|
38
|
+
ts: string;
|
|
39
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { InstrumentType } from '../rest/shared.js';
|
|
1
2
|
export interface WsAuthRequestArg {
|
|
2
3
|
apiKey: string;
|
|
3
4
|
passphrase: string;
|
|
@@ -10,7 +11,7 @@ export type WsPublicKlineChannel = 'candle1Y' | 'candle6M' | 'candle3M' | 'candl
|
|
|
10
11
|
export type WsPublicMarkPriceKlineChannel = 'mark-price-candle1Y' | 'mark-price-candle6M' | 'mark-price-candle3M' | 'mark-price-candle1M' | 'mark-price-candle1W' | 'mark-price-candle1D' | 'mark-price-candle2D' | 'mark-price-candle3D' | 'mark-price-candle5D' | 'mark-price-candle12H' | 'mark-price-candle6H' | 'mark-price-candle4H' | 'mark-price-candle2H' | 'mark-price-candle1H' | 'mark-price-candle30m' | 'mark-price-candle15m' | 'mark-price-candle5m' | 'mark-price-candle3m' | 'mark-price-candle1m' | 'mark-price-candle1Yutc' | 'mark-price-candle3Mutc' | 'mark-price-candle1Mutc' | 'mark-price-candle1Wutc' | 'mark-price-candle1Dutc' | 'mark-price-candle2Dutc' | 'mark-price-candle3Dutc' | 'mark-price-candle5Dutc' | 'mark-price-candle12Hutc' | 'mark-price-candle6Hutc';
|
|
11
12
|
export type WsPublicIndexKlineChannel = 'index-candle1Y' | 'index-candle6M' | 'index-candle3M' | 'index-candle1M' | 'index-candle1W' | 'index-candle1D' | 'index-candle2D' | 'index-candle3D' | 'index-candle5D' | 'index-candle12H' | 'index-candle6H' | 'index-candle4H index -candle2H' | 'index-candle1H' | 'index-candle30m' | 'index-candle15m' | 'index-candle5m' | 'index-candle3m' | 'index-candle1m' | 'index-candle1Yutc' | 'index-candle3Mutc' | 'index-candle1Mutc' | 'index-candle1Wutc' | 'index-candle1Dutc' | 'index-candle2Dutc' | 'index-candle3Dutc' | 'index-candle5Dutc' | 'index-candle12Hutc' | 'index-candle6Hutc';
|
|
12
13
|
export type WsPublicOrderBooksChannel = 'books' | 'books5' | 'bbo-tbt' | 'books-l2-tbt' | 'books50-l2-tpt';
|
|
13
|
-
export type WsPublicChannel = 'instruments' | 'tickers' | 'open-interest' | WsPublicKlineChannel | WsPublicMarkPriceKlineChannel | WsPublicIndexKlineChannel | 'trades' | 'estimated-price' | 'mark-price' | 'price-limit' | WsPublicOrderBooksChannel | 'opt-summary' | 'funding-rate' | 'index-tickers' | 'status' | 'liquidation-orders';
|
|
14
|
+
export type WsPublicChannel = 'instruments' | 'tickers' | 'open-interest' | WsPublicKlineChannel | WsPublicMarkPriceKlineChannel | WsPublicIndexKlineChannel | 'trades' | 'estimated-price' | 'mark-price' | 'price-limit' | WsPublicOrderBooksChannel | 'opt-summary' | 'funding-rate' | 'index-tickers' | 'status' | 'liquidation-orders' | 'event-contract-markets';
|
|
14
15
|
export type WsBusinessPrivateChannel = 'orders-algo' | 'algo-advance' | 'deposit-info' | 'withdrawal-info' | 'grid-orders-spot' | 'grid-orders-contract' | 'grid-orders-moon' | 'grid-positions' | 'grid-sub-orders' | 'algo-recurring-buy';
|
|
15
16
|
export type WsBusinessPublicChannel = WsPublicKlineChannel | WsPublicMarkPriceKlineChannel | WsPublicIndexKlineChannel;
|
|
16
17
|
export type WsBusinessChannel = WsBusinessPrivateChannel | WsBusinessPublicChannel;
|
|
@@ -37,7 +38,8 @@ export interface WsPrivateChannelArgWithCcy extends WsBaseRequestArg {
|
|
|
37
38
|
channel: 'account' | 'account-greeks' | 'withdrawal-info';
|
|
38
39
|
ccy?: string;
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
+
/** `ANY` is used by some private subscription args; instruments channel uses `EVENTS` for event contracts. */
|
|
42
|
+
export type WsChannelArgInstType = InstrumentType | 'ANY';
|
|
41
43
|
export interface WsPrivateChannelArgWithInstFamily extends WsBaseRequestArg {
|
|
42
44
|
channel: 'positions' | 'orders' | 'orders-algo' | 'liquidation-warning';
|
|
43
45
|
instType: WsChannelArgInstType;
|
|
@@ -73,7 +75,7 @@ export interface WsPublicChannelArgInstId extends WsBaseRequestArg {
|
|
|
73
75
|
}
|
|
74
76
|
export type WsPublicChannelArgInstIdOrFamily = {
|
|
75
77
|
channel: 'estimated-price';
|
|
76
|
-
instType: 'OPTION' | 'FUTURES';
|
|
78
|
+
instType: 'OPTION' | 'FUTURES' | 'SWAP' | 'EVENTS';
|
|
77
79
|
} & ({
|
|
78
80
|
instId: string;
|
|
79
81
|
} | {
|
|
@@ -90,4 +92,9 @@ export interface WsPublicChannelArgLiquidationOrders extends WsBaseRequestArg {
|
|
|
90
92
|
channel: 'liquidation-orders';
|
|
91
93
|
instType: 'SWAP' | 'FUTURES';
|
|
92
94
|
}
|
|
93
|
-
|
|
95
|
+
/** Event contract market status & floor strikes. @see public WS `event-contract-markets` */
|
|
96
|
+
export interface WsPublicChannelArgEventContractMarkets extends WsBaseRequestArg {
|
|
97
|
+
channel: 'event-contract-markets';
|
|
98
|
+
instType: 'EVENTS';
|
|
99
|
+
}
|
|
100
|
+
export type WsChannelSubUnSubRequestArg = WsPrivateChannelArgTickers | WsPrivateChannelArgWithCcy | WsPrivateChannelArgWithInstFamily | WsPrivateChannelArgAlgo | WsPrivateChannelArgBalanceAndPosition | WsPrivateChannelArgGridOrders | WsPrivateChannelArgGridOther | WsPublicChannelArgInstType | WsPublicChannelArgInstId | WsPublicChannelArgInstIdOrFamily | WsPublicChannelArgOptionSummary | WsPublicChannelArgStatus | WsPublicChannelArgLiquidationOrders | WsPublicChannelArgEventContractMarkets;
|
package/dist/mjs/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './types/rest/request/account.js';
|
|
|
6
6
|
export * from './types/rest/request/block-trading.js';
|
|
7
7
|
export * from './types/rest/request/convert.js';
|
|
8
8
|
export * from './types/rest/request/copy-trading.js';
|
|
9
|
+
export * from './types/rest/request/dual-investment.js';
|
|
9
10
|
export * from './types/rest/request/funding.js';
|
|
10
11
|
export * from './types/rest/request/grid-trading.js';
|
|
11
12
|
export * from './types/rest/request/public.js';
|
|
@@ -19,6 +20,7 @@ export * from './types/rest/request/trade.js';
|
|
|
19
20
|
export * from './types/rest/response/private-account.js';
|
|
20
21
|
export * from './types/rest/response/private-block-trading.js';
|
|
21
22
|
export * from './types/rest/response/private-copy-trading.js';
|
|
23
|
+
export * from './types/rest/response/private-dual-investment.js';
|
|
22
24
|
export * from './types/rest/response/private-flexible-loan.js';
|
|
23
25
|
export * from './types/rest/response/private-funding.js';
|
|
24
26
|
export * from './types/rest/response/private-recurring-buy.js';
|
package/dist/mjs/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export * from './types/rest/request/account.js';
|
|
|
8
8
|
export * from './types/rest/request/block-trading.js';
|
|
9
9
|
export * from './types/rest/request/convert.js';
|
|
10
10
|
export * from './types/rest/request/copy-trading.js';
|
|
11
|
+
export * from './types/rest/request/dual-investment.js';
|
|
11
12
|
export * from './types/rest/request/funding.js';
|
|
12
13
|
export * from './types/rest/request/grid-trading.js';
|
|
13
14
|
export * from './types/rest/request/public.js';
|
|
@@ -22,6 +23,7 @@ export * from './types/rest/request/trade.js';
|
|
|
22
23
|
export * from './types/rest/response/private-account.js';
|
|
23
24
|
export * from './types/rest/response/private-block-trading.js';
|
|
24
25
|
export * from './types/rest/response/private-copy-trading.js';
|
|
26
|
+
export * from './types/rest/response/private-dual-investment.js';
|
|
25
27
|
export * from './types/rest/response/private-flexible-loan.js';
|
|
26
28
|
export * from './types/rest/response/private-funding.js';
|
|
27
29
|
export * from './types/rest/response/private-recurring-buy.js';
|
package/dist/mjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,uBAAuB;AACvB,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,eAAe;AACf,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,gBAAgB;AAChB,cAAc,0CAA0C,CAAC;AACzD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,0CAA0C,CAAC;AACzD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,EAAE;AACF,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,uBAAuB;AACvB,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,eAAe;AACf,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,gBAAgB;AAChB,cAAc,0CAA0C,CAAC;AACzD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,kDAAkD,CAAC;AACjE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,0CAA0C,CAAC;AACzD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,EAAE;AACF,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ASSET_BILL_TYPE } from './constants/funding.js';
|
|
2
|
-
import { ChangePositionMarginRequest, GetBorrowRepayHistoryRequest, GetFixedLoanBorrowingOrdersListRequest, GetFixedLoanBorrowQuoteRequest, GetHistoricPositionParams, GetInstrumentsRequest, GetPositionsParams, GetQuickMarginBorrowRepayHistoryRequest, GetVIPInterestRequest, GetVIPLoanOrderDetailRequest, GetVIPLoanOrderListRequest, PositionBuilderRequest, PrecheckSetDeltaNeutralRequest, QuickMarginBorrowRepayRequest, SetFeeTypeRequest, SetLeverageRequest, SetMMPConfigRequest, SetSettleCurrencyRequest, SetTradingConfigRequest, SubmitFixedLoanBorrowingOrderRequest, UpdateFixedLoanBorrowingOrderRequest, WithdrawalHistoryRequest } from './types/rest/request/account.js';
|
|
2
|
+
import { BillsHistoryArchiveRequest, ChangePositionMarginRequest, GetAccountBillSubtypesRequest, GetBorrowRepayHistoryRequest, GetFixedLoanBorrowingOrdersListRequest, GetFixedLoanBorrowQuoteRequest, GetHistoricPositionParams, GetInstrumentsRequest, GetPositionsParams, GetQuickMarginBorrowRepayHistoryRequest, GetVIPInterestRequest, GetVIPLoanOrderDetailRequest, GetVIPLoanOrderListRequest, PositionBuilderRequest, PrecheckSetDeltaNeutralRequest, QuickMarginBorrowRepayRequest, SetFeeTypeRequest, SetLeverageRequest, SetMMPConfigRequest, SetSettleCurrencyRequest, SetTradingConfigRequest, SubmitFixedLoanBorrowingOrderRequest, UpdateFixedLoanBorrowingOrderRequest, WithdrawalHistoryRequest } from './types/rest/request/account.js';
|
|
3
3
|
import { CancelBlockQuoteRequest, CancelBlockRFQRequest, CancelMultipleBlockQuoteRequest, CancelMultipleBlockRFQRequest, CreateBlockQuoteRequest, CreateBlockRFQRequest, ExecuteBlockQuoteRequest, GetBlockQuoteParams, GetBlockRFQSParams, SetMmpConfigRequest, SetQuoteProductsRequest } from './types/rest/request/block-trading.js';
|
|
4
4
|
import { ConvertQuoteEstimateRequest, ConvertTradeRequest } from './types/rest/request/convert.js';
|
|
5
5
|
import { CloseSubpositionRequest, CopySettingsRequest, GetCopyTradersRequest, GetCTBatchLeverageInfoRequest, GetCTHistoryLeadTradersRequest, GetCTProfitDetailsRequest, GetCurrentSubpositionsRequest, GetLeadTraderPositionsRequest, GetLeadTraderRanksRequest, GetLeadTraderStatsRequest, GetPrivateLeadTraderRanksRequest, GetSubpositionsHistoryRequest, PlaceCTAlgoOrderRequest, SetCTBatchLeverageRequest } from './types/rest/request/copy-trading.js';
|
|
6
|
-
import {
|
|
6
|
+
import { GetDcdOrderHistoryRequest, GetDcdOrderStatusRequest, GetDcdProductsRequest, RequestDcdQuoteRequest, RequestDcdRedeemQuoteRequest, SubmitDcdRedeemRequest, SubmitDcdTradeRequest } from './types/rest/request/dual-investment.js';
|
|
7
|
+
import { FundingRateRequest, FundsTransferRequest, GetDepositHistoryRequest, GetDepositWithdrawStatusRequest, GetFundingRateRequest, WithdrawRequest } from './types/rest/request/funding.js';
|
|
7
8
|
import { CloseContractGridPositionRequest, GetGridAlgoOrdersRequest, GetRSIBackTestingRequest, GridAlgoOrderRequest, GridAlgoOrderType, MaxGridQuantityRequest, StopGridAlgoOrderRequest } from './types/rest/request/grid-trading.js';
|
|
8
|
-
import { CandleRequest, EconomicCalendarRequest, GetContractOpenInterestHistoryRequest, GetContractTakerVolumeRequest, GetOptionTradesRequest, GetPremiumHistoryRequest, GetTopTradersContractLongShortRatioRequest, UnitConvertRequest } from './types/rest/request/public.js';
|
|
9
|
+
import { CandleRequest, EconomicCalendarRequest, GetContractOpenInterestHistoryRequest, GetContractTakerVolumeRequest, GetEventContractEventsRequest, GetEventContractMarketsRequest, GetEventContractSeriesRequest, GetHistoricalMarketDataRequest, GetOptionTradesRequest, GetPremiumHistoryRequest, GetTopTradersContractLongShortRatioRequest, UnitConvertRequest } from './types/rest/request/public.js';
|
|
9
10
|
import { AmendRecurringBuyOrderRequest, GetRecurringBuyOrderListRequest, PlaceRecurringBuyOrderRequest } from './types/rest/request/recurring-buy.js';
|
|
10
11
|
import { PaginatedSymbolRequest } from './types/rest/request/shared.js';
|
|
11
12
|
import { AdjustMarginBalanceRequest, AmendTPSLRequest, CancelSubOrderRequest, CreateSignalBotRequest, CreateSignalRequest, GetSignalBotEventHistoryRequest, GetSignalBotPositionHistoryRequest, GetSignalBotRequest, GetSignalBotSubOrdersRequest, GetSignalsRequest, PlaceSubOrderRequest, SetSignalInstrumentsRequest } from './types/rest/request/signal-bot.js';
|
|
@@ -13,17 +14,18 @@ import { GetLendingOrderListRequest, GetLendingSubOrderListRequest, LendingOrder
|
|
|
13
14
|
import { GetActiveSpreadOrdersRequest, GetSpreadCandlesRequest, GetSpreadOrderHistoryArchiveRequest, GetSpreadOrderHistoryRequest, GetSpreadsRequest, GetSpreadTradesRequest, PlaceSpreadOrderRequest, UpdateSpreadOrderRequest } from './types/rest/request/spread-trading.js';
|
|
14
15
|
import { GetManagedSubAccountTransferHistoryRequest, GetSubAccountMaxWithdrawalsRequest, SetSubAccountLoanAllocationRequest, SubAccountTransferRequest } from './types/rest/request/subaccount.js';
|
|
15
16
|
import { AlgoLongHistoryRequest, AlgoOrderDetailsRequest, AlgoOrderRequest, AlgoRecentHistoryRequest, AmendAlgoOrderRequest, AmendOrderRequest, CancelAlgoOrderRequest, ClosePositionRequest, FillsHistoryRequest, OrderHistoryRequest, OrderIdRequest, OrderPrecheckRequest, OrderRequest } from './types/rest/request/trade.js';
|
|
16
|
-
import { AccountBalance, AccountBill, AccountChangeMarginResult, AccountConfiguration, AccountFeeRate, AccountHistoryBill, AccountInstrument, AccountIsolatedMode, AccountLeverage, AccountLeverageResult, AccountMaxLoan, AccountMaxOrderAmount, AccountMaxTradableAmount, AccountModeResult, AccountPosition, AccountPositionModeResult, AccountPositionRisk, AccountRiskState, AdjustLeverageInfo, AutoLoanResult, BorrowRepayHistoryItem, FixedLoanBorrowingLimit, FixedLoanBorrowQuote, Greeks, HistoricAccountPosition, InterestAccrued, InterestRate, MaxWithdrawal, MMPConfig, PrecheckSetDeltaNeutralResult, QuickMarginBorrowRepayRecord, QuickMarginBorrowRepayResult, SetFeeTypeResult, SetMMPConfigResult, SetSettleCurrencyResult, SetTradingConfigResult, VIPInterest, VIPLoanOrder, VIPLoanOrderDetail } from './types/rest/response/private-account.js';
|
|
17
|
+
import { AccountBalance, AccountBill, AccountBillTypeDefinition, AccountChangeMarginResult, AccountConfiguration, AccountFeeRate, AccountHistoryBill, AccountInstrument, AccountIsolatedMode, AccountLeverage, AccountLeverageResult, AccountMaxLoan, AccountMaxOrderAmount, AccountMaxTradableAmount, AccountModeResult, AccountPosition, AccountPositionModeResult, AccountPositionRisk, AccountRiskState, AdjustLeverageInfo, AutoLoanResult, BorrowRepayHistoryItem, FixedLoanBorrowingLimit, FixedLoanBorrowQuote, Greeks, HistoricAccountPosition, InterestAccrued, InterestRate, MaxWithdrawal, MMPConfig, PrecheckSetDeltaNeutralResult, QuickMarginBorrowRepayRecord, QuickMarginBorrowRepayResult, SetFeeTypeResult, SetMMPConfigResult, SetSettleCurrencyResult, SetTradingConfigResult, VIPInterest, VIPLoanOrder, VIPLoanOrderDetail } from './types/rest/response/private-account.js';
|
|
17
18
|
import { BlockCounterParty, BlockMakerInstrumentSettings, BlockMMPConfig, BlockRFQResult, BlockTradeResult, CancelBlockQuoteResult, CancelBlockRFQResult, CreateBlockQuoteResult, CreateRFQResult, ExecuteBlockQuoteResult, GetBlockQuoteResult, PublicBlockTrade, SetMmpConfigResult } from './types/rest/response/private-block-trading.js';
|
|
18
19
|
import { CurrentSubposition, GetAccountConfigurationResult, GetCopySettingsResult, GetCopyTradersResult, GetCopyTradingConfigResult, GetCTBatchLeverageInfoResult, GetCTHistoryLeadTradersResult, GetCTMyLeadTradersResult, GetCTProfitDetailsResult, GetCTTotalProfitResult, GetCTUnrealizedProfitResult, GetLeadTraderRanksResult, GetPrivateLeadTraderRanksResult, LeadTraderCurrentPosition, LeadTraderPnl, LeadTraderPositionHistory, LeadTraderPreference, LeadTraderStats, PlaceCTAlgoOrderResult, SetCTBatchLeverageResult, SubpositionsHistory } from './types/rest/response/private-copy-trading.js';
|
|
19
|
-
import {
|
|
20
|
+
import { DcdCurrencyPair, DcdOrderHistoryItem, DcdOrderStatus, DcdProduct, DcdQuote, DcdRedeemQuote, DcdRedeemResult, DcdTradeResult } from './types/rest/response/private-dual-investment.js';
|
|
21
|
+
import { AccruedInterestItem, AccruedInterestRequest, AdjustCollateralRequest, CollateralAssetsResponse, GetFlexibleLoanCollateralAssetsRequest, GetLoanInfoRequest, LoanHistoryItem, LoanHistoryRequest, LoanInfo, MaxLoanRequest, MaxLoanResponse } from './types/rest/response/private-flexible-loan.js';
|
|
20
22
|
import { AccountAssetValuation, AssetBillDetails, DepositHistory, FundingBalance, FundingCurrency, FundTransferResult, FundTransferState, NonTradableAsset, WithdrawResponse } from './types/rest/response/private-funding.js';
|
|
21
23
|
import { RecurringBuyOrder, RecurringBuyOrderResult, RecurringBuySubOrder } from './types/rest/response/private-recurring-buy.js';
|
|
22
24
|
import { CancelSignalBotsResult, CreateSignalBotResult, CreateSignalResult, GetSignalsResult } from './types/rest/response/private-signal-bot.js';
|
|
23
25
|
import { CancelSpreadOrderResponse, PlaceSpreadOrderResponse, PublicSpreadTrade, SpreadCandle, SpreadDetails, SpreadOrder, SpreadOrderBook, SpreadTicker, SpreadTrade, UpdateSpreadOrderResponse } from './types/rest/response/private-spread-trading.js';
|
|
24
26
|
import { ManagedSubAccountTransfer, SubAccount, SubAccountAPIReset, SubAccountBalances, SubAccountMaxWithdrawal, SubAccountTransferResult } from './types/rest/response/private-subaccount.js';
|
|
25
27
|
import { AlgoOrderDetailsResult, AlgoOrderListItem, AlgoOrderResult, AmendAlgoOrderResult, AmendedOrder, CancelAllAfterResponse, CancelledOrderResult, ClosedPositions, HistoricAlgoOrder, HistoricOrder, OrderDetails, OrderFill, OrderListItem, OrderResult } from './types/rest/response/private-trade.js';
|
|
26
|
-
import { Announcement, Candle, CandleNoVolume, EconomicCalendarData, IndexTicker, Instrument, InterestRateAndLoanQuota, OptionTrade, OptionTrades, OrderBook, SystemTime, Ticker, Trade, UnitConvertData } from './types/rest/response/public-data.js';
|
|
28
|
+
import { Announcement, Candle, CandleNoVolume, EconomicCalendarData, EstimatedDeliveryExercisePrice, EthStakingProductInfo, EventContractEvent, EventContractMarket, EventContractSeries, FundingRateHistory, IndexTicker, Instrument, InterestRateAndLoanQuota, MarketDataHistoryResult, OptionTrade, OptionTrades, OrderBook, PublicBorrowHistoryRecord, PublicFundingRate, SolStakingProductInfo, SystemTime, Ticker, Trade, UnitConvertData } from './types/rest/response/public-data.js';
|
|
27
29
|
import { AccountLevel, APIResponse, ContractGridDirection, GridAlgoSubOrderType, InstrumentType, MarginMode, numberInString, Pagination, PositionSide, PosMode, TimestampObject } from './types/rest/shared.js';
|
|
28
30
|
import BaseRestClient from './util/BaseRestClient.js';
|
|
29
31
|
export declare class RestClient extends BaseRestClient {
|
|
@@ -64,26 +66,24 @@ export declare class RestClient extends BaseRestClient {
|
|
|
64
66
|
getBills(params?: any): Promise<AccountBill[]>;
|
|
65
67
|
/** Last 3 months */
|
|
66
68
|
getBillsArchive(params?: any): Promise<AccountBill[]>;
|
|
69
|
+
/**
|
|
70
|
+
* Bill type ids and subTypes (unified account bill CSV columns reference `type` / `subType`).
|
|
71
|
+
* @see GET /api/v5/account/subtypes
|
|
72
|
+
*/
|
|
73
|
+
getAccountBillSubtypes(params?: GetAccountBillSubtypesRequest): Promise<AccountBillTypeDefinition[]>;
|
|
67
74
|
/**
|
|
68
75
|
* Apply for bill data since 1 February, 2021 except for the current quarter.
|
|
69
|
-
* Check the
|
|
70
|
-
* During peak demand, data generation may take longer. If the file link is still unavailable after 48 hours, reach out to customer support for assistance.
|
|
76
|
+
* Check the "Get bills details (since 2021)" endpoint in about 2 hours for the download link; in peak load it may take longer, and if still missing after 3 hours contact support.
|
|
71
77
|
* It is only applicable to the data from the unified account.
|
|
72
78
|
*
|
|
73
79
|
* This endpoint submits a request for bill data. You can then use getRequestedBillsHistoryLink to get the link to the bill data.
|
|
74
80
|
* It may take some time to generate the data.
|
|
75
81
|
*/
|
|
76
|
-
requestBillsHistoryDownloadLink(params:
|
|
77
|
-
year: string;
|
|
78
|
-
quarter: 'Q1' | 'Q2' | 'Q3' | 'Q4';
|
|
79
|
-
}): Promise<AccountHistoryBill[]>;
|
|
82
|
+
requestBillsHistoryDownloadLink(params: BillsHistoryArchiveRequest): Promise<AccountHistoryBill[]>;
|
|
80
83
|
/**
|
|
81
84
|
* This endpoint returns the link to the bill data which you can request using requestBillsHistoryDownloadLink.
|
|
82
85
|
*/
|
|
83
|
-
getRequestedBillsHistoryLink(params:
|
|
84
|
-
year: string;
|
|
85
|
-
quarter: 'Q1' | 'Q2' | 'Q3' | 'Q4';
|
|
86
|
-
}): Promise<AccountHistoryBill[]>;
|
|
86
|
+
getRequestedBillsHistoryLink(params: BillsHistoryArchiveRequest): Promise<AccountHistoryBill[]>;
|
|
87
87
|
getAccountConfiguration(): Promise<AccountConfiguration[]>;
|
|
88
88
|
setPositionMode(params: {
|
|
89
89
|
posMode: PosMode;
|
|
@@ -99,6 +99,8 @@ export declare class RestClient extends BaseRestClient {
|
|
|
99
99
|
px?: string;
|
|
100
100
|
leverage?: string;
|
|
101
101
|
unSpotOffset?: boolean;
|
|
102
|
+
/** EVENTS: `yes` / `no` (required for max size when applicable). */
|
|
103
|
+
outcome?: string;
|
|
102
104
|
}): Promise<AccountMaxOrderAmount[]>;
|
|
103
105
|
getMaxAvailableTradableAmount(params: {
|
|
104
106
|
instId: string;
|
|
@@ -141,6 +143,7 @@ export declare class RestClient extends BaseRestClient {
|
|
|
141
143
|
instId?: string;
|
|
142
144
|
uly?: string;
|
|
143
145
|
instFamily?: string;
|
|
146
|
+
groupId?: string;
|
|
144
147
|
ruleType?: string;
|
|
145
148
|
}): Promise<AccountFeeRate[]>;
|
|
146
149
|
getInterestAccrued(params?: {
|
|
@@ -775,21 +778,38 @@ export declare class RestClient extends BaseRestClient {
|
|
|
775
778
|
* Public data - rest endpoints
|
|
776
779
|
*
|
|
777
780
|
*/
|
|
778
|
-
getInstruments(params:
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
781
|
+
getInstruments(params: GetInstrumentsRequest): Promise<Instrument[]>;
|
|
782
|
+
/**
|
|
783
|
+
* Prediction / event contract series. Auth required (read).
|
|
784
|
+
* @see GET /api/v5/public/event-contract/series
|
|
785
|
+
*/
|
|
786
|
+
getEventContractSeries(params?: GetEventContractSeriesRequest): Promise<EventContractSeries[]>;
|
|
787
|
+
/**
|
|
788
|
+
* Events for a series. Auth required (read).
|
|
789
|
+
* @see GET /api/v5/public/event-contract/events
|
|
790
|
+
*/
|
|
791
|
+
getEventContractEvents(params: GetEventContractEventsRequest): Promise<EventContractEvent[]>;
|
|
792
|
+
/**
|
|
793
|
+
* Markets for events. Auth required (read).
|
|
794
|
+
* @see GET /api/v5/public/event-contract/markets
|
|
795
|
+
*/
|
|
796
|
+
getEventContractMarkets(params: GetEventContractMarketsRequest): Promise<EventContractMarket[]>;
|
|
784
797
|
getDeliveryExerciseHistory(params: any): Promise<any[]>;
|
|
785
798
|
getOpenInterest(params: any): Promise<any[]>;
|
|
786
|
-
getFundingRate(params:
|
|
787
|
-
getFundingRateHistory(params: FundingRateRequest): Promise<
|
|
799
|
+
getFundingRate(params: GetFundingRateRequest): Promise<PublicFundingRate[]>;
|
|
800
|
+
getFundingRateHistory(params: FundingRateRequest): Promise<FundingRateHistory[]>;
|
|
788
801
|
getMinMaxLimitPrice(params: any): Promise<any[]>;
|
|
789
802
|
getOptionMarketData(params: any): Promise<any[]>;
|
|
790
|
-
|
|
803
|
+
/**
|
|
804
|
+
* Estimated delivery or exercise price (FUTURES / OPTION / EVENTS; REST returns one row with `settlePx`).
|
|
805
|
+
* The value is only meaningful shortly before delivery/exercise. The window used for the index mean is 30 minutes (since 2026-03-18; 200ms sampling).
|
|
806
|
+
*/
|
|
807
|
+
getEstimatedDeliveryExercisePrice(params: {
|
|
808
|
+
instId: string;
|
|
809
|
+
}): Promise<EstimatedDeliveryExercisePrice[]>;
|
|
791
810
|
getDiscountRateAndInterestFreeQuota(params: any): Promise<any[]>;
|
|
792
811
|
getSystemTime(params: any): Promise<SystemTime[]>;
|
|
812
|
+
getHistoricalMarketData(params: GetHistoricalMarketDataRequest): Promise<MarketDataHistoryResult[]>;
|
|
793
813
|
getMarkPrice(params: any): Promise<any[]>;
|
|
794
814
|
getPositionTiers(params: any): Promise<any[]>;
|
|
795
815
|
getInterestRateAndLoanQuota(): Promise<InterestRateAndLoanQuota[]>;
|
|
@@ -960,6 +980,8 @@ export declare class RestClient extends BaseRestClient {
|
|
|
960
980
|
getConvertCurrencyPair(params: {
|
|
961
981
|
fromCcy: string;
|
|
962
982
|
toCcy: string;
|
|
983
|
+
/** 0: standard convert (default), 1: large order convert for VIP */
|
|
984
|
+
convertMode?: '0' | '1';
|
|
963
985
|
}): Promise<any[]>;
|
|
964
986
|
estimateConvertQuote(params: ConvertQuoteEstimateRequest): Promise<any[]>;
|
|
965
987
|
convertTrade(params: ConvertTradeRequest): Promise<any[]>;
|
|
@@ -1061,7 +1083,8 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1061
1083
|
* Financial product - ETH staking endpoints
|
|
1062
1084
|
*
|
|
1063
1085
|
*/
|
|
1064
|
-
getETHStakingProductInfo(): Promise<
|
|
1086
|
+
getETHStakingProductInfo(): Promise<EthStakingProductInfo[]>;
|
|
1087
|
+
getSOLStakingProductInfo(): Promise<SolStakingProductInfo>;
|
|
1065
1088
|
purchaseETHStaking(params: {
|
|
1066
1089
|
amt: string;
|
|
1067
1090
|
}): Promise<any[]>;
|
|
@@ -1106,7 +1129,7 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1106
1129
|
getPublicBorrowInfo(params?: {
|
|
1107
1130
|
ccy?: string;
|
|
1108
1131
|
}): Promise<any[]>;
|
|
1109
|
-
getPublicBorrowHistory(params?: PaginatedSymbolRequest): Promise<
|
|
1132
|
+
getPublicBorrowHistory(params?: PaginatedSymbolRequest): Promise<PublicBorrowHistoryRecord[]>;
|
|
1110
1133
|
/**
|
|
1111
1134
|
*
|
|
1112
1135
|
* Financial product - simple earn fixed endpoints
|
|
@@ -1136,14 +1159,26 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1136
1159
|
getBorrowableCurrencies(): Promise<{
|
|
1137
1160
|
borrowCcy: string;
|
|
1138
1161
|
}[]>;
|
|
1139
|
-
getCollateralAssets(params?:
|
|
1140
|
-
ccy?: string;
|
|
1141
|
-
}): Promise<CollateralAssetsResponse[]>;
|
|
1162
|
+
getCollateralAssets(params?: GetFlexibleLoanCollateralAssetsRequest): Promise<CollateralAssetsResponse[]>;
|
|
1142
1163
|
getMaxLoanAmount(params: MaxLoanRequest): Promise<MaxLoanResponse[]>;
|
|
1143
1164
|
adjustCollateral(params: AdjustCollateralRequest): Promise<[]>;
|
|
1144
|
-
getLoanInfo(): Promise<LoanInfo[]>;
|
|
1165
|
+
getLoanInfo(params?: GetLoanInfoRequest): Promise<LoanInfo[]>;
|
|
1145
1166
|
getLoanHistory(params?: LoanHistoryRequest): Promise<LoanHistoryItem[]>;
|
|
1146
1167
|
getAccruedInterest(params?: AccruedInterestRequest): Promise<AccruedInterestItem[]>;
|
|
1168
|
+
/**
|
|
1169
|
+
*
|
|
1170
|
+
* Financial product — dual investment (DCD) endpoints
|
|
1171
|
+
* @see https://www.okx.com/docs-v5/en/ (2026-03-13 release)
|
|
1172
|
+
*
|
|
1173
|
+
*/
|
|
1174
|
+
getDcdCurrencyPairs(): Promise<DcdCurrencyPair[]>;
|
|
1175
|
+
getDcdProducts(params: GetDcdProductsRequest): Promise<DcdProduct[]>;
|
|
1176
|
+
requestDcdQuote(params: RequestDcdQuoteRequest): Promise<DcdQuote[]>;
|
|
1177
|
+
submitDcdTrade(params: SubmitDcdTradeRequest): Promise<DcdTradeResult[]>;
|
|
1178
|
+
requestDcdRedeemQuote(params: RequestDcdRedeemQuoteRequest): Promise<DcdRedeemQuote[]>;
|
|
1179
|
+
submitDcdRedeem(params: SubmitDcdRedeemRequest): Promise<DcdRedeemResult[]>;
|
|
1180
|
+
getDcdOrderStatus(params: GetDcdOrderStatusRequest): Promise<DcdOrderStatus[]>;
|
|
1181
|
+
getDcdOrderHistory(params?: GetDcdOrderHistoryRequest): Promise<DcdOrderHistoryItem[]>;
|
|
1147
1182
|
/**
|
|
1148
1183
|
*
|
|
1149
1184
|
* Affiliate endpoints
|