Merge pull request #294 from tiagosiebler/typefix2

v3.7.5: fix() optional properties in AccountOrderV5 response interface
This commit is contained in:
Tiago
2023-11-01 10:24:16 +00:00
committed by GitHub
3 changed files with 24 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "bybit-api", "name": "bybit-api",
"version": "3.7.4", "version": "3.7.5",
"description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.", "description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
"main": "lib/index.js", "main": "lib/index.js",
"types": "lib/index.d.ts", "types": "lib/index.d.ts",

View File

@@ -18,43 +18,43 @@ export interface OrderResultV5 {
export interface AccountOrderV5 { export interface AccountOrderV5 {
orderId: string; orderId: string;
orderLinkId?: string; orderLinkId: string;
blockTradeId?: string; blockTradeId: string;
symbol: string; symbol: string;
price: string; price: string;
qty: string; qty: string;
side: OrderSideV5; side: OrderSideV5;
isLeverage?: string; isLeverage: string;
positionIdx?: PositionIdx; positionIdx: PositionIdx;
orderStatus: OrderStatusV5; orderStatus: OrderStatusV5;
cancelType?: OrderCancelTypeV5; cancelType: OrderCancelTypeV5;
rejectReason?: OrderRejectReasonV5; rejectReason: OrderRejectReasonV5;
avgPrice: string; avgPrice: string;
leavesQty: string; leavesQty: string;
leavesValue: string; leavesValue: string;
cumExecQty: string; cumExecQty: string;
cumExecValue: string; cumExecValue: string;
cumExecFee: string; cumExecFee: string;
timeInForce?: OrderTimeInForceV5; timeInForce: OrderTimeInForceV5;
orderType?: OrderTypeV5; orderType: OrderTypeV5;
stopOrderType?: StopOrderTypeV5; stopOrderType: StopOrderTypeV5;
orderIv?: string; orderIv: string;
triggerPrice?: string; triggerPrice: string;
takeProfit?: string; takeProfit: string;
stopLoss?: string; stopLoss: string;
tpslMode: 'Full' | 'Partial' | ''; tpslMode: 'Full' | 'Partial' | '';
tpLimitPrice: string; tpLimitPrice: string;
slLimitPrice: string; slLimitPrice: string;
tpTriggerBy?: OrderTriggerByV5; tpTriggerBy: OrderTriggerByV5;
slTriggerBy?: OrderTriggerByV5; slTriggerBy: OrderTriggerByV5;
triggerDirection?: number; triggerDirection: number;
triggerBy?: OrderTriggerByV5; triggerBy: OrderTriggerByV5;
lastPriceOnCreated?: string; lastPriceOnCreated: string;
reduceOnly?: boolean; reduceOnly: boolean;
closeOnTrigger?: boolean; closeOnTrigger: boolean;
placeType: 'iv' | 'price' | ''; placeType: 'iv' | 'price' | '';
smpType: string; smpType: string;
smpGroup: string; smpGroup: number;
smpOrderId: string; smpOrderId: string;
createdTime: string; createdTime: string;
updatedTime: string; updatedTime: string;

View File

@@ -45,7 +45,8 @@ export type OrderCancelTypeV5 =
| 'CancelAllBeforeAdl' | 'CancelAllBeforeAdl'
| 'CancelByAdmin' | 'CancelByAdmin'
| 'CancelByTpSlTsClear' | 'CancelByTpSlTsClear'
| 'CancelByPzSideCh'; | 'CancelByPzSideCh'
| 'UNKNOWN';
export type OrderRejectReasonV5 = export type OrderRejectReasonV5 =
| 'EC_NoError' | 'EC_NoError'