bybit-api 4.1.1 → 4.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -231,6 +231,7 @@ export interface PublicTradeV5 {
231
231
  side: OrderSideV5;
232
232
  time: string;
233
233
  isBlockTrade: boolean;
234
+ isRPITrade: boolean;
234
235
  mP?: string;
235
236
  iP?: string;
236
237
  mIv?: string;
@@ -6,7 +6,7 @@ export type MarginTradingV5 = 'none' | 'both' | 'utaOnly' | 'normalSpotOnly';
6
6
  export type OrderFilterV5 = 'Order' | 'tpslOrder' | 'StopOrder';
7
7
  export type OrderSideV5 = 'Buy' | 'Sell';
8
8
  export type OrderTypeV5 = 'Market' | 'Limit';
9
- export type OrderTimeInForceV5 = 'GTC' | 'IOC' | 'FOK' | 'PostOnly';
9
+ export type OrderTimeInForceV5 = 'GTC' | 'IOC' | 'FOK' | 'PostOnly' | 'RPI';
10
10
  export type OrderTriggerByV5 = 'LastPrice' | 'IndexPrice' | 'MarkPrice';
11
11
  export type OCOTriggerTypeV5 = 'OcoTriggerByUnknown' | 'OcoTriggerTp' | 'OcoTriggerBySl';
12
12
  export type OrderSMPTypeV5 = 'None' | 'CancelMaker' | 'CancelTaker' | 'CancelBoth';
@@ -45,6 +45,74 @@ export interface WSOrderbookV5 {
45
45
  seq: number;
46
46
  }
47
47
  export type WSOrderbookEventV5 = WSPublicTopicEventV5<string, 'delta' | 'snapshot', WSOrderbookV5>;
48
+ export interface WSTradeV5 {
49
+ T: number;
50
+ s: string;
51
+ S: OrderSideV5;
52
+ v: string;
53
+ p: string;
54
+ L?: string;
55
+ i: string;
56
+ BT: boolean;
57
+ RPI?: boolean;
58
+ mP?: string;
59
+ iP?: string;
60
+ mIv?: string;
61
+ iv?: string;
62
+ }
63
+ export type WSTradeEventV5 = WSPublicTopicEventV5<string, 'snapshot', WSTradeV5[]>;
64
+ export interface WSTickerV5 {
65
+ symbol: string;
66
+ tickDirection: string;
67
+ price24hPcnt: string;
68
+ lastPrice: string;
69
+ prevPrice24h: string;
70
+ highPrice24h: string;
71
+ lowPrice24h: string;
72
+ prevPrice1h: string;
73
+ markPrice: string;
74
+ indexPrice: string;
75
+ openInterest: string;
76
+ openInterestValue: string;
77
+ turnover24h: string;
78
+ volume24h: string;
79
+ nextFundingTime: string;
80
+ fundingRate: string;
81
+ bid1Price: string;
82
+ bid1Size: string;
83
+ ask1Price: string;
84
+ ask1Size: string;
85
+ deliveryTime?: string;
86
+ basisRate?: string;
87
+ deliveryFeeRate?: string;
88
+ predictedDeliveryPrice?: string;
89
+ preOpenPrice?: string;
90
+ preQty?: string;
91
+ curPreListingPhase?: string;
92
+ }
93
+ export type WSTickerEventV5 = WSPublicTopicEventV5<string, 'snapshot' | 'delta', WSTickerV5>;
94
+ export interface WSKlineV5 {
95
+ start: number;
96
+ end: number;
97
+ interval: string;
98
+ open: string;
99
+ close: string;
100
+ high: string;
101
+ low: string;
102
+ volume: string;
103
+ turnover: string;
104
+ confirm: boolean;
105
+ timestamp: number;
106
+ }
107
+ export type WSKlineEventV5 = WSPublicTopicEventV5<string, 'snapshot', WSKlineV5[]>;
108
+ export interface WSLiquidationV5 {
109
+ T: number;
110
+ s: string;
111
+ S: OrderSideV5;
112
+ v: string;
113
+ p: string;
114
+ }
115
+ export type WSLiquidationEventV5 = WSPublicTopicEventV5<string, 'snapshot', WSLiquidationV5[]>;
48
116
  export interface WSPositionV5 {
49
117
  category: string;
50
118
  symbol: string;
@@ -170,3 +238,61 @@ export interface WSExecutionV5 {
170
238
  marketUnit: string;
171
239
  }
172
240
  export type WSExecutionEventV5 = WSPrivateTopicEventV5<'execution', WSExecutionV5[]>;
241
+ export interface WSExecutionFastV5 {
242
+ category: CategoryV5;
243
+ symbol: string;
244
+ execId: string;
245
+ execPrice: string;
246
+ execQty: string;
247
+ orderId: string;
248
+ isMaker: boolean;
249
+ orderLinkId: string;
250
+ side: OrderSideV5;
251
+ execTime: string;
252
+ seq: number;
253
+ }
254
+ export type WSExecutionFastEventV5 = WSPrivateTopicEventV5<'execution.fast', WSExecutionFastV5[]>;
255
+ export interface WSCoinV5 {
256
+ coin: string;
257
+ equity: string;
258
+ usdValue: string;
259
+ walletBalance: string;
260
+ free?: string;
261
+ locked: string;
262
+ spotHedgingQty: string;
263
+ borrowAmount: string;
264
+ availableToBorrow: string;
265
+ availableToWithdraw: string;
266
+ accruedInterest: string;
267
+ totalOrderIM: string;
268
+ totalPositionIM: string;
269
+ totalPositionMM: string;
270
+ unrealisedPnl: string;
271
+ cumRealisedPnl: string;
272
+ bonus: string;
273
+ collateralSwitch: boolean;
274
+ marginCollateral: boolean;
275
+ }
276
+ export interface WSWalletV5 {
277
+ accountType: string;
278
+ accountLTV: string;
279
+ accountIMRate: string;
280
+ accountMMRate: string;
281
+ totalEquity: string;
282
+ totalWalletBalance: string;
283
+ totalMarginBalance: string;
284
+ totalAvailableBalance: string;
285
+ totalPerpUPL: string;
286
+ totalInitialMargin: string;
287
+ totalMaintenanceMargin: string;
288
+ coin: WSCoinV5[];
289
+ }
290
+ export type WSWalletEventV5 = WSPrivateTopicEventV5<'wallet', WSWalletV5[]>;
291
+ export interface WSGreeksV5 {
292
+ baseCoin: string;
293
+ totalDelta: string;
294
+ totalGamma: string;
295
+ totalVega: string;
296
+ totalTheta: string;
297
+ }
298
+ export type WSGreeksEventV5 = WSPrivateTopicEventV5<'greeks', WSGreeksV5[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bybit-api",
3
- "version": "4.1.1",
3
+ "version": "4.1.2",
4
4
  "description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",