bitget-api 3.1.9 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/cjs/constants/enum.d.ts +1 -0
  2. package/dist/cjs/constants/enum.js +1 -0
  3. package/dist/cjs/constants/enum.js.map +1 -1
  4. package/dist/cjs/rest-client-v2.d.ts +53 -6
  5. package/dist/cjs/rest-client-v2.js +54 -0
  6. package/dist/cjs/rest-client-v2.js.map +1 -1
  7. package/dist/cjs/rest-client-v3.d.ts +132 -6
  8. package/dist/cjs/rest-client-v3.js +180 -0
  9. package/dist/cjs/rest-client-v3.js.map +1 -1
  10. package/dist/cjs/types/request/v2/broker.d.ts +4 -0
  11. package/dist/cjs/types/request/v2/common.d.ts +3 -0
  12. package/dist/cjs/types/request/v2/futures.d.ts +24 -0
  13. package/dist/cjs/types/request/v2/instloan.d.ts +22 -0
  14. package/dist/cjs/types/request/v2/instloan.js +3 -0
  15. package/dist/cjs/types/request/v2/instloan.js.map +1 -0
  16. package/dist/cjs/types/request/v2/spot.d.ts +3 -0
  17. package/dist/cjs/types/request/v3/account.d.ts +82 -6
  18. package/dist/cjs/types/request/v3/public.d.ts +48 -2
  19. package/dist/cjs/types/request/v3/strategy.d.ts +3 -3
  20. package/dist/cjs/types/request/v3/trade.d.ts +34 -4
  21. package/dist/cjs/types/response/v2/futures.d.ts +7 -0
  22. package/dist/cjs/types/response/v2/instloan.d.ts +56 -0
  23. package/dist/cjs/types/response/v2/instloan.js +3 -0
  24. package/dist/cjs/types/response/v2/instloan.js.map +1 -0
  25. package/dist/cjs/types/response/v2/spot.d.ts +7 -0
  26. package/dist/cjs/types/response/v3/account.d.ts +69 -0
  27. package/dist/cjs/types/response/v3/public.d.ts +106 -1
  28. package/dist/cjs/types/response/v3/trade.d.ts +12 -0
  29. package/dist/cjs/types/websockets/ws-events.d.ts +9 -0
  30. package/dist/mjs/constants/enum.d.ts +1 -0
  31. package/dist/mjs/constants/enum.js +1 -0
  32. package/dist/mjs/constants/enum.js.map +1 -1
  33. package/dist/mjs/rest-client-v2.d.ts +53 -6
  34. package/dist/mjs/rest-client-v2.js +54 -0
  35. package/dist/mjs/rest-client-v2.js.map +1 -1
  36. package/dist/mjs/rest-client-v3.d.ts +132 -6
  37. package/dist/mjs/rest-client-v3.js +180 -0
  38. package/dist/mjs/rest-client-v3.js.map +1 -1
  39. package/dist/mjs/types/request/v2/broker.d.ts +4 -0
  40. package/dist/mjs/types/request/v2/common.d.ts +3 -0
  41. package/dist/mjs/types/request/v2/futures.d.ts +24 -0
  42. package/dist/mjs/types/request/v2/instloan.d.ts +22 -0
  43. package/dist/mjs/types/request/v2/instloan.js +2 -0
  44. package/dist/mjs/types/request/v2/instloan.js.map +1 -0
  45. package/dist/mjs/types/request/v2/spot.d.ts +3 -0
  46. package/dist/mjs/types/request/v3/account.d.ts +82 -6
  47. package/dist/mjs/types/request/v3/public.d.ts +48 -2
  48. package/dist/mjs/types/request/v3/strategy.d.ts +3 -3
  49. package/dist/mjs/types/request/v3/trade.d.ts +34 -4
  50. package/dist/mjs/types/response/v2/futures.d.ts +7 -0
  51. package/dist/mjs/types/response/v2/instloan.d.ts +56 -0
  52. package/dist/mjs/types/response/v2/instloan.js +2 -0
  53. package/dist/mjs/types/response/v2/instloan.js.map +1 -0
  54. package/dist/mjs/types/response/v2/spot.d.ts +7 -0
  55. package/dist/mjs/types/response/v3/account.d.ts +69 -0
  56. package/dist/mjs/types/response/v3/public.d.ts +106 -1
  57. package/dist/mjs/types/response/v3/trade.d.ts +12 -0
  58. package/dist/mjs/types/websockets/ws-events.d.ts +9 -0
  59. package/llms.txt +1071 -531
  60. package/package.json +4 -2
@@ -10,10 +10,20 @@ export interface SetLeverageRequestV3 {
10
10
  leverage: string;
11
11
  coin?: string;
12
12
  posSide?: 'long' | 'short';
13
+ /** Futures only. Defaults to crossed */
14
+ marginMode?: 'crossed' | 'isolated';
15
+ /** Isolated two-way mode: long leverage. Takes priority over leverage when both set */
16
+ longLeverage?: string;
17
+ /** Isolated two-way mode: short leverage. Takes priority over leverage when both set */
18
+ shortLeverage?: string;
19
+ }
20
+ export interface GetAllFeeRatesRequestV3 {
21
+ category: 'SPOT' | 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
22
+ symbol?: string;
13
23
  }
14
24
  export interface GetConvertRecordsRequestV3 {
15
- fromCoin: string;
16
- toCoin: string;
25
+ fromCoin?: string;
26
+ toCoin?: string;
17
27
  startTime?: string;
18
28
  endTime?: string;
19
29
  limit?: string;
@@ -69,8 +79,9 @@ export interface GetSubAccountListRequestV3 {
69
79
  cursor?: string;
70
80
  }
71
81
  export interface TransferRequestV3 {
72
- fromType: 'spot' | 'p2p' | 'coin-futures' | 'usdt-futures' | 'usdc-futures' | 'crossed-margin' | 'isolated-margin' | 'uta';
73
- toType: 'spot' | 'p2p' | 'coin-futures' | 'usdt-futures' | 'usdc-futures' | 'crossed-margin' | 'isolated-margin' | 'uta';
82
+ clientOid?: string;
83
+ fromType: 'spot' | 'p2p' | 'coin_futures' | 'usdt_futures' | 'usdc_futures' | 'crossed_margin' | 'isolated_margin' | 'uta';
84
+ toType: 'spot' | 'p2p' | 'coin_futures' | 'usdt_futures' | 'usdc_futures' | 'crossed_margin' | 'isolated_margin' | 'uta';
74
85
  amount: string;
75
86
  coin: string;
76
87
  symbol?: string;
@@ -78,8 +89,8 @@ export interface TransferRequestV3 {
78
89
  allowBorrow?: 'yes' | 'no';
79
90
  }
80
91
  export interface GetTransferableCoinsRequestV3 {
81
- fromType: 'spot' | 'p2p' | 'coin-futures' | 'usdt-futures' | 'usdc-futures' | 'crossed-margin' | 'isolated-margin' | 'uta';
82
- toType: 'spot' | 'p2p' | 'coin-futures' | 'usdt-futures' | 'usdc-futures' | 'crossed-margin' | 'isolated-margin' | 'uta';
92
+ fromType: 'spot' | 'p2p' | 'coin_futures' | 'usdt_futures' | 'usdc_futures' | 'crossed_margin' | 'isolated_margin' | 'uta';
93
+ toType: 'spot' | 'p2p' | 'coin_futures' | 'usdt_futures' | 'usdc_futures' | 'crossed_margin' | 'isolated_margin' | 'uta';
83
94
  }
84
95
  export interface GetSubTransferRecordsRequestV3 {
85
96
  subUid?: string;
@@ -147,6 +158,8 @@ export interface GetSubDepositRecordsRequestV3 {
147
158
  export interface WithdrawRequestV3 {
148
159
  coin: string;
149
160
  chain?: string;
161
+ /** Deduct from funding, uta, and/or otc accounts (comma-separated). Order: funding -> otc -> uta */
162
+ accountType?: string;
150
163
  transferType: 'on_chain' | 'internal_transfer';
151
164
  address: string;
152
165
  innerToType?: 'uid' | 'email' | 'mobile';
@@ -200,3 +213,66 @@ export interface GetTaxRecordsRequestV3 {
200
213
  limit?: string;
201
214
  cursor?: string;
202
215
  }
216
+ export type CollateralTypeV3 = 'mainstream' | 'all' | 'custom';
217
+ export interface SetCollateralTypeRequestV3 {
218
+ collateralType: CollateralTypeV3;
219
+ /** Required when collateralType=custom. Comma-separated coin names */
220
+ collateralCoins?: string;
221
+ }
222
+ export interface PreSetLeverageRequestV3 {
223
+ category: 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
224
+ symbol?: string;
225
+ coin?: string;
226
+ marginMode: 'isolated' | 'cross';
227
+ leverage?: string;
228
+ longLeverage?: string;
229
+ shortLeverage?: string;
230
+ }
231
+ export interface SetMarginRequestV3 {
232
+ category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
233
+ symbol: string;
234
+ posSide: 'long' | 'short';
235
+ operation: 'add' | 'remove';
236
+ amount: string;
237
+ }
238
+ export interface GetMaxWithdrawalRequestV3 {
239
+ coin: string;
240
+ }
241
+ export interface GetRealityOrderBookRequestV3 {
242
+ symbol: string;
243
+ }
244
+ export interface GetRealityFillsRequestV3 {
245
+ symbol: string;
246
+ limit?: string;
247
+ }
248
+ export interface SubMasterTransferRequestV3 {
249
+ fromType: 'spot' | 'uta';
250
+ toType: 'spot' | 'p2p' | 'uta';
251
+ amount: string;
252
+ coin: string;
253
+ clientOid?: string;
254
+ }
255
+ export interface CreateAgentSubAccountRequestV3 {
256
+ username: string;
257
+ passphrase: string;
258
+ note?: string;
259
+ }
260
+ export interface MovePositionItemRequestV3 {
261
+ symbol: string;
262
+ side: 'buy' | 'sell';
263
+ qty: string;
264
+ }
265
+ export interface MovePositionsRequestV3 {
266
+ fromUid: string;
267
+ toUid: string;
268
+ category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
269
+ positionList: MovePositionItemRequestV3[];
270
+ }
271
+ export interface GetMovePositionHistoryRequestV3 {
272
+ category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
273
+ symbol?: string;
274
+ startTime?: string;
275
+ endTime?: string;
276
+ cursor?: string;
277
+ limit?: string;
278
+ }
@@ -26,7 +26,14 @@ export interface GetContractsOiRequestV3 {
26
26
  category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
27
27
  }
28
28
  export interface GetCurrentFundingRateRequestV3 {
29
- symbol: string;
29
+ category?: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
30
+ symbol?: string;
31
+ }
32
+ export interface GetLiquidationsRequestV3 {
33
+ category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
34
+ symbol?: string;
35
+ limit?: string;
36
+ cursor?: string;
30
37
  }
31
38
  export interface GetHistoryFundingRateRequestV3 {
32
39
  category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
@@ -60,7 +67,7 @@ export interface GetInstrumentsRequestV3 {
60
67
  }
61
68
  export interface GetMarketFeeGroupRequestV3 {
62
69
  category: 'SPOT' | 'FUTURES';
63
- group?: 'GROUP_A' | 'GROUP_B' | 'GROUP_C';
70
+ group?: 'DEFAULT' | 'GROUP_A' | 'GROUP_B' | 'GROUP_C';
64
71
  }
65
72
  export interface GetMarketScoreWeightsRequestV3 {
66
73
  category?: 'SPOT' | 'FUTURES';
@@ -77,3 +84,42 @@ export interface GetTickersRequestV3 {
77
84
  export interface GetIndexComponentsRequestV3 {
78
85
  symbol: string;
79
86
  }
87
+ export interface GetRpiOrderBookRequestV3 {
88
+ category: 'SPOT' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
89
+ symbol: string;
90
+ limit?: string;
91
+ }
92
+ export interface GetCashDividendRecordsRequestV3 {
93
+ symbol: string;
94
+ type: 'pending' | 'paid';
95
+ cursor?: string;
96
+ limit?: string;
97
+ }
98
+ export interface GetSpotWhaleFlowRequestV3 {
99
+ symbol: string;
100
+ }
101
+ export interface GetSpotFundFlowRequestV3 {
102
+ symbol: string;
103
+ period?: string;
104
+ }
105
+ export interface GetSpotNetFlowRequestV3 {
106
+ symbol: string;
107
+ }
108
+ export interface GetMarginLongShortRequestV3 {
109
+ symbol: string;
110
+ period?: '24h' | '30d';
111
+ coin?: string;
112
+ }
113
+ export interface GetMarginLoanGrowthRequestV3 {
114
+ symbol: string;
115
+ period?: string;
116
+ coin?: string;
117
+ }
118
+ export interface GetMarginIsolatedBorrowRequestV3 {
119
+ symbol: string;
120
+ period?: string;
121
+ }
122
+ export interface GetFuturesTradingDataRequestV3 {
123
+ symbol: string;
124
+ period?: string;
125
+ }
@@ -3,7 +3,7 @@ export type StrategyOrderStatusV3 = 'pending' | 'success' | 'failed' | 'cancelle
3
3
  export type StrategyTriggerByV3 = 'market' | 'mark';
4
4
  export type StrategyTriggerOrderTypeV3 = 'limit' | 'market';
5
5
  export interface PlaceStrategyOrderRequestV3 {
6
- category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
6
+ category: 'SPOT' | 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
7
7
  symbol: string;
8
8
  clientOid?: string;
9
9
  type?: StrategyOrderTypeV3;
@@ -48,11 +48,11 @@ export interface CancelStrategyOrderRequestV3 {
48
48
  clientOid?: string;
49
49
  }
50
50
  export interface GetUnfilledStrategyOrdersRequestV3 {
51
- category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
51
+ category: 'SPOT' | 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
52
52
  type?: StrategyOrderTypeV3;
53
53
  }
54
54
  export interface GetHistoryStrategyOrdersRequestV3 {
55
- category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
55
+ category: 'SPOT' | 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
56
56
  type?: StrategyOrderTypeV3;
57
57
  startTime?: string;
58
58
  endTime?: string;
@@ -23,6 +23,7 @@ export interface CloseAllPositionsRequestV3 {
23
23
  export interface CancelOrderRequestV3 {
24
24
  orderId?: string;
25
25
  clientOid?: string;
26
+ category?: 'SPOT' | 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
26
27
  }
27
28
  export interface GetMaxOpenAvailableRequestV3 {
28
29
  category: 'SPOT' | 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
@@ -37,6 +38,7 @@ export interface GetOrderInfoRequestV3 {
37
38
  clientOid?: string;
38
39
  }
39
40
  export interface GetFillsRequestV3 {
41
+ category?: 'SPOT' | 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
40
42
  orderId?: string;
41
43
  startTime?: string;
42
44
  endTime?: string;
@@ -53,6 +55,7 @@ export interface GetUnfilledOrdersRequestV3 {
53
55
  }
54
56
  export interface GetHistoryOrdersRequestV3 {
55
57
  category: 'SPOT' | 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
58
+ symbol?: string;
56
59
  startTime?: string;
57
60
  endTime?: string;
58
61
  limit?: string;
@@ -77,6 +80,29 @@ export interface ModifyOrderRequestV3 {
77
80
  qty?: string;
78
81
  price?: string;
79
82
  autoCancel?: 'yes' | 'no';
83
+ symbol?: string;
84
+ category?: 'SPOT' | 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
85
+ tpTriggerBy?: 'market' | 'mark';
86
+ slTriggerBy?: 'market' | 'mark';
87
+ takeProfit?: string;
88
+ stopLoss?: string;
89
+ tpOrderType?: 'limit' | 'market';
90
+ slOrderType?: 'limit' | 'market';
91
+ tpLimitPrice?: string;
92
+ slLimitPrice?: string;
93
+ }
94
+ export interface PlaceRealityOrderRequestV3 {
95
+ symbol: string;
96
+ side: 'buy' | 'sell';
97
+ orderType: 'limit' | 'market';
98
+ qty: string;
99
+ price?: string;
100
+ clientOid?: string;
101
+ }
102
+ export interface CancelRealityOrderRequestV3 {
103
+ symbol: string;
104
+ orderId?: string;
105
+ clientOid?: string;
80
106
  }
81
107
  export interface PlaceBatchOrdersRequestV3 {
82
108
  category: 'SPOT' | 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
@@ -105,10 +131,14 @@ export interface PlaceOrderRequestV3 {
105
131
  /** Futures only. Defaults to crossed */
106
132
  marginMode?: FuturesMarginModeV3;
107
133
  stpMode?: 'none' | 'cancel_taker' | 'cancel_maker' | 'cancel_both';
108
- takeProfitPrice?: string;
109
- stopLossPrice?: string;
110
- takeProfitTriggerType?: 'mark_price' | 'last_price';
111
- stopLossTriggerType?: 'mark_price' | 'last_price';
134
+ tpTriggerBy?: 'market' | 'mark';
135
+ slTriggerBy?: 'market' | 'mark';
136
+ takeProfit?: string;
137
+ stopLoss?: string;
138
+ tpOrderType?: 'limit' | 'market';
139
+ slOrderType?: 'limit' | 'market';
140
+ tpLimitPrice?: string;
141
+ slLimitPrice?: string;
112
142
  }
113
143
  export interface CountdownCancelAllRequestV3 {
114
144
  countdown: string;
@@ -289,6 +289,13 @@ export interface FuturesPositionV2 {
289
289
  autoMargin: string;
290
290
  cTime: string;
291
291
  }
292
+ export interface FuturesPositionAdlRankV2 {
293
+ symbol: string;
294
+ marginCoin: string;
295
+ adlRank: string;
296
+ rank: string;
297
+ holdSide: string;
298
+ }
292
299
  export interface FuturesHistoryPositionV2 {
293
300
  positionId: string;
294
301
  marginCoin: string;
@@ -0,0 +1,56 @@
1
+ export interface InstLoanProductInfoV2 {
2
+ productId: string;
3
+ leverage: string;
4
+ transferLine: string;
5
+ spotBuyLine: string;
6
+ liquidationLine: string;
7
+ stopLiquidationLine: string;
8
+ }
9
+ export interface InstLoanSymbolsV2 {
10
+ productId: string;
11
+ spotSymbols: string[];
12
+ }
13
+ export interface InstLoanRepaidHistoryItemV2 {
14
+ repayOrderId: string;
15
+ businessType: string;
16
+ repayType: string;
17
+ repaidTime: string;
18
+ coin: string;
19
+ repaidAmount: string;
20
+ repaidInterest: string;
21
+ }
22
+ export interface InstLoanOrderV2 {
23
+ orderId: string;
24
+ orderProductId: string;
25
+ uid: string;
26
+ loanTime: string;
27
+ loanCoin: string;
28
+ loanAmount: string;
29
+ unpaidAmount: string;
30
+ unpaidInterest: string;
31
+ repaidAmount: string;
32
+ repaidInterest: string;
33
+ status: string;
34
+ }
35
+ export interface InstLoanCoinInfoV2 {
36
+ coin: string;
37
+ convertRatio: string;
38
+ maxConvertValue: string;
39
+ }
40
+ export interface InstLoanLTVConvertV2 {
41
+ ltv: string;
42
+ subAccountUids: string[];
43
+ unpaidUsdtAmount: string;
44
+ usdtBalance: string;
45
+ unpaidInfo: {
46
+ coin: string;
47
+ unpaidQty: string;
48
+ unpaidInterest: string;
49
+ }[];
50
+ balanceInfo: {
51
+ coin: string;
52
+ price: string;
53
+ amount: string;
54
+ convertedUsdtAmount: string;
55
+ }[];
56
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=instloan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instloan.js","sourceRoot":"","sources":["../../../../../src/types/response/v2/instloan.ts"],"names":[],"mappings":""}
@@ -73,6 +73,13 @@ export interface SpotTickerV2 {
73
73
  changeUtc24h: string;
74
74
  change24h: string;
75
75
  }
76
+ export interface SpotCallAuctionV2 {
77
+ stage: string;
78
+ stageEndTime: string;
79
+ estOpeningPrice: string | null;
80
+ matchedVolume: string | null;
81
+ auctionEndTime: string;
82
+ }
76
83
  export interface SpotMergeDepthV2 {
77
84
  asks: [string, string][];
78
85
  bids: [string, string][];
@@ -1,3 +1,4 @@
1
+ import type { CollateralTypeV3 } from '../../request/v3/account.js';
1
2
  export interface AccountSymbolConfigV3 {
2
3
  category: string;
3
4
  symbol: string;
@@ -51,6 +52,10 @@ export interface AccountAssetV3 {
51
52
  available: string;
52
53
  debt: string;
53
54
  locked: string;
55
+ /** Position value in USD */
56
+ positionValue?: string;
57
+ /** Account leverage (non-negative) */
58
+ leverage?: string;
54
59
  }
55
60
  export interface AccountAssetsV3 {
56
61
  accountEquity: string;
@@ -84,6 +89,10 @@ export interface FinancialRecordV3 {
84
89
  fee: string;
85
90
  balance: string;
86
91
  ts: string;
92
+ /** crossed | isolated */
93
+ positionType?: string;
94
+ positionAmount?: string;
95
+ positionBalance?: string;
87
96
  }
88
97
  export interface PaymentCoinV3 {
89
98
  coin: string;
@@ -130,6 +139,14 @@ export interface CreateSubAccountResponseV3 {
130
139
  createdTime: string;
131
140
  updatedTime: string;
132
141
  }
142
+ export interface CreateAgentSubAccountResponseV3 {
143
+ username: string;
144
+ subUid: string;
145
+ apiKey: string;
146
+ secret: string;
147
+ note: string;
148
+ createdTime: string;
149
+ }
133
150
  export interface SubAccountV3 {
134
151
  subUid: string;
135
152
  username: string;
@@ -155,8 +172,14 @@ export interface WithdrawAddressBookV3 {
155
172
  addressList: WithdrawAddressBookEntryV3[];
156
173
  cursor?: string;
157
174
  }
175
+ export interface AllSymbolFeeRateV3 {
176
+ symbol: string;
177
+ makerFeeRate: string;
178
+ takerFeeRate: string;
179
+ }
158
180
  export interface TransferResponseV3 {
159
181
  transferId: string;
182
+ clientOid?: string;
160
183
  }
161
184
  export interface SubTransferRecordV3 {
162
185
  transferId: string;
@@ -259,3 +282,49 @@ export interface TaxRecordV3 {
259
282
  balance: string;
260
283
  ts: string;
261
284
  }
285
+ export interface CollateralTypeConfigV3 {
286
+ collateralType: CollateralTypeV3;
287
+ /** Returned when collateralType=custom */
288
+ collateralCoins?: string;
289
+ }
290
+ export interface CustomCollateralCoinV3 {
291
+ collateralCoin: string;
292
+ }
293
+ export interface PreSetLeverageV3 {
294
+ estMaxOpen?: string;
295
+ estMaxBorrowable?: string;
296
+ requiredMargin: string;
297
+ marginChange: string;
298
+ }
299
+ export interface MaxWithdrawalV3 {
300
+ coin: string;
301
+ otcMaxWithdrawal: string;
302
+ spotMaxWithdrawal: string;
303
+ utaMaxWithdrawal: string;
304
+ totalMaxWithdrawal: string;
305
+ }
306
+ export interface MovePositionOrderResultV3 {
307
+ orderId: string;
308
+ clientOid: string;
309
+ code: string;
310
+ msg: string;
311
+ }
312
+ export interface MovePositionsResponseV3 {
313
+ closePosition: MovePositionOrderResultV3[];
314
+ openPosition: MovePositionOrderResultV3[];
315
+ }
316
+ export interface MovePositionHistoryV3 {
317
+ category: string;
318
+ fromUid: string;
319
+ toUid: string;
320
+ orderId: string;
321
+ openExecId: string;
322
+ closeExecId: string;
323
+ symbol: string;
324
+ posSide: 'long' | 'short';
325
+ qty: string;
326
+ price: string;
327
+ status: 'processing' | 'completed' | 'failed';
328
+ createdTime: string;
329
+ updatedTime: string;
330
+ }
@@ -26,6 +26,8 @@ export interface CurrentFundingRateV3 {
26
26
  nextUpdate: string;
27
27
  minFundingRate: string;
28
28
  maxFundingRate: string;
29
+ cashDividend?: string;
30
+ cashDividendNextUpdate?: string;
29
31
  }
30
32
  export interface DiscountRateTierV3 {
31
33
  tierStartValue: string;
@@ -110,12 +112,16 @@ export interface InstrumentV3 {
110
112
  limitOpenTime: string;
111
113
  maintainTime: string;
112
114
  areaSymbol?: string;
115
+ isRwa?: 'YES' | 'NO';
116
+ /** yes = Reality stock token, no = non-Reality stock token */
117
+ isReality?: 'yes' | 'no';
113
118
  makerFeeRate?: string;
114
119
  takerFeeRate?: string;
115
120
  openCostUpRatio?: string;
116
121
  priceMultiplier?: string;
117
122
  quantityMultiplier?: string;
118
- symbolType?: 'perpetual' | 'delivery';
123
+ type?: 'perpetual' | 'delivery';
124
+ symbolType?: 'crypto' | 'metal' | 'stock' | 'commodity';
119
125
  maxPositionNum?: string;
120
126
  deliveryTime?: string;
121
127
  deliveryStartTime?: string;
@@ -141,6 +147,8 @@ export interface MarketFeeGroupLabelV3 {
141
147
  export interface MarketFeeGroupTierV3 {
142
148
  level: string;
143
149
  makerFeeRate: string;
150
+ /** PRO1~PRO6 only. Taker fee rate in decimal form */
151
+ takerFeeRate?: string;
144
152
  }
145
153
  export interface MarketFeeGroupV3 {
146
154
  category: string;
@@ -156,11 +164,35 @@ export interface MarketScoreWeightV3 {
156
164
  minMakerVolume: string;
157
165
  weight: string;
158
166
  }
167
+ export interface LiquidationV3 {
168
+ symbol: string;
169
+ side: 'buy' | 'sell';
170
+ price: string;
171
+ amount: string;
172
+ ts: string;
173
+ }
174
+ export interface LiquidationsV3 {
175
+ list: LiquidationV3[];
176
+ cursor?: string;
177
+ }
159
178
  export interface OrderBookV3 {
160
179
  a: string[][];
161
180
  b: string[][];
162
181
  ts: string;
163
182
  }
183
+ export interface RealityOrderBookV3 {
184
+ symbol: string;
185
+ a: string[][];
186
+ b: string[][];
187
+ ts: string;
188
+ }
189
+ export interface RealityFillV3 {
190
+ execId: string;
191
+ price: string;
192
+ size: string;
193
+ side: 'buy' | 'sell';
194
+ ts: string;
195
+ }
164
196
  export interface TickerV3 {
165
197
  category: 'SPOT' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
166
198
  symbol: string;
@@ -203,3 +235,76 @@ export interface IndexPriceComponentsV3 {
203
235
  symbol: string;
204
236
  componentList: IndexComponentV3[];
205
237
  }
238
+ export interface RpiSymbolV3 {
239
+ category: 'spot' | 'usdt-futures' | 'coin-futures' | 'usdc-futures';
240
+ symbol: string;
241
+ }
242
+ /** RPI order book depth: [price, nonRpiQty, rpiQty] */
243
+ export interface RpiOrderBookV3 {
244
+ a: [string, string, string][];
245
+ b: [string, string, string][];
246
+ ts: string;
247
+ }
248
+ export interface CashDividendRecordV3 {
249
+ symbol: string;
250
+ exDividendDate: string;
251
+ cashDividendPerShare: string;
252
+ cashDividendTimestamp: string;
253
+ }
254
+ export interface SpotWhaleFlowV3 {
255
+ volume: string;
256
+ date: string;
257
+ }
258
+ export interface SpotNetFlowV3 {
259
+ netFlow: string;
260
+ ts: string;
261
+ }
262
+ export interface SpotFundFlowV3 {
263
+ whaleBuyVolume: string;
264
+ dolphinBuyVolume: string;
265
+ fishBuyVolume: string;
266
+ whaleSellVolume: string;
267
+ dolphinSellVolume: string;
268
+ fishSellVolume: string;
269
+ whaleBuyRatio: string;
270
+ dolphinBuyRatio: string;
271
+ fishBuyRatio: string;
272
+ whaleSellRatio: string;
273
+ dolphinSellRatio: string;
274
+ fishSellRatio: string;
275
+ }
276
+ export interface MarginLongShortV3 {
277
+ longShortRatio: string;
278
+ ts: string;
279
+ }
280
+ export interface MarginLoanGrowthV3 {
281
+ growthRate: string;
282
+ ts: string;
283
+ }
284
+ export interface MarginIsolatedBorrowV3 {
285
+ borrowRate: string;
286
+ ts: string;
287
+ }
288
+ export interface FuturesActiveBuySellV3 {
289
+ buyVolume: string;
290
+ sellVolume: string;
291
+ ts: string;
292
+ }
293
+ export interface FuturesLongShortV3 {
294
+ longRatio: string;
295
+ shortRatio: string;
296
+ longShortRatio: string;
297
+ ts: string;
298
+ }
299
+ export interface FuturesPositionLongShortV3 {
300
+ longPositionRatio: string;
301
+ shortPositionRatio: string;
302
+ longShortPositionRatio: string;
303
+ ts: string;
304
+ }
305
+ export interface FuturesAccountLongShortV3 {
306
+ longAccountRatio: string;
307
+ shortAccountRatio: string;
308
+ longShortAccountRatio: string;
309
+ ts: string;
310
+ }
@@ -57,6 +57,7 @@ export interface OrderInfoV3 {
57
57
  orderStatus: string;
58
58
  posSide: string;
59
59
  holdMode: string;
60
+ delegateType?: string;
60
61
  reduceOnly: string;
61
62
  feeDetail: FeeDetailV3[];
62
63
  cancelReason: string;
@@ -180,6 +181,17 @@ export interface CurrentPositionV3 {
180
181
  createdTime: string;
181
182
  updatedTime: string;
182
183
  }
184
+ export interface LoanDataDebtCoinV3 {
185
+ coin: string;
186
+ debt: string;
187
+ interestFreeAmount: string;
188
+ interestRateNextHour: string;
189
+ }
190
+ export interface LoanDataV3 {
191
+ currentLoans: string;
192
+ interestPaymentTime: string;
193
+ debtCoinList: LoanDataDebtCoinV3[];
194
+ }
183
195
  export interface ModifyOrderResponseV3 {
184
196
  orderId: string;
185
197
  clientOid: string;
@@ -79,3 +79,12 @@ export interface WSPositionSnapshotUMCBL extends WsBaseEvent<'snapshot'> {
79
79
  };
80
80
  data: WsPositionSnapshotDataUMCBL[];
81
81
  }
82
+ /** Classic V2 depth channel push data. checksum removed May 2026 - use seq instead */
83
+ export interface WsDepthBookDataV2 {
84
+ asks: [string, string][];
85
+ bids: [string, string][];
86
+ ts: string;
87
+ seq: string;
88
+ /** Futures books channel only - previous push serial number */
89
+ pseq?: string;
90
+ }
@@ -26,6 +26,7 @@ export declare const API_ERROR_CODE: {
26
26
  readonly FUTURES_ORDER_TPSL_NOT_FOUND: "43020";
27
27
  readonly PLAN_ORDER_NOT_FOUND: "43025";
28
28
  readonly EXCEEDS_MAX_AMOUNT_TRANSFERRED: "43117";
29
+ readonly EXCEEDS_MAX_AMOUNT_TRANSFERRED_V2: "43152";
29
30
  readonly QTY_LESS_THAN_MINIMUM_SPOT: "45110";
30
31
  readonly PASSPHRASE_CANNOT_BE_EMPTY: "400172";
31
32
  readonly ORDER_TYPE_MUST_BE_UNILATERAL_POSITION: "40774";
@@ -26,6 +26,7 @@ export const API_ERROR_CODE = {
26
26
  FUTURES_ORDER_TPSL_NOT_FOUND: '43020',
27
27
  PLAN_ORDER_NOT_FOUND: '43025',
28
28
  EXCEEDS_MAX_AMOUNT_TRANSFERRED: '43117',
29
+ EXCEEDS_MAX_AMOUNT_TRANSFERRED_V2: '43152',
29
30
  QTY_LESS_THAN_MINIMUM_SPOT: '45110',
30
31
  PASSPHRASE_CANNOT_BE_EMPTY: '400172',
31
32
  ORDER_TYPE_MUST_BE_UNILATERAL_POSITION: '40774',