bybit-api 4.7.5 → 4.7.7

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 (46) hide show
  1. package/README.md +88 -12
  2. package/lib/rest-client-v5.d.ts +71 -1
  3. package/lib/rest-client-v5.js +90 -0
  4. package/lib/rest-client-v5.js.map +1 -1
  5. package/lib/types/request/index.d.ts +1 -0
  6. package/lib/types/request/index.js +1 -0
  7. package/lib/types/request/index.js.map +1 -1
  8. package/lib/types/request/v5-asset.d.ts +2 -0
  9. package/lib/types/request/v5-broker.d.ts +1 -1
  10. package/lib/types/request/v5-earn-liquidity-mining.d.ts +6 -0
  11. package/lib/types/request/v5-event.d.ts +59 -0
  12. package/lib/types/request/v5-event.js +3 -0
  13. package/lib/types/request/v5-event.js.map +1 -0
  14. package/lib/types/request/v5-market.d.ts +1 -0
  15. package/lib/types/request/v5-trade.d.ts +1 -0
  16. package/lib/types/response/index.d.ts +1 -0
  17. package/lib/types/response/index.js +1 -0
  18. package/lib/types/response/index.js.map +1 -1
  19. package/lib/types/response/v5-account.d.ts +1 -0
  20. package/lib/types/response/v5-asset.d.ts +3 -0
  21. package/lib/types/response/v5-broker.d.ts +2 -1
  22. package/lib/types/response/v5-earn-liquidity-mining.d.ts +4 -0
  23. package/lib/types/response/v5-event.d.ts +208 -0
  24. package/lib/types/response/v5-event.js +3 -0
  25. package/lib/types/response/v5-event.js.map +1 -0
  26. package/lib/types/response/v5-market.d.ts +4 -0
  27. package/lib/types/response/v5-position.d.ts +1 -0
  28. package/lib/types/response/v5-user.d.ts +1 -0
  29. package/lib/types/shared-v5.d.ts +7 -3
  30. package/lib/types/websockets/ws-events.d.ts +107 -0
  31. package/lib/types/websockets/ws-general.d.ts +18 -1
  32. package/lib/util/BaseRestClient.js +3 -1
  33. package/lib/util/BaseRestClient.js.map +1 -1
  34. package/lib/util/BaseWSClient.js +10 -4
  35. package/lib/util/BaseWSClient.js.map +1 -1
  36. package/lib/util/requestUtils.d.ts +8 -2
  37. package/lib/util/requestUtils.js +6 -2
  38. package/lib/util/requestUtils.js.map +1 -1
  39. package/lib/util/websockets/websocket-util.d.ts +5 -4
  40. package/lib/util/websockets/websocket-util.js +39 -32
  41. package/lib/util/websockets/websocket-util.js.map +1 -1
  42. package/lib/websocket-client.d.ts +6 -6
  43. package/lib/websocket-client.js +3 -3
  44. package/lib/websocket-client.js.map +1 -1
  45. package/llms.txt +13771 -13005
  46. package/package.json +1 -1
@@ -21,6 +21,7 @@ export * from './v5-earn-fixed-term';
21
21
  export * from './v5-earn-liquidity-mining';
22
22
  export * from './v5-earn-pwm';
23
23
  export * from './v5-earn-token';
24
+ export * from './v5-event';
24
25
  export * from './v5-market';
25
26
  export * from './v5-p2p-trading';
26
27
  export * from './v5-position';
@@ -37,6 +37,7 @@ __exportStar(require("./v5-earn-fixed-term"), exports);
37
37
  __exportStar(require("./v5-earn-liquidity-mining"), exports);
38
38
  __exportStar(require("./v5-earn-pwm"), exports);
39
39
  __exportStar(require("./v5-earn-token"), exports);
40
+ __exportStar(require("./v5-event"), exports);
40
41
  __exportStar(require("./v5-market"), exports);
41
42
  __exportStar(require("./v5-p2p-trading"), exports);
42
43
  __exportStar(require("./v5-position"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/request/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,6CAA2B;AAC3B,iDAA+B;AAC/B,4CAA0B;AAC1B,2CAAyB;AACzB,mDAAiC;AACjC,iDAA+B;AAC/B,8CAA4B;AAC5B,gDAA8B;AAC9B,+CAA6B;AAC7B,gDAA8B;AAC9B,wDAAsC;AACtC,mDAAiC;AACjC,6CAA2B;AAC3B,8CAA4B;AAC5B,4CAA0B;AAC1B,mDAAiC;AACjC,4CAA0B;AAC1B,6DAA2C;AAC3C,uDAAqC;AACrC,6DAA2C;AAC3C,gDAA8B;AAC9B,kDAAgC;AAChC,8CAA4B;AAC5B,mDAAiC;AACjC,gDAA8B;AAC9B,mDAAiC;AACjC,2CAAyB;AACzB,2CAAyB;AACzB,2DAAyC;AACzC,8CAA4B;AAC5B,qDAAmC;AACnC,gDAA8B;AAC9B,6CAA2B;AAC3B,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/request/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,6CAA2B;AAC3B,iDAA+B;AAC/B,4CAA0B;AAC1B,2CAAyB;AACzB,mDAAiC;AACjC,iDAA+B;AAC/B,8CAA4B;AAC5B,gDAA8B;AAC9B,+CAA6B;AAC7B,gDAA8B;AAC9B,wDAAsC;AACtC,mDAAiC;AACjC,6CAA2B;AAC3B,8CAA4B;AAC5B,4CAA0B;AAC1B,mDAAiC;AACjC,4CAA0B;AAC1B,6DAA2C;AAC3C,uDAAqC;AACrC,6DAA2C;AAC3C,gDAA8B;AAC9B,kDAAgC;AAChC,6CAA2B;AAC3B,8CAA4B;AAC5B,mDAAiC;AACjC,gDAA8B;AAC9B,mDAAiC;AACjC,2CAAyB;AACzB,2CAAyB;AACzB,2DAAyC;AACzC,8CAA4B;AAC5B,qDAAmC;AACnC,gDAA8B;AAC9B,6CAA2B;AAC3B,4CAA0B"}
@@ -68,6 +68,8 @@ export interface GetUniversalTransferRecordsParamsV5 {
68
68
  endTime?: number;
69
69
  limit?: number;
70
70
  cursor?: string;
71
+ fromMemberId?: string;
72
+ toMemberId?: string;
71
73
  }
72
74
  export interface GetAllowedDepositCoinInfoParamsV5 {
73
75
  coin?: string;
@@ -1,5 +1,5 @@
1
1
  export interface GetExchangeBrokerEarningsParamsV5 {
2
- bizType?: 'SPOT' | 'DERIVATIVES' | 'OPTIONS' | 'CONVERT';
2
+ bizType?: 'SPOT' | 'DERIVATIVES' | 'OPTIONS' | 'CONVERT' | 'FIAT_CONVERT';
3
3
  begin?: string;
4
4
  end?: string;
5
5
  uid?: string;
@@ -5,3 +5,9 @@ export interface GetLiquidityMiningProductParamsV5 {
5
5
  baseCoin?: string;
6
6
  quoteCoin?: string;
7
7
  }
8
+ export interface ReinvestLiquidityMiningParamsV5 {
9
+ productId: string;
10
+ orderLinkId: string;
11
+ positionId: string;
12
+ leverage?: string;
13
+ }
@@ -0,0 +1,59 @@
1
+ export interface GetEventInstrumentsInfoParamsV5 {
2
+ symbol?: string;
3
+ status?: 'PreLaunch' | 'Trading' | 'Delivering' | 'Closed';
4
+ limit?: number;
5
+ cursor?: string;
6
+ }
7
+ export interface GetEventOrderbookParamsV5 {
8
+ symbol: string;
9
+ }
10
+ export interface GetEventOrderHistoryParamsV5 {
11
+ symbol?: string;
12
+ orderId?: string;
13
+ orderLinkId?: string;
14
+ startTime?: number;
15
+ endTime?: number;
16
+ limit?: number;
17
+ cursor?: string;
18
+ }
19
+ export interface GetEventActiveOrdersParamsV5 {
20
+ symbol?: string;
21
+ orderId?: string;
22
+ orderLinkId?: string;
23
+ limit?: number;
24
+ cursor?: string;
25
+ }
26
+ export interface GetEventPositionInfoParamsV5 {
27
+ symbol?: string;
28
+ baseCoin?: string;
29
+ settleCoin?: string;
30
+ limit?: number;
31
+ cursor?: string;
32
+ }
33
+ export interface GetEventTradeHistoryParamsV5 {
34
+ symbol: string;
35
+ orderId?: string;
36
+ orderLinkId?: string;
37
+ startTime?: number;
38
+ endTime?: number;
39
+ limit?: number;
40
+ cursor?: string;
41
+ }
42
+ export interface GetEventSettlementRecordsParamsV5 {
43
+ symbol: string;
44
+ orderId?: string;
45
+ startTime?: number;
46
+ endTime?: number;
47
+ limit?: number;
48
+ cursor?: string;
49
+ }
50
+ export interface SubmitEventQuoteParamsV5 {
51
+ symbol: string;
52
+ orderLinkId: string;
53
+ grossPayoutRatio: string;
54
+ amount: string;
55
+ }
56
+ export interface CancelEventQuoteParamsV5 {
57
+ orderLinkId?: string;
58
+ orderId?: string;
59
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=v5-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v5-event.js","sourceRoot":"","sources":["../../../src/types/request/v5-event.ts"],"names":[],"mappings":""}
@@ -44,6 +44,7 @@ export interface GetInstrumentsInfoParamsV5 {
44
44
  /** Filter by instrument `symbolType` (e.g. `commodity`, `stock`, `forex` for linear). */
45
45
  symbolType?: InstrumentSymbolTypeV5;
46
46
  status?: InstrumentStatusV5;
47
+ /** For `category=option`, pass `All` to return all option symbols. */
47
48
  baseCoin?: string;
48
49
  limit?: number;
49
50
  cursor?: string;
@@ -33,6 +33,7 @@ export interface OrderParamsV5 {
33
33
  slOrderType?: OrderTypeV5;
34
34
  bboSideType?: 'Queue' | 'Counterparty';
35
35
  bboLevel?: '1' | '2' | '3' | '4' | '5';
36
+ /** Limit IOC/FOK is supported when this is true. */
36
37
  rpiTakerAccess?: boolean;
37
38
  }
38
39
  export interface AmendOrderParamsV5 {
@@ -18,6 +18,7 @@ export * from './v5-earn-fixed-term';
18
18
  export * from './v5-earn-liquidity-mining';
19
19
  export * from './v5-earn-pwm';
20
20
  export * from './v5-earn-token';
21
+ export * from './v5-event';
21
22
  export * from './v5-market';
22
23
  export * from './v5-p2p-trading';
23
24
  export * from './v5-position';
@@ -34,6 +34,7 @@ __exportStar(require("./v5-earn-fixed-term"), exports);
34
34
  __exportStar(require("./v5-earn-liquidity-mining"), exports);
35
35
  __exportStar(require("./v5-earn-pwm"), exports);
36
36
  __exportStar(require("./v5-earn-token"), exports);
37
+ __exportStar(require("./v5-event"), exports);
37
38
  __exportStar(require("./v5-market"), exports);
38
39
  __exportStar(require("./v5-p2p-trading"), exports);
39
40
  __exportStar(require("./v5-position"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/response/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,6CAA2B;AAC3B,2CAAyB;AACzB,yCAAuB;AACvB,mDAAiC;AACjC,8CAA4B;AAC5B,+CAA6B;AAC7B,gDAA8B;AAC9B,wDAAsC;AACtC,mDAAiC;AACjC,6CAA2B;AAC3B,8CAA4B;AAC5B,4CAA0B;AAC1B,mDAAiC;AACjC,4CAA0B;AAC1B,6DAA2C;AAC3C,uDAAqC;AACrC,6DAA2C;AAC3C,gDAA8B;AAC9B,kDAAgC;AAChC,8CAA4B;AAC5B,mDAAiC;AACjC,gDAA8B;AAC9B,kDAAgC;AAChC,2CAAyB;AACzB,2CAAyB;AACzB,2DAAyC;AACzC,8CAA4B;AAC5B,qDAAmC;AACnC,gDAA8B;AAC9B,6CAA2B;AAC3B,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/response/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,6CAA2B;AAC3B,2CAAyB;AACzB,yCAAuB;AACvB,mDAAiC;AACjC,8CAA4B;AAC5B,+CAA6B;AAC7B,gDAA8B;AAC9B,wDAAsC;AACtC,mDAAiC;AACjC,6CAA2B;AAC3B,8CAA4B;AAC5B,4CAA0B;AAC1B,mDAAiC;AACjC,4CAA0B;AAC1B,6DAA2C;AAC3C,uDAAqC;AACrC,6DAA2C;AAC3C,gDAA8B;AAC9B,kDAAgC;AAChC,6CAA2B;AAC3B,8CAA4B;AAC5B,mDAAiC;AACjC,gDAA8B;AAC9B,kDAAgC;AAChC,2CAAyB;AACzB,2CAAyB;AACzB,2DAAyC;AACzC,8CAA4B;AAC5B,qDAAmC;AACnC,gDAA8B;AAC9B,6CAA2B;AAC3B,4CAA0B"}
@@ -82,6 +82,7 @@ export interface FeeRateV5 {
82
82
  baseCoin: string;
83
83
  takerFeeRate: string;
84
84
  makerFeeRate: string;
85
+ rpiMakerFeeRate?: string;
85
86
  }
86
87
  export interface AccountInfoV5 {
87
88
  unifiedMarginStatus: number;
@@ -82,6 +82,8 @@ export interface UniversalTransferRecordV5 {
82
82
  toAccountType: AccountTypeV5;
83
83
  timestamp: string;
84
84
  status: string;
85
+ withdrawReqId?: string;
86
+ depositReqId?: string;
85
87
  }
86
88
  export interface AllowedDepositCoinInfoV5 {
87
89
  coin: string;
@@ -324,6 +326,7 @@ export interface FundingAccountTransactionRecordV5 {
324
326
  showBusiTypeEn: string;
325
327
  description: string;
326
328
  descriptionEn: string;
329
+ currcCursor?: string;
327
330
  }
328
331
  /** When accountType=Alpha and category is farm, under `coinDetail` in sub-categories. */
329
332
  export interface AssetOverviewCoinExtMapV5 {
@@ -1,6 +1,6 @@
1
1
  interface EarningDetailV5 {
2
2
  userId: string;
3
- bizType: 'SPOT' | 'DERIVATIVES' | 'OPTIONS' | 'CONVERT';
3
+ bizType: 'SPOT' | 'DERIVATIVES' | 'OPTIONS' | 'CONVERT' | 'FIAT_CONVERT';
4
4
  symbol: string;
5
5
  coin: string;
6
6
  earning: string;
@@ -19,6 +19,7 @@ export interface ExchangeBrokerEarningResultV5 {
19
19
  derivatives: TotalEarningCategoryV5[];
20
20
  options: TotalEarningCategoryV5[];
21
21
  convert: TotalEarningCategoryV5[];
22
+ fiatConvert?: TotalEarningCategoryV5[];
22
23
  total: TotalEarningCategoryV5[];
23
24
  };
24
25
  details: EarningDetailV5[];
@@ -29,3 +29,7 @@ export interface LiquidityMiningProductV5 {
29
29
  export interface LiquidityMiningProductResultV5 {
30
30
  products: LiquidityMiningProductV5[];
31
31
  }
32
+ export interface ReinvestLiquidityMiningResultV5 {
33
+ orderId: string;
34
+ orderLinkId: string;
35
+ }
@@ -0,0 +1,208 @@
1
+ export type EventContractTypeV5 = 'Up_Down' | 'UpDown' | 'Target' | 'Range';
2
+ export type EventContractDirectionV5 = 'UP' | 'DOWN' | 'ABOVE' | 'BELOW' | 'RANGE_IN' | 'RANGE_OUT';
3
+ export interface EventInstrumentFeeRateRuleV5 {
4
+ minSecToDelivery: number;
5
+ maxSecToDelivery: number;
6
+ baseMarkup: string;
7
+ }
8
+ export interface EventInstrumentQuotationLimitV5 {
9
+ minSecToDelivery: number;
10
+ maxSecToDelivery: number;
11
+ quoteMaxAmountPerUser: string;
12
+ quoteMinAmountPerUser: string;
13
+ quoteMinAmount: string;
14
+ }
15
+ export interface EventInstrumentLotSizeFilterV5 {
16
+ minOrderAmount: string;
17
+ maxOrderAmount: string;
18
+ orderAmountTickSize: string;
19
+ quoteMaxValidMs: number;
20
+ quoteMinIntervalPerUserMs: number;
21
+ }
22
+ export interface EventInstrumentInfoV5 {
23
+ symbol: string;
24
+ symbolId: number;
25
+ baseCoin: string;
26
+ quoteCoin: string;
27
+ settleCoin: string;
28
+ eventContractType: EventContractTypeV5 | string;
29
+ durationWindow: string | number;
30
+ rvThreshold: string;
31
+ rebate: string;
32
+ takerFeeRate: string;
33
+ makerFeeRate: string;
34
+ launchTime: string;
35
+ deliveryTime: string;
36
+ status: string;
37
+ targetPrice: string;
38
+ lowerBound: string;
39
+ upperBound: string;
40
+ callOptionSymbolId: number;
41
+ putOptionSymbolId: number;
42
+ feeRateRule: EventInstrumentFeeRateRuleV5[];
43
+ lotSizeFilter: EventInstrumentLotSizeFilterV5;
44
+ quotationLimit: EventInstrumentQuotationLimitV5[];
45
+ }
46
+ export interface EventInstrumentInfoResultV5 {
47
+ nextPageCursor: string;
48
+ list: EventInstrumentInfoV5[];
49
+ }
50
+ /** REST Get Orderbook: each entry is [payoutRatio, orderValue] */
51
+ export type EventOrderbookLevelV5 = [string, string];
52
+ export interface EventOrderbookV5 {
53
+ s: string;
54
+ r: EventOrderbookLevelV5[];
55
+ ts: number;
56
+ u: number;
57
+ seq: number;
58
+ cts: number;
59
+ }
60
+ export interface EventOrderHistoryItemV5 {
61
+ orderId: string;
62
+ orderLinkId: string;
63
+ orderStatus: string;
64
+ symbol: string;
65
+ symbolId: string;
66
+ baseCoin: string;
67
+ quoteCoin: string;
68
+ settleCoin: string;
69
+ ecDirection: EventContractDirectionV5 | string;
70
+ ecDurationWindow: string;
71
+ ecTargetPrice: string;
72
+ ecContractType: EventContractTypeV5 | string;
73
+ ecLowerBound: string;
74
+ ecUpperBound: string;
75
+ settleTimeMs: string;
76
+ ecOrderValue: string;
77
+ ecIndexPrice: string;
78
+ orderAvgPayoutRatio: string;
79
+ cumExecValue: string;
80
+ payoutRatio: string;
81
+ tradeFee: string;
82
+ transTime: string;
83
+ createTime: string;
84
+ updateTime: string;
85
+ cumPayout: string;
86
+ cumExecFee: string;
87
+ cancelType: string;
88
+ createType: string;
89
+ rejectReason: string;
90
+ extraFees: string;
91
+ }
92
+ export interface EventOrderHistoryResultV5 {
93
+ list: EventOrderHistoryItemV5[];
94
+ cursor: string;
95
+ }
96
+ export interface EventActiveOrderV5 {
97
+ orderId: string;
98
+ orderLinkId: string;
99
+ symbol: string;
100
+ symbolId: string;
101
+ side: string;
102
+ orderStatus: string;
103
+ payoutRatio: string;
104
+ cumExecValue: string;
105
+ cumExecFee: string;
106
+ leavesValue: string;
107
+ ecContractType: EventContractTypeV5 | string;
108
+ ecDirection: EventContractDirectionV5 | string;
109
+ ecOrderValue: string;
110
+ ecSettleTime: string;
111
+ ecTargetPrice: string;
112
+ ecLowerBound: string;
113
+ ecUpperBound: string;
114
+ ecDurationWindow: string;
115
+ ecIndexPrice: string;
116
+ orderAvgPayoutRatio: string;
117
+ createType: string;
118
+ createdTime: string;
119
+ updatedTime: string;
120
+ }
121
+ export interface EventActiveOrdersResultV5 {
122
+ list: EventActiveOrderV5[];
123
+ nextPageCursor: string;
124
+ }
125
+ export interface EventPositionV5 {
126
+ symbol: string;
127
+ baseCoin: string;
128
+ settleCoin: string;
129
+ side: string;
130
+ ecContractType: EventContractTypeV5 | string;
131
+ ecDirection: EventContractDirectionV5 | string;
132
+ avgPayoutRatio: string;
133
+ positionValue: string;
134
+ ecSettleTime: string;
135
+ cumClosedPnl: string;
136
+ createdTime: string;
137
+ updatedTime: string;
138
+ seq: number;
139
+ }
140
+ export interface EventPositionInfoResultV5 {
141
+ list: EventPositionV5[];
142
+ nextPageCursor: string;
143
+ }
144
+ export interface EventTradeV5 {
145
+ orderId: string;
146
+ orderLinkId: string;
147
+ execId: string;
148
+ symbol: string;
149
+ baseCoin: string;
150
+ settleCoin: string;
151
+ side: string;
152
+ execType: string;
153
+ execPrice: string;
154
+ execValue: string;
155
+ execFee: string;
156
+ execFeeRate: string;
157
+ orderPrice: string;
158
+ feeCoin: string;
159
+ transTime: string;
160
+ timeInForce: string;
161
+ crossSeq: string;
162
+ ecPayout: string;
163
+ ecDurationWindow: string;
164
+ settleTimeMs: string;
165
+ ecOrderValue: string;
166
+ ecContractType: EventContractTypeV5 | string;
167
+ ecDirection: EventContractDirectionV5 | string;
168
+ ecTargetPrice: string;
169
+ ecLowerBound: string;
170
+ ecUpperBound: string;
171
+ extraFees: string;
172
+ }
173
+ export interface EventTradeHistoryResultV5 {
174
+ list: EventTradeV5[];
175
+ cursor: string;
176
+ }
177
+ export interface EventSettlementV5 {
178
+ transId: string;
179
+ symbol: string;
180
+ symbolId: string;
181
+ baseCoin: string;
182
+ settleCoin: string;
183
+ side: string;
184
+ ecContractType: EventContractTypeV5 | string;
185
+ ecDirection: EventContractDirectionV5 | string;
186
+ settlePrice: string;
187
+ entryPrice: string;
188
+ grossPayoutRatio: string;
189
+ ecDurationWindow: string;
190
+ ecTargetPrice: string;
191
+ ecLowerBound: string;
192
+ ecUpperBound: string;
193
+ transTime: string;
194
+ crossSeq: string;
195
+ execFee: string;
196
+ execFeeRate: string;
197
+ payout: string;
198
+ sessionRpl: string;
199
+ orderId: string;
200
+ }
201
+ export interface EventSettlementRecordsResultV5 {
202
+ list: EventSettlementV5[];
203
+ cursor: string;
204
+ }
205
+ export interface EventQuoteResultV5 {
206
+ orderLinkId: string;
207
+ orderId: string;
208
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=v5-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v5-event.js","sourceRoot":"","sources":["../../../src/types/response/v5-event.ts"],"names":[],"mappings":""}
@@ -87,6 +87,9 @@ export interface LinearInverseInstrumentInfoV5 {
87
87
  } | null;
88
88
  skipCallAuction?: boolean;
89
89
  displayName: string;
90
+ fullName?: string;
91
+ marketRegion?: string;
92
+ underlyingTicker?: string;
90
93
  }
91
94
  export interface OptionInstrumentInfoV5 {
92
95
  /** The ID of the symbol name. */
@@ -391,6 +394,7 @@ export interface FeeGroupLevelV5 {
391
394
  takerFeeRate: string;
392
395
  makerFeeRate: string;
393
396
  makerRebate: string;
397
+ rpiMakerRebate?: string;
394
398
  }
395
399
  export interface FeeGroupRatesV5 {
396
400
  pro: FeeGroupLevelV5[];
@@ -52,6 +52,7 @@ export interface PositionV5 {
52
52
  positionIMByMp: string;
53
53
  positionMMByMp: string;
54
54
  seq: number;
55
+ netDeltaRatio?: string;
55
56
  }
56
57
  export interface SetRiskLimitResultV5 {
57
58
  category: CategoryV5;
@@ -68,6 +68,7 @@ export interface ApiKeyInfoV5 {
68
68
  parentUid: string;
69
69
  kycLevel: 'LEVEL_DEFAULT' | 'LEVEL_1' | 'LEVEL_2';
70
70
  kycRegion: string;
71
+ isFixApi?: boolean;
71
72
  }
72
73
  export interface UpdateApiKeyResultV5 {
73
74
  id: string;
@@ -1,7 +1,9 @@
1
1
  export type CategoryV5 = 'spot' | 'linear' | 'inverse' | 'option';
2
+ /** Public WS subscribe/routing category. Event Contract uses `'event'`; REST `CategoryV5` does not. */
3
+ export type WSCategoryV5 = CategoryV5 | 'event';
2
4
  export type ContractTypeV5 = 'InversePerpetual' | 'LinearPerpetual' | 'InverseFutures';
3
5
  export type CopyTradingV5 = 'none' | 'both' | 'utaOnly' | 'normalOnly';
4
- export type InstrumentStatusV5 = 'PreLaunch' | 'Trading' | 'Settling' | 'Delivering' | 'Closed';
6
+ export type InstrumentStatusV5 = 'PreLaunch' | 'PendingOpen' | 'Trading' | 'Settling' | 'Delivering' | 'Closed';
5
7
  /**
6
8
  * Region / product class returned as `symbolType` on instruments-info (and account instruments-info).
7
9
  * For `category=linear`, includes e.g. `stock`, `forex`, `commodity`, `xstocks`. Spot may return `''`.
@@ -111,7 +113,7 @@ export type TPSLModeV5 = 'Full' | 'Partial';
111
113
  export type AccountMarginModeV5 = 'ISOLATED_MARGIN' | 'REGULAR_MARGIN' | 'PORTFOLIO_MARGIN';
112
114
  export type UnifiedUpdateStatusV5 = 'FAIL' | 'PROCESS' | 'SUCCESS';
113
115
  export type AccountTypeV5 = 'CONTRACT' | 'SPOT' | 'INVESTMENT' | 'OPTION' | 'UNIFIED' | 'FUND' | 'EARN';
114
- export type TransactionTypeV5 = 'TRANSFER_IN' | 'TRANSFER_OUT' | 'TRADE' | 'SETTLEMENT' | 'DELIVERY' | 'LIQUIDATION' | 'ADL' | 'AIRDROP' | 'BONUS_RECOLLECT' | 'BONUS_RECOLLECT' | 'FEE_REFUND' | 'INTEREST' | 'CURRENCY_BUY' | 'CURRENCY_SELL' | 'BORROWED_AMOUNT_INS_LOAN' | 'PRINCIPLE_REPAYMENT_INS_LOAN' | 'INTEREST_REPAYMENT_INS_LOAN' | 'AUTO_SOLD_COLLATERAL_INS_LOAN' | 'AUTO_BUY_LIABILITY_INS_LOAN' | 'AUTO_PRINCIPLE_REPAYMENT_INS_LOAN' | 'AUTO_INTEREST_REPAYMENT_INS_LOAN' | 'TRANSFER_IN_INS_LOAN' | 'TRANSFER_OUT_INS_LOAN' | 'SPOT_REPAYMENT_SELL' | 'SPOT_REPAYMENT_BUY' | 'TOKENS_SUBSCRIPTION' | 'TOKENS_REDEMPTION' | 'AUTO_DEDUCTION' | 'FLEXIBLE_STAKING_SUBSCRIPTION' | 'FLEXIBLE_STAKING_REDEMPTION' | 'FIXED_STAKING_SUBSCRIPTION' | 'BORROWED_AMOUNT_INS_LOAN' | 'PRINCIPLE_REPAYMENT_INS_LOAN' | 'INTEREST_REPAYMENT_INS_LOAN' | 'AUTO_SOLD_COLLATERAL_INS_LOAN' | 'AUTO_BUY_LIABILITY_INS_LOAN' | 'AUTO_PRINCIPLE_REPAYMENT_INS_LOAN' | 'AUTO_INTEREST_REPAYMENT_INS_LOAN' | 'TRANSFER_IN_INS_LOAN' | 'TRANSFER_OUT_INS_LOAN' | 'SPOT_REPAYMENT_SELL' | 'SPOT_REPAYMENT_BUY' | 'TOKENS_SUBSCRIPTION' | 'TOKENS_REDEMPTION' | 'AUTO_DEDUCTION' | 'FLEXIBLE_STAKING_SUBSCRIPTION' | 'FLEXIBLE_STAKING_REDEMPTION' | 'FIXED_STAKING_SUBSCRIPTION' | 'FLEXIBLE_STAKING_REFUND' | 'FIXED_STAKING_REFUND' | 'PREMARKET_TRANSFER_OUT' | 'PREMARKET_DELIVERY_SELL_NEW_COIN' | 'PREMARKET_DELIVERY_BUY_NEW_COIN' | 'PREMARKET_DELIVERY_PLEDGE_PAY_SELLER' | 'PREMARKET_DELIVERY_PLEDGE_BACK' | 'PREMARKET_ROLLBACK_PLEDGE_BACK' | 'PREMARKET_ROLLBACK_PLEDGE_PENALTY_TO_BUYER' | 'CUSTODY_NETWORK_FEE' | 'CUSTODY_SETTLE_FEE' | 'CUSTODY_LOCK' | 'CUSTODY_UNLOCK' | 'CUSTODY_UNLOCK_REFUND' | 'LOANS_BORROW_FUNDS' | 'LOANS_PLEDGE_ASSET' | 'BONUS_TRANSFER_IN' | 'BONUS_TRANSFER_OUT' | 'PEF_TRANSFER_IN' | 'PEF_TRANSFER_OUT' | 'PEF_PROFIT_SHARE' | 'ONCHAINEARN_SUBSCRIPTION' | 'ONCHAINEARN_REDEMPTION' | 'ONCHAINEARN_REFUND' | 'STRUCTURE_PRODUCT_SUBSCRIPTION' | 'STRUCTURE_PRODUCT_REFUND' | 'CLASSIC_WEALTH_MANAGEMENT_SUBSCRIPTION' | 'PREMIMUM_WEALTH_MANAGEMENT_SUBSCRIPTION' | 'PREMIMUM_WEALTH_MANAGEMENT_REFUND' | 'LIQUIDITY_MINING_SUBSCRIPTION' | 'LIQUIDITY_MINING_REFUND' | 'PWM_SUBSCRIPTION' | 'PWM_REFUND' | 'DEFI_INVESTMENT_SUBSCRIPTION' | 'DEFI_INVESTMENT_REFUND' | 'DEFI_INVESTMENT_REDEMPTION' | 'INSTITUTION_LOAN_IN' | 'INSTITUTION_PAYBACK_PRINCIPAL_OUT' | 'INSTITUTION_PAYBACK_INTEREST_OUT' | 'INSTITUTION_EXCHANGE_SELL' | 'INSTITUTION_EXCHANGE_BUY' | 'INSTITUTION_LIQ_PRINCIPAL_OUT' | 'INSTITUTION_LIQ_INTEREST_OUT' | 'INSTITUTION_LOAN_TRANSFER_IN' | 'INSTITUTION_LOAN_TRANSFER_OUT' | 'INSTITUTION_LOAN_WITHOUT_WITHDRAW' | 'INSTITUTION_LOAN_RESERVE_IN' | 'INSTITUTION_LOAN_RESERVE_OUT' | 'PLATFORM_TOKEN_MNT_LIQRECALLEDMMNT' | 'PLATFORM_TOKEN_MNT_LIQRETURNEDMNT' | 'DIVIDEND_SETTLEMENT';
116
+ export type TransactionTypeV5 = 'TRANSFER_IN' | 'TRANSFER_OUT' | 'TRADE' | 'SETTLEMENT' | 'DELIVERY' | 'LIQUIDATION' | 'ADL' | 'AIRDROP' | 'BONUS_RECOLLECT' | 'BONUS_RECOLLECT' | 'FEE_REFUND' | 'INTEREST' | 'CURRENCY_BUY' | 'CURRENCY_SELL' | 'BORROWED_AMOUNT_INS_LOAN' | 'PRINCIPLE_REPAYMENT_INS_LOAN' | 'INTEREST_REPAYMENT_INS_LOAN' | 'AUTO_SOLD_COLLATERAL_INS_LOAN' | 'AUTO_BUY_LIABILITY_INS_LOAN' | 'AUTO_PRINCIPLE_REPAYMENT_INS_LOAN' | 'AUTO_INTEREST_REPAYMENT_INS_LOAN' | 'TRANSFER_IN_INS_LOAN' | 'TRANSFER_OUT_INS_LOAN' | 'SPOT_REPAYMENT_SELL' | 'SPOT_REPAYMENT_BUY' | 'TOKENS_SUBSCRIPTION' | 'TOKENS_REDEMPTION' | 'AUTO_DEDUCTION' | 'FLEXIBLE_STAKING_SUBSCRIPTION' | 'FLEXIBLE_STAKING_REDEMPTION' | 'FIXED_STAKING_SUBSCRIPTION' | 'BORROWED_AMOUNT_INS_LOAN' | 'PRINCIPLE_REPAYMENT_INS_LOAN' | 'INTEREST_REPAYMENT_INS_LOAN' | 'AUTO_SOLD_COLLATERAL_INS_LOAN' | 'AUTO_BUY_LIABILITY_INS_LOAN' | 'AUTO_PRINCIPLE_REPAYMENT_INS_LOAN' | 'AUTO_INTEREST_REPAYMENT_INS_LOAN' | 'TRANSFER_IN_INS_LOAN' | 'TRANSFER_OUT_INS_LOAN' | 'SPOT_REPAYMENT_SELL' | 'SPOT_REPAYMENT_BUY' | 'TOKENS_SUBSCRIPTION' | 'TOKENS_REDEMPTION' | 'AUTO_DEDUCTION' | 'FLEXIBLE_STAKING_SUBSCRIPTION' | 'FLEXIBLE_STAKING_REDEMPTION' | 'FIXED_STAKING_SUBSCRIPTION' | 'FLEXIBLE_STAKING_REFUND' | 'FIXED_STAKING_REFUND' | 'PREMARKET_TRANSFER_OUT' | 'PREMARKET_DELIVERY_SELL_NEW_COIN' | 'PREMARKET_DELIVERY_BUY_NEW_COIN' | 'PREMARKET_DELIVERY_PLEDGE_PAY_SELLER' | 'PREMARKET_DELIVERY_PLEDGE_BACK' | 'PREMARKET_ROLLBACK_PLEDGE_BACK' | 'PREMARKET_ROLLBACK_PLEDGE_PENALTY_TO_BUYER' | 'CUSTODY_NETWORK_FEE' | 'CUSTODY_SETTLE_FEE' | 'CUSTODY_LOCK' | 'CUSTODY_UNLOCK' | 'CUSTODY_UNLOCK_REFUND' | 'LOANS_BORROW_FUNDS' | 'LOANS_PLEDGE_ASSET' | 'BONUS_TRANSFER_IN' | 'BONUS_TRANSFER_OUT' | 'PEF_TRANSFER_IN' | 'PEF_TRANSFER_OUT' | 'PEF_PROFIT_SHARE' | 'ONCHAINEARN_SUBSCRIPTION' | 'ONCHAINEARN_REDEMPTION' | 'ONCHAINEARN_REFUND' | 'STRUCTURE_PRODUCT_SUBSCRIPTION' | 'STRUCTURE_PRODUCT_REFUND' | 'CLASSIC_WEALTH_MANAGEMENT_SUBSCRIPTION' | 'PREMIMUM_WEALTH_MANAGEMENT_SUBSCRIPTION' | 'PREMIMUM_WEALTH_MANAGEMENT_REFUND' | 'LIQUIDITY_MINING_SUBSCRIPTION' | 'LIQUIDITY_MINING_REFUND' | 'PWM_SUBSCRIPTION' | 'PWM_REFUND' | 'DEFI_INVESTMENT_SUBSCRIPTION' | 'DEFI_INVESTMENT_REFUND' | 'DEFI_INVESTMENT_REDEMPTION' | 'INSTITUTION_LOAN_IN' | 'INSTITUTION_PAYBACK_PRINCIPAL_OUT' | 'INSTITUTION_PAYBACK_INTEREST_OUT' | 'INSTITUTION_EXCHANGE_SELL' | 'INSTITUTION_EXCHANGE_BUY' | 'INSTITUTION_LIQ_PRINCIPAL_OUT' | 'INSTITUTION_LIQ_INTEREST_OUT' | 'INSTITUTION_LOAN_TRANSFER_IN' | 'INSTITUTION_LOAN_TRANSFER_OUT' | 'INSTITUTION_LOAN_WITHOUT_WITHDRAW' | 'INSTITUTION_LOAN_RESERVE_IN' | 'INSTITUTION_LOAN_RESERVE_OUT' | 'PLATFORM_TOKEN_MNT_LIQRECALLEDMMNT' | 'PLATFORM_TOKEN_MNT_LIQRETURNEDMNT' | 'DIVIDEND_SETTLEMENT' | 'FORWARD_SPLIT_SETTLE' | 'REVERSE_SPLIT_SETTLE';
115
117
  export type PermissionTypeV5 = 'ContractTrade' | 'Spot' | 'Wallet' | 'Options' | 'Derivatives' | 'Exchange' | 'NFT';
116
118
  /**
117
119
  * Leveraged token status:
@@ -131,7 +133,9 @@ export type LTOrderTypeV5 = '1' | '2';
131
133
  * Leveraged token order status: '1': completed, '2': in progress, '3': failed
132
134
  */
133
135
  export type LTOrderStatusV5 = '1' | '2' | '3';
134
- export type ExecTypeV5 = 'Trade' | 'AdlTrade' | 'Funding' | 'BustTrade' | 'Settle' | 'BlockTrade' | 'MovePosition' | 'CorporateAction' | 'UNKNOWN';
136
+ export type ExecTypeV5 = 'Trade' | 'AdlTrade' | 'Funding' | 'BustTrade' | 'Settle' | 'BlockTrade' | 'MovePosition'
137
+ /** @deprecated Removed from Bybit execType; kept for older payloads. */
138
+ | 'CorporateAction' | 'ForwardSplitSettle' | 'ReverseSplitSettle' | 'Dividend' | 'UNKNOWN';
135
139
  /**
136
140
  * Withdraw type. 0(default): on chain. 1: off chain. 2: all.
137
141
  */
@@ -62,6 +62,22 @@ export interface WSTradeV5 {
62
62
  iv?: string;
63
63
  }
64
64
  export type WSTradeEventV5 = WSPublicTopicEventV5<string, 'snapshot', WSTradeV5[]>;
65
+ export interface WSEventOrderbookV5 {
66
+ s: string;
67
+ r: [string, string][];
68
+ u: number;
69
+ seq: number;
70
+ }
71
+ export type WSEventOrderbookEventV5 = WSPublicTopicEventV5<string, 'delta' | 'snapshot', WSEventOrderbookV5>;
72
+ export interface WSEventPublicTradeV5 {
73
+ T: number;
74
+ s: string;
75
+ r: string;
76
+ a: string;
77
+ i: string;
78
+ seq: number;
79
+ }
80
+ export type WSEventPublicTradeEventV5 = WSPublicTopicEventV5<string, 'snapshot', WSEventPublicTradeV5[]>;
65
81
  /**
66
82
  * WSTickerV5 is the data structure for the "linear" ticker channel
67
83
  * */
@@ -204,8 +220,25 @@ export interface WSPositionV5 {
204
220
  /** Position open timestamp (ms). Default `0` when not set. */
205
221
  openTime: number;
206
222
  seq: number;
223
+ netDeltaRatio?: string;
207
224
  }
208
225
  export type WSPositionEventV5 = WSPrivateTopicEventV5<'position', WSPositionV5[]>;
226
+ export interface WSEventPositionV5 {
227
+ symbol: string;
228
+ baseCoin: string;
229
+ settleCoin: string;
230
+ side: string;
231
+ ecContractType: string;
232
+ ecDirection: string;
233
+ avgPayoutRatio: string;
234
+ positionValue: string;
235
+ ecSettleTime: string;
236
+ cumClosedPnl: string;
237
+ createdTime: string;
238
+ updatedTime: string;
239
+ seq: number;
240
+ }
241
+ export type WSEventPositionEventV5 = WSPrivateTopicEventV5<'position.event', WSEventPositionV5[]>;
209
242
  export interface WSAccountOrderV5 {
210
243
  category: CategoryV5;
211
244
  orderId: string;
@@ -260,6 +293,41 @@ export interface WSAccountOrderV5 {
260
293
  rpiMatchedQty?: string;
261
294
  }
262
295
  export type WSAccountOrderEventV5 = WSPrivateTopicEventV5<'order', WSAccountOrderV5[]>;
296
+ export interface WSEventOrderV5 {
297
+ category: 'event' | string;
298
+ orderId: string;
299
+ orderLinkId: string;
300
+ symbol: string;
301
+ symbolId: number;
302
+ side: string;
303
+ baseCoin: string;
304
+ quoteCoin: string;
305
+ settleCoin: string;
306
+ orderStatus: string;
307
+ ecContractType: string;
308
+ ecDirection: string;
309
+ ecDurationWindow: number;
310
+ ecTargetPrice: string;
311
+ ecLowerBound: string;
312
+ ecUpperBound: string;
313
+ ecOrderValue: string;
314
+ ecIndexPrice: string;
315
+ ecSettleTime: string;
316
+ payoutRatio: string;
317
+ orderAvgPayoutRatio: string;
318
+ cumExecValue: string;
319
+ cumExecFee: string;
320
+ leavesValue: string;
321
+ cumPayout: string;
322
+ createType: number;
323
+ cancelType: string;
324
+ rejectReason: string;
325
+ extraFees: unknown[];
326
+ transTime: string;
327
+ createdTime: string;
328
+ updatedTime: string;
329
+ }
330
+ export type WSEventOrderEventV5 = WSPrivateTopicEventV5<'order' | 'order.event', WSEventOrderV5[]>;
263
331
  export interface WSExecutionV5 {
264
332
  category: CategoryV5;
265
333
  symbol: string;
@@ -296,6 +364,45 @@ export interface WSExecutionV5 {
296
364
  marketUnit: string;
297
365
  }
298
366
  export type WSExecutionEventV5 = WSPrivateTopicEventV5<'execution', WSExecutionV5[]>;
367
+ export interface WSEventExecutionV5 {
368
+ category: 'event' | string;
369
+ transId: string;
370
+ execId: string;
371
+ orderId: string;
372
+ orderLinkId: string;
373
+ symbol: string;
374
+ symbolId: number;
375
+ baseCoin: string;
376
+ quoteCoin: string;
377
+ settleCoin: string;
378
+ side: string;
379
+ feeCoin: string;
380
+ execType: string;
381
+ execPrice: string;
382
+ execValue: string;
383
+ execFee: string;
384
+ execFeeRate: string;
385
+ orderPrice: string;
386
+ ecContractType: number | string;
387
+ ecDirection: number | string;
388
+ ecDurationWindow: number;
389
+ ecTargetPrice: string;
390
+ ecLowerBound: string;
391
+ ecUpperBound: string;
392
+ ecOrderValue: string;
393
+ ecIndexPrice?: string;
394
+ ecPayout: string;
395
+ entryPrice: string;
396
+ settlePrice: string;
397
+ grossPayoutRatio: string;
398
+ sessionRpl: string;
399
+ transTime: string;
400
+ settleTimeMs: string;
401
+ crossSeq: string;
402
+ timeInForce: string;
403
+ extraFees: unknown[];
404
+ }
405
+ export type WSEventExecutionEventV5 = WSPrivateTopicEventV5<'execution' | 'execution.event', WSEventExecutionV5[]>;
299
406
  export interface WSExecutionFastV5 {
300
407
  category: CategoryV5;
301
408
  symbol: string;