bybit-api 3.7.6 → 3.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.
@@ -3,3 +3,4 @@ export * from './request';
3
3
  export * from './shared';
4
4
  export * from './v5-shared';
5
5
  export * from './websockets';
6
+ export * from './websocket.events';
@@ -15,4 +15,5 @@ __exportStar(require("./request"), exports);
15
15
  __exportStar(require("./shared"), exports);
16
16
  __exportStar(require("./v5-shared"), exports);
17
17
  __exportStar(require("./websockets"), exports);
18
+ __exportStar(require("./websocket.events"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,2CAAyB;AACzB,8CAA4B;AAC5B,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,2CAAyB;AACzB,8CAA4B;AAC5B,+CAA6B;AAC7B,qDAAmC"}
@@ -8,7 +8,7 @@ export interface OrderParamsV5 {
8
8
  qty: string;
9
9
  price?: string;
10
10
  triggerDirection?: 1 | 2;
11
- orderFilter?: 'Order' | 'tpslOrder';
11
+ orderFilter?: OrderFilterV5;
12
12
  triggerPrice?: string;
13
13
  triggerBy?: OrderTriggerByV5;
14
14
  orderIv?: string;
@@ -41,6 +41,7 @@ export interface ApiKeyInfoV5 {
41
41
  vipLevel?: string;
42
42
  mktMakerLevel?: string;
43
43
  affiliateID?: number;
44
+ isMaster: boolean;
44
45
  }
45
46
  export interface UpdateApiKeyResultV5 {
46
47
  id: string;
@@ -1,11 +1,12 @@
1
1
  export declare type CategoryV5 = 'spot' | 'linear' | 'inverse' | 'option';
2
2
  export declare type ContractTypeV5 = 'InversePerpetual' | 'LinearPerpetual' | 'InverseFutures';
3
3
  export declare type InstrumentStatusV5 = 'PreLaunch' | 'Trading' | 'Settling' | 'Delivering' | 'Closed';
4
- export declare type OrderFilterV5 = 'Order' | 'tpslOrder';
4
+ export declare type OrderFilterV5 = 'Order' | 'tpslOrder' | 'StopOrder';
5
5
  export declare type OrderSideV5 = 'Buy' | 'Sell';
6
6
  export declare type OrderTypeV5 = 'Market' | 'Limit';
7
7
  export declare type OrderTimeInForceV5 = 'GTC' | 'IOC' | 'FOK' | 'PostOnly';
8
8
  export declare type OrderTriggerByV5 = 'LastPrice' | 'IndexPrice' | 'MarkPrice';
9
+ export declare type OCOTriggerTypeV5 = 'OcoTriggerByUnknown' | 'OcoTriggerTp' | 'OcoTriggerBySl';
9
10
  export declare type OrderSMPTypeV5 = 'None' | 'CancelMaker' | 'CancelTaker' | 'CancelBoth';
10
11
  export declare type OrderStatusV5 = 'Created' | 'New' | 'Rejected' | 'PartiallyFilled' | 'PartiallyFilledCanceled' | 'Filled' | 'Cancelled' | 'Untriggered' | 'Triggered' | 'Deactivated' | 'Active';
11
12
  export declare type OrderCancelTypeV5 = 'CancelByUser' | 'CancelByReduceOnly' | 'CancelByPrepareLiq' | 'CancelAllBeforeLiq' | 'CancelByPrepareAdl' | 'CancelAllBeforeAdl' | 'CancelByAdmin' | 'CancelByTpSlTsClear' | 'CancelByPzSideCh' | 'UNKNOWN';
@@ -0,0 +1,55 @@
1
+ import { CategoryV5, OCOTriggerTypeV5, OrderRejectReasonV5, OrderSMPTypeV5, OrderSideV5, OrderStatusV5, OrderTimeInForceV5, OrderTriggerByV5, OrderTypeV5, StopOrderTypeV5, TPSLModeV5 } from './v5-shared';
2
+ import { WsKey } from './websockets';
3
+ export interface WSAccountOrderV5 {
4
+ qty: string;
5
+ price: string;
6
+ symbol: string;
7
+ orderId: string;
8
+ orderIv: string;
9
+ stopLoss: string;
10
+ smpGroup: number;
11
+ side: OrderSideV5;
12
+ placeType: string;
13
+ avgPrice?: string;
14
+ leavesQty?: string;
15
+ isLeverage: string;
16
+ cancelType: string;
17
+ cumExecQty: string;
18
+ cumExecFee: string;
19
+ smpOrderId: string;
20
+ takeProfit: string;
21
+ reduceOnly: boolean;
22
+ orderLinkId: string;
23
+ positionIdx: number;
24
+ tpTriggerBy: string;
25
+ slTriggerBy: string;
26
+ createdTime: string;
27
+ updatedTime: string;
28
+ feeCurrency: string;
29
+ triggerPrice: string;
30
+ category: CategoryV5;
31
+ cumExecValue: string;
32
+ blockTradeId: string;
33
+ leavesValue?: string;
34
+ slLimitPrice?: string;
35
+ tpLimitPrice?: string;
36
+ tpslMode?: TPSLModeV5;
37
+ orderType: OrderTypeV5;
38
+ smpType: OrderSMPTypeV5;
39
+ closeOnTrigger: boolean;
40
+ triggerDirection: number;
41
+ orderStatus: OrderStatusV5;
42
+ lastPriceOnCreated: string;
43
+ triggerBy: OrderTriggerByV5;
44
+ stopOrderType: StopOrderTypeV5;
45
+ timeInForce: OrderTimeInForceV5;
46
+ ocoTriggerType?: OCOTriggerTypeV5;
47
+ rejectReason?: OrderRejectReasonV5;
48
+ }
49
+ export interface WSAccountOrderEventV5 {
50
+ id: string;
51
+ wsKey: WsKey;
52
+ topic: 'order';
53
+ creationTime: number;
54
+ data: WSAccountOrderV5[];
55
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=websocket.events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"websocket.events.js","sourceRoot":"","sources":["../../src/types/websocket.events.ts"],"names":[],"mappings":""}
@@ -12,7 +12,7 @@ export declare type WsPrivateSpotTopic = 'outboundAccountInfo' | 'executionRepor
12
12
  export declare type WsPrivateTopic = WsPrivateInverseTopic | WsPrivateUSDTPerpTopic | WsPrivateSpotTopic | string;
13
13
  export declare type WsTopic = WsPublicTopics | WsPrivateTopic;
14
14
  /** This is used to differentiate between each of the available websocket streams (as bybit has multiple websockets) */
15
- export declare type WsKey = typeof WS_KEY_MAP[keyof typeof WS_KEY_MAP];
15
+ export declare type WsKey = (typeof WS_KEY_MAP)[keyof typeof WS_KEY_MAP];
16
16
  export interface WSClientConfigurableOptions {
17
17
  key?: string;
18
18
  secret?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bybit-api",
3
- "version": "3.7.6",
3
+ "version": "3.7.7",
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",