bybit-api 4.6.2 → 4.6.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.
Files changed (36) hide show
  1. package/README.md +1 -0
  2. package/lib/rest-client-v5.d.ts +167 -6
  3. package/lib/rest-client-v5.js +225 -2
  4. package/lib/rest-client-v5.js.map +1 -1
  5. package/lib/types/request/index.d.ts +2 -0
  6. package/lib/types/request/index.js +2 -0
  7. package/lib/types/request/index.js.map +1 -1
  8. package/lib/types/request/v5-account.d.ts +3 -5
  9. package/lib/types/request/v5-crypto-loan.d.ts +8 -0
  10. package/lib/types/request/v5-earn-pwm.d.ts +167 -0
  11. package/lib/types/request/v5-earn-pwm.js +3 -0
  12. package/lib/types/request/v5-earn-pwm.js.map +1 -0
  13. package/lib/types/request/v5-earn.d.ts +11 -0
  14. package/lib/types/request/v5-market.d.ts +3 -5
  15. package/lib/types/request/v5-strategy.d.ts +80 -0
  16. package/lib/types/request/v5-strategy.js +3 -0
  17. package/lib/types/request/v5-strategy.js.map +1 -0
  18. package/lib/types/request/v5-user.d.ts +22 -0
  19. package/lib/types/response/index.d.ts +2 -0
  20. package/lib/types/response/index.js +2 -0
  21. package/lib/types/response/index.js.map +1 -1
  22. package/lib/types/response/v5-asset.d.ts +3 -0
  23. package/lib/types/response/v5-earn-pwm.d.ts +425 -0
  24. package/lib/types/response/v5-earn-pwm.js +3 -0
  25. package/lib/types/response/v5-earn-pwm.js.map +1 -0
  26. package/lib/types/response/v5-earn.d.ts +38 -0
  27. package/lib/types/response/v5-market.d.ts +11 -13
  28. package/lib/types/response/v5-position.d.ts +2 -4
  29. package/lib/types/response/v5-strategy.d.ts +96 -0
  30. package/lib/types/response/v5-strategy.js +3 -0
  31. package/lib/types/response/v5-strategy.js.map +1 -0
  32. package/lib/types/response/v5-user.d.ts +19 -5
  33. package/lib/types/shared-v5.d.ts +11 -2
  34. package/lib/types/websockets/ws-events.d.ts +2 -4
  35. package/llms.txt +8587 -5935
  36. package/package.json +4 -6
@@ -0,0 +1,425 @@
1
+ export interface PwmCoinAmountV5 {
2
+ coin: string;
3
+ amount: string;
4
+ }
5
+ export interface PwmMultiCoinsEarningPositionItemV5 {
6
+ category: string;
7
+ productId: string;
8
+ coin: string;
9
+ currentAmount: string;
10
+ accumulateYield: string;
11
+ apr: string;
12
+ positionId: string;
13
+ status?: string;
14
+ }
15
+ export interface PwmMultiCoinsEarningPositionsV5 {
16
+ totalInvestmentUsd: string;
17
+ accumulateYieldUsd: string;
18
+ weightedAvgApr: string;
19
+ items: PwmMultiCoinsEarningPositionItemV5[];
20
+ }
21
+ export interface PwmFixedYieldPositionItemV5 {
22
+ category: string;
23
+ productId: string;
24
+ coin: string;
25
+ currentAmount: string;
26
+ accumulateYield: string;
27
+ apr: string;
28
+ duration: number;
29
+ maturityTime: string;
30
+ autoReinvest: boolean;
31
+ positionId: string;
32
+ status?: string;
33
+ }
34
+ export interface PwmFixedYieldPositionsV5 {
35
+ totalInvestmentUsd: string;
36
+ accumulateYieldUsd: string;
37
+ weightedAvgApr: string;
38
+ items: PwmFixedYieldPositionItemV5[];
39
+ }
40
+ export interface PwmEquityFundPositionItemV5 {
41
+ category: string;
42
+ productId: string;
43
+ fundName: string;
44
+ coin: string;
45
+ tags: string[];
46
+ nav: string;
47
+ userShares: string;
48
+ shareValue: string;
49
+ holdingValue: string;
50
+ accumulateYield: string;
51
+ apr30d: string;
52
+ aprTotal: string;
53
+ sharpRatio: string;
54
+ maxDrawdown: string;
55
+ createdTime: string;
56
+ runningDays: number;
57
+ positionId?: string;
58
+ status?: string;
59
+ }
60
+ export interface PwmEquityFundsPositionsV5 {
61
+ totalInvestmentUsd: string;
62
+ accumulateYieldUsd: string;
63
+ weightedAvgApr: string;
64
+ items: PwmEquityFundPositionItemV5[];
65
+ }
66
+ export interface PwmOnchainEarnPositionItemV5 {
67
+ category: string;
68
+ productId: string;
69
+ coin: string;
70
+ stakeAmount: string;
71
+ apr: string;
72
+ positionId: string;
73
+ status?: string;
74
+ }
75
+ export interface PwmOnchainEarnPositionsV5 {
76
+ totalInvestmentUsd: string;
77
+ accumulateYieldUsd: string;
78
+ items: PwmOnchainEarnPositionItemV5[];
79
+ }
80
+ export interface PwmInvestmentPlanPositionsV5 {
81
+ multiCoinsEarning?: PwmMultiCoinsEarningPositionsV5;
82
+ fixedYield?: PwmFixedYieldPositionsV5;
83
+ equityFunds?: PwmEquityFundsPositionsV5;
84
+ onchainEarn?: PwmOnchainEarnPositionsV5;
85
+ fundingAccount?: PwmCoinAmountV5[];
86
+ }
87
+ /** GET /v5/earn/pwm/investment-plan/list */
88
+ export interface PwmInvestmentPlanSummaryV5 {
89
+ planId: string;
90
+ planName: string;
91
+ planType: string;
92
+ status: string;
93
+ currentAssetUsd?: string;
94
+ accumulateYieldUsd?: string;
95
+ weightedAvgApr?: string;
96
+ createdTime?: string;
97
+ }
98
+ export interface PwmInvestmentPlanListResultV5 {
99
+ list: PwmInvestmentPlanSummaryV5[];
100
+ }
101
+ /** GET /v5/earn/pwm/investment-plan/detail */
102
+ export interface PwmInvestmentPlanDetailV5 {
103
+ planId: string;
104
+ planName: string;
105
+ planType: string;
106
+ status: string;
107
+ currentAssetUsd: string;
108
+ accumulateYieldUsd: string;
109
+ weightedAvgApr: string;
110
+ currentAssets: PwmCoinAmountV5[];
111
+ positions: PwmInvestmentPlanPositionsV5;
112
+ createdTime: string;
113
+ }
114
+ export interface PwmEquityFundIntroductionV5 {
115
+ description: string;
116
+ historicalYieldRateMax: string;
117
+ historicalYieldRateMin: string;
118
+ sharpRatio: string;
119
+ maxDrawback: string;
120
+ lockupPeriod: string;
121
+ }
122
+ export interface PwmPendingMultiCoinsEarningItemV5 {
123
+ category: string;
124
+ productId: string;
125
+ coin: string;
126
+ configuredAmount: string;
127
+ apr: string;
128
+ }
129
+ export interface PwmPendingFixedYieldItemV5 {
130
+ category: string;
131
+ productId: string;
132
+ coin: string;
133
+ configuredAmount: string;
134
+ apr: string;
135
+ duration: number;
136
+ }
137
+ export interface PwmPendingEquityFundItemV5 {
138
+ category: string;
139
+ productId: string;
140
+ fundName: string;
141
+ coin: string;
142
+ configuredAmount: string;
143
+ tags: string[];
144
+ introduction: PwmEquityFundIntroductionV5;
145
+ }
146
+ export interface PwmPendingOnchainEarnItemV5 {
147
+ category: string;
148
+ productId: string;
149
+ coin: string;
150
+ configuredAmount: string;
151
+ apr: string;
152
+ }
153
+ export interface PwmPendingInvestmentPlanProductsV5 {
154
+ multiCoinsEarning?: {
155
+ configuredAmountUsd: string;
156
+ items: PwmPendingMultiCoinsEarningItemV5[];
157
+ };
158
+ fixedYield?: {
159
+ configuredAmountUsd: string;
160
+ items: PwmPendingFixedYieldItemV5[];
161
+ };
162
+ equityFunds?: {
163
+ configuredAmountUsd: string;
164
+ items: PwmPendingEquityFundItemV5[];
165
+ };
166
+ onchainEarn?: {
167
+ configuredAmountUsd: string;
168
+ items: PwmPendingOnchainEarnItemV5[];
169
+ };
170
+ }
171
+ /** GET /v5/earn/pwm/investment-plan/new-plan */
172
+ export interface PwmPendingInvestmentPlanDetailV5 {
173
+ planId: string;
174
+ planName: string;
175
+ planType: string;
176
+ status: string;
177
+ source: string;
178
+ totalConfiguredAmountUsd: string;
179
+ products: PwmPendingInvestmentPlanProductsV5;
180
+ createdTime: string;
181
+ }
182
+ /** POST /v5/earn/pwm/investment-plan/claim */
183
+ export interface ClaimPwmWithdrawableFundsResultV5 {
184
+ planId: string;
185
+ toAccountType: number;
186
+ status: string;
187
+ createdTime: string;
188
+ }
189
+ export interface PwmAssetTrendDataPointV5 {
190
+ date: string;
191
+ assetValueUsd: string;
192
+ }
193
+ /** GET /v5/earn/pwm/investment-plan/asset-trend */
194
+ export interface PwmInvestmentPlanAssetTrendResultV5 {
195
+ planId: string;
196
+ dataPoints: PwmAssetTrendDataPointV5[];
197
+ }
198
+ export interface PwmFundNavDataPointV5 {
199
+ date: string;
200
+ nav: string;
201
+ }
202
+ /** GET /v5/earn/pwm/investment-plan/fund-nav */
203
+ export interface PwmFundHistoricalNavResultV5 {
204
+ fundId: string;
205
+ fundName: string;
206
+ coin: string;
207
+ currentNav: string;
208
+ dataPoints: PwmFundNavDataPointV5[];
209
+ }
210
+ /** POST /v5/earn/pwm/investment-plan/subscribe */
211
+ export interface SubscribePwmInvestmentPlanResultV5 {
212
+ planId: string;
213
+ status: string;
214
+ orderLinkId: string;
215
+ }
216
+ /** POST /v5/earn/pwm/investment-plan/invest-more */
217
+ export interface InvestMorePwmInvestmentPlanResultV5 {
218
+ planId: string;
219
+ category: string;
220
+ productId: string;
221
+ coin: string;
222
+ amount: string;
223
+ status: string;
224
+ orderLinkId: string;
225
+ orderId: string;
226
+ }
227
+ /** POST /v5/earn/pwm/investment-plan/redeem */
228
+ export interface RedeemPwmInvestmentPlanResultV5 {
229
+ orderId: string;
230
+ planId: string;
231
+ category: string;
232
+ productId: string;
233
+ shares?: string;
234
+ amount?: string;
235
+ estimatedAmount?: string;
236
+ coin: string;
237
+ status: string;
238
+ orderLinkId: string;
239
+ }
240
+ /** GET /v5/earn/pwm/investment-plan/order */
241
+ export interface PwmInvestmentPlanOrderV5 {
242
+ orderId: string;
243
+ planId: string;
244
+ type: string;
245
+ accountType: string;
246
+ coin: string;
247
+ amount: string;
248
+ category: string;
249
+ productId: string;
250
+ status: string;
251
+ orderTime: string;
252
+ }
253
+ export interface PwmInvestmentPlanOrdersResultV5 {
254
+ list: PwmInvestmentPlanOrderV5[];
255
+ nextPageCursor: string;
256
+ }
257
+ /** GET /v5/earn/pwm/customize-plan/product */
258
+ export interface PwmSubscribableProductCardV5 {
259
+ category: string;
260
+ productId?: string;
261
+ fundName?: string;
262
+ coin: string;
263
+ apr?: string;
264
+ aprRangeLow?: string;
265
+ aprRangeHigh?: string;
266
+ tags?: string[];
267
+ introduction?: string;
268
+ aum?: string;
269
+ minInvestmentAmount?: string;
270
+ maxInvestmentAmount?: string;
271
+ duration?: number;
272
+ maxDrawdown?: string;
273
+ sharpRatio?: string;
274
+ estAPR?: string;
275
+ }
276
+ export interface PwmSubscribableProductGroupV5 {
277
+ type: string;
278
+ cards: PwmSubscribableProductCardV5[];
279
+ }
280
+ export interface PwmSubscribableProductInfoResultV5 {
281
+ products: PwmSubscribableProductGroupV5[];
282
+ }
283
+ /** POST /v5/earn/pwm/customize-plan/create */
284
+ export interface CreatePwmCustomizeInvestmentPlanResultV5 {
285
+ planId: string;
286
+ planName: string;
287
+ status: string;
288
+ orderLinkId?: string;
289
+ }
290
+ /** GET /v5/earn/pwm/asset-manager/all-funds */
291
+ export interface PwmAssetManagerFundV5 {
292
+ fundId: string;
293
+ fundName: string;
294
+ coin: string;
295
+ status: string;
296
+ totalEquity: string;
297
+ totalShares: string;
298
+ currentNav: string;
299
+ currentAPR?: string;
300
+ accountUid: string;
301
+ subAccountList: string[];
302
+ profitShareRate: string;
303
+ managementFeeRate: string;
304
+ uncollectedProfit: string;
305
+ collectedProfit: string;
306
+ totalLoan: string;
307
+ createdTime: string;
308
+ }
309
+ export interface PwmAllFundsResultV5 {
310
+ list: PwmAssetManagerFundV5[];
311
+ nextPageCursor: string;
312
+ }
313
+ /** POST /v5/earn/pwm/asset-manager/settle-profit */
314
+ export interface SettlePwmFundProfitResultV5 {
315
+ fundId: string;
316
+ status: string;
317
+ totalProfitShared: string;
318
+ instIncome: string;
319
+ coin: string;
320
+ createdTime: string;
321
+ }
322
+ /** POST /v5/earn/pwm/asset-manager/create-fund */
323
+ export interface CreatePwmFundResultV5 {
324
+ fundId: string;
325
+ fundName: string;
326
+ coin: string;
327
+ status: string;
328
+ profitShareRate: string;
329
+ managementFeeRate: string;
330
+ accountUid: string;
331
+ createdTime: string;
332
+ }
333
+ /** POST /v5/earn/pwm/asset-manager/create-investment-plan */
334
+ export interface CreatePwmAssetManagerInvestmentPlanResultV5 {
335
+ planId: string;
336
+ planType: string;
337
+ accountUid: string;
338
+ status: string;
339
+ createdTime: string;
340
+ }
341
+ /** GET /v5/earn/pwm/asset-manager/get-investment-plan */
342
+ export interface PwmAssetManagerInvestmentPlanDistributionV5 {
343
+ category: string;
344
+ coin: string;
345
+ productId: string;
346
+ currentAmount: string;
347
+ }
348
+ export interface PwmAssetManagerInvestmentPlanV5 {
349
+ planId: string;
350
+ planName: string;
351
+ planType: string;
352
+ subscriptionUid: string;
353
+ status: string;
354
+ source: string;
355
+ currentAssetUsd: string;
356
+ accumulateYieldUsd: string;
357
+ investmentDistribution: PwmAssetManagerInvestmentPlanDistributionV5[];
358
+ createdTime: string;
359
+ }
360
+ export interface PwmAssetManagerInvestmentPlansResultV5 {
361
+ list: PwmAssetManagerInvestmentPlanV5[];
362
+ nextPageCursor: string;
363
+ }
364
+ /** POST /v5/earn/pwm/asset-manager/manage-investment-plan */
365
+ export interface ManagePwmAssetManagerInvestmentPlanFundResultV5 {
366
+ fundId: string;
367
+ amount: string;
368
+ }
369
+ export interface ManagePwmAssetManagerInvestmentPlanResultV5 {
370
+ planId: string;
371
+ status: string;
372
+ updatedTime: string;
373
+ updateFunds: ManagePwmAssetManagerInvestmentPlanFundResultV5[];
374
+ }
375
+ /** GET /v5/earn/pwm/asset-manager/all-order */
376
+ export interface PwmAssetManagerFundOrderV5 {
377
+ orderId: string;
378
+ fundId: string;
379
+ fundName: string;
380
+ accountUid: string;
381
+ orderType: string;
382
+ coin: string;
383
+ amount: string;
384
+ shares: string;
385
+ status: string;
386
+ createdTime: string;
387
+ }
388
+ export interface PwmAllFundOrdersResultV5 {
389
+ list: PwmAssetManagerFundOrderV5[];
390
+ nextPageCursor: string;
391
+ }
392
+ /** POST /v5/earn/pwm/asset-manager/manage-order */
393
+ export interface ManagePwmFundOrderResultV5 {
394
+ orderId: string;
395
+ fundId: string;
396
+ accountUid: string;
397
+ orderStatus: string;
398
+ orderType: string;
399
+ action: string;
400
+ coin: string;
401
+ amount: string;
402
+ shares: string;
403
+ updatedTime: string;
404
+ }
405
+ /** POST /v5/earn/pwm/asset-manager/create-sub-account */
406
+ export interface CreatePwmFundSubAccountResultV5 {
407
+ fundId: string;
408
+ subAccountUid: string;
409
+ createdTime: string;
410
+ status: string;
411
+ }
412
+ /** POST /v5/earn/pwm/fund-transfer */
413
+ export interface PwmFundTransferResultV5 {
414
+ transferId: string;
415
+ status: string;
416
+ }
417
+ /** GET /v5/earn/pwm/query-fund-transfer-result */
418
+ export interface PwmFundTransferRecordV5 {
419
+ transferId: string;
420
+ status: string;
421
+ fromUserId: number;
422
+ toUserId: number;
423
+ amount: string;
424
+ coin: string;
425
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=v5-earn-pwm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v5-earn-pwm.js","sourceRoot":"","sources":["../../../src/types/response/v5-earn-pwm.ts"],"names":[],"mappings":""}
@@ -22,6 +22,10 @@ export interface EarnOrderHistoryV5 {
22
22
  estimateRedeemTime: string;
23
23
  estimateStakeTime: string;
24
24
  }
25
+ export interface EarnPositionFreezeDetailV5 {
26
+ amount: string;
27
+ description: string;
28
+ }
25
29
  export interface EarnPositionV5 {
26
30
  coin: string;
27
31
  productId: string;
@@ -36,6 +40,9 @@ export interface EarnPositionV5 {
36
40
  estimateInterestCalculationTime?: string;
37
41
  settlementTime?: string;
38
42
  autoReinvest?: string;
43
+ /** Redeemable amount */
44
+ availableAmount: string;
45
+ freezeDetails: EarnPositionFreezeDetailV5[];
39
46
  }
40
47
  export interface EarnYieldHistoryV5 {
41
48
  productId: string;
@@ -154,3 +161,34 @@ export interface AdvanceEarnAdvanceProductInfoV5 {
154
161
  category: string;
155
162
  list: AdvanceEarnAdvanceProductListItemV5[];
156
163
  }
164
+ /** GET /v5/earn/hold-to-earn/product — Hold to Earn airdrop products */
165
+ export type HoldToEarnAirdropProductStatusV5 = 'NotStarted' | 'Online' | 'Ended';
166
+ export interface HoldToEarnAirdropProductYieldV5 {
167
+ coinName: string;
168
+ /** Yesterday's APR for display, e.g. "10%", "0%" */
169
+ apy: string;
170
+ }
171
+ export interface HoldToEarnAirdropProductV5 {
172
+ coinName: string;
173
+ yields: HoldToEarnAirdropProductYieldV5[];
174
+ status: HoldToEarnAirdropProductStatusV5;
175
+ announcementUrl: string;
176
+ /** Yesterday's avg APR across yield coins */
177
+ apy: string;
178
+ }
179
+ export interface HoldToEarnAirdropProductsResultV5 {
180
+ products: HoldToEarnAirdropProductV5[];
181
+ }
182
+ /** GET /v5/earn/hold-to-earn/yield-history */
183
+ export interface HoldToEarnAirdropDailyPnlV5 {
184
+ coinName: string;
185
+ yieldCoinName: string;
186
+ effectiveAmount: string;
187
+ pnl: string;
188
+ apy: string;
189
+ createdAt: number;
190
+ }
191
+ export interface HoldToEarnAirdropYieldHistoryResultV5 {
192
+ nextCursor: string;
193
+ airdropDailyPnls: HoldToEarnAirdropDailyPnlV5[];
194
+ }
@@ -1,4 +1,4 @@
1
- import { CategoryCursorListV5, CategoryV5, ContractTypeV5, CopyTradingV5, InstrumentStatusV5, MarginTradingV5, OptionTypeV5, OrderSideV5 } from '../shared-v5';
1
+ import { CategoryCursorListV5, CategoryV5, ContractTypeV5, CopyTradingV5, InstrumentStatusV5, InstrumentSymbolTypeV5, MarginTradingV5, OptionTypeV5, OrderSideV5 } from '../shared-v5';
2
2
  /**
3
3
  * OHLCVT candle used by v5 APIs
4
4
  *
@@ -30,15 +30,15 @@ export type OHLCVKlineV5 = [
30
30
  */
31
31
  export type OHLCKlineV5 = [string, string, string, string, string];
32
32
  export interface LinearInverseInstrumentInfoV5 {
33
+ /** The ID of the symbol name. */
34
+ symbolId: number;
33
35
  symbol: string;
34
36
  contractType: ContractTypeV5;
35
37
  status: InstrumentStatusV5;
36
38
  baseCoin: string;
37
39
  quoteCoin: string;
38
- /**
39
- * Region / product class for the pair. For `category=linear`, includes e.g. `stock`, `forex`, `commodity`, `xstocks` (per Bybit; new values may be added).
40
- */
41
- symbolType: string;
40
+ /** Region / product class for the pair (`stock`, `forex`, `commodity`, `xstocks`, etc.). */
41
+ symbolType: InstrumentSymbolTypeV5;
42
42
  launchTime: string;
43
43
  deliveryTime?: string;
44
44
  deliveryFeeRate?: string;
@@ -89,16 +89,15 @@ export interface LinearInverseInstrumentInfoV5 {
89
89
  displayName: string;
90
90
  }
91
91
  export interface OptionInstrumentInfoV5 {
92
+ /** The ID of the symbol name. */
93
+ symbolId: number;
92
94
  symbol: string;
93
95
  optionsType: OptionTypeV5;
94
96
  status: InstrumentStatusV5;
95
97
  baseCoin: string;
96
98
  quoteCoin: string;
97
99
  settleCoin: string;
98
- /**
99
- * Region / product class for the pair (see Bybit instruments docs; new values may be added).
100
- */
101
- symbolType: string;
100
+ symbolType: InstrumentSymbolTypeV5;
102
101
  launchTime: string;
103
102
  deliveryTime: string;
104
103
  deliveryFeeRate: string;
@@ -115,6 +114,8 @@ export interface OptionInstrumentInfoV5 {
115
114
  displayName: string;
116
115
  }
117
116
  export interface SpotInstrumentInfoV5 {
117
+ /** The ID of the symbol name. */
118
+ symbolId: number;
118
119
  symbol: string;
119
120
  baseCoin: string;
120
121
  quoteCoin: string;
@@ -123,10 +124,7 @@ export interface SpotInstrumentInfoV5 {
123
124
  * `stock_qty = token_qty * multiplier`. Default `"1"`.
124
125
  */
125
126
  xstockMultiplier?: string;
126
- /**
127
- * Region / product class (see Bybit instruments docs; linear category also uses values such as `stock`, `forex`).
128
- */
129
- symbolType: string;
127
+ symbolType: InstrumentSymbolTypeV5;
130
128
  innovation: '0' | '1';
131
129
  status: InstrumentStatusV5;
132
130
  marginTrading: MarginTradingV5;
@@ -37,10 +37,8 @@ export interface PositionV5 {
37
37
  leverageSysUpdatedTime: string | '';
38
38
  createdTime: string;
39
39
  updatedTime: string;
40
- /**
41
- * Position open timestamp (ms), default 0. Documented as testnet-only in some API versions.
42
- */
43
- openTime?: number;
40
+ /** Position open timestamp (ms). Default `0` when not set. */
41
+ openTime: number;
44
42
  positionIMByMp: string;
45
43
  positionMMByMp: string;
46
44
  seq: number;
@@ -0,0 +1,96 @@
1
+ import { OrderSideV5, PositionIdx, PovModeV5, StrategyCategoryV5, StrategyPreferV5, StrategyTypeV5 } from '../shared-v5';
2
+ export interface CreateStrategyOrderResultV5 {
3
+ strategyId: string;
4
+ /** null when creation succeeded */
5
+ result: string | null;
6
+ }
7
+ export interface StopStrategyResultV5 {
8
+ strategyId: string;
9
+ }
10
+ export interface StrategyListItemV5 {
11
+ strategyId: string;
12
+ category: StrategyCategoryV5;
13
+ symbol: string;
14
+ side: OrderSideV5;
15
+ size: string;
16
+ strategyType: StrategyTypeV5;
17
+ /** 2: running, 3: terminated, 4: terminated unfilled, 5: paused, 6: untriggered */
18
+ status: 2 | 3 | 4 | 5 | 6;
19
+ executedSize: string;
20
+ executedAvgPrice: string;
21
+ executedStartTimeE3: string;
22
+ executedEndTimeE3: string;
23
+ createdTimeE3: string;
24
+ updatedTimeE3: string;
25
+ reduceOnly: boolean;
26
+ triggerPrice: string;
27
+ isTriggered: boolean;
28
+ leverageType: 0 | 1;
29
+ terminateType: number;
30
+ terminateRemark: string;
31
+ triggerCount: string;
32
+ tradingCount: string;
33
+ realizedPnl: string;
34
+ strategyName: string;
35
+ strategyPrefer: StrategyPreferV5 | string;
36
+ duration: number;
37
+ executedDuration: number;
38
+ isRandom: boolean;
39
+ interval: number;
40
+ limitPrice: string;
41
+ chasePercentE4: string;
42
+ chaseDistance: string;
43
+ maxChasePrice: string;
44
+ chaseOrderPrice: string;
45
+ chasePrice: string;
46
+ postOnly: number;
47
+ isRebalance: boolean;
48
+ orderType: string;
49
+ orderPriceOffset: string;
50
+ strategySl: string;
51
+ strategyTp: string;
52
+ arbitrageOrders: unknown[];
53
+ positionValue: string;
54
+ filledPositionValue: string;
55
+ /** POV only */
56
+ mode?: PovModeV5 | string;
57
+ participationRate?: string;
58
+ referenceWindow?: string;
59
+ depthReference?: string;
60
+ }
61
+ export interface StrategyListResultV5 {
62
+ list: StrategyListItemV5[];
63
+ nextCursor: string;
64
+ prevCursor: string;
65
+ }
66
+ export interface StrategyOrderListItemV5 {
67
+ strategyId: string;
68
+ orderId: string;
69
+ symbol: string;
70
+ side: OrderSideV5;
71
+ size: string;
72
+ price: string;
73
+ /** 2: created, 3: create failed, 4: partially filled, 5: fully filled, 6: rejected, 7: canceled */
74
+ status: string;
75
+ executedSize: string;
76
+ dealTimeE3: string;
77
+ parentOrderId: string;
78
+ createdTimeE3: string;
79
+ updatedTimeE3: string;
80
+ code: number;
81
+ msg: string;
82
+ category: StrategyCategoryV5;
83
+ positionIdx: PositionIdx;
84
+ leverageType: 0 | 1;
85
+ tpPrice: string;
86
+ slPrice: string;
87
+ orderType: string;
88
+ orderPriceOffset: string;
89
+ positionValue: string;
90
+ filledPositionValue: string;
91
+ }
92
+ export interface StrategyOrderListResultV5 {
93
+ list: StrategyOrderListItemV5[];
94
+ nextCursor: string;
95
+ prevCursor: string;
96
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=v5-strategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v5-strategy.js","sourceRoot":"","sources":["../../../src/types/response/v5-strategy.ts"],"names":[],"mappings":""}