Skip to content

Commit e65b182

Browse files
authored
feat(websocket): Extend execution report types (#263)
1 parent 341bbb6 commit e65b182

File tree

2 files changed

+32
-25
lines changed

2 files changed

+32
-25
lines changed

index.d.ts

+29-25
Original file line numberDiff line numberDiff line change
@@ -597,32 +597,36 @@ declare module 'binance-api-node' {
597597
}
598598

599599
export interface ExecutionReport {
600-
symbol: string;
601-
newClientOrderId: string;
602-
originalClientOrderId: string;
603-
side: OrderSide;
604-
orderType: OrderType;
605-
timeInForce: TimeInForce;
606-
quantity: string;
607-
price: string;
608-
executionType: ExecutionType;
609-
stopPrice: string;
610-
icebergQuantity: string;
611-
orderStatus: OrderStatus;
612-
orderRejectReason: OrderRejectReason;
613-
orderId: number;
614-
orderTime: number;
615-
lastTradeQuantity: string;
616-
totalTradeQuantity: string;
617-
priceLastTrade: string;
618-
commission: string;
619-
commissionAsset: string;
620-
tradeId: number;
621-
isOrderWorking: boolean;
622-
isBuyerMaker: boolean;
623-
totalQuoteTradeQuantity: string;
624-
eventType: 'executionReport';
600+
commission: string; // Commission amount
601+
commissionAsset: string | null; // Commission asset
602+
creationTime: number; // Order creation time
625603
eventTime: number;
604+
eventType: 'executionReport';
605+
executionType: ExecutionType; // Current execution type
606+
icebergQuantity: string; // Iceberg quantity
607+
isBuyerMaker: boolean; // Is this trade the maker side?
608+
isOrderWorking: boolean; // Is the order on the book?
609+
lastQuoteTransactedQuantity: string; // Last quote asset transacted quantity (i.e. lastPrice * lastQty);
610+
lastTradeQuantity: string; // Last executed quantity
611+
newClientOrderId: string; // Client order ID
612+
orderId: number; // Order ID
613+
orderListId: number; // OrderListId
614+
orderRejectReason: OrderRejectReason; // Order reject reason; will be an error code.
615+
orderStatus: OrderStatus; // Current order status
616+
orderTime: number; // Transaction time
617+
orderType: OrderType; // Order type
618+
originalClientOrderId: string | null; // Original client order ID; This is the ID of the order being canceled
619+
price: string; // Order price
620+
priceLastTrade: string; // Last executed price
621+
quantity: string; // Order quantity
622+
quoteOrderQuantity: string // Quote Order Qty
623+
side: OrderSide; // Side
624+
stopPrice: string; // Stop price
625+
symbol: string; // Symbol
626+
timeInForce: TimeInForce; // Time in force
627+
totalQuoteTradeQuantity: string; // Cumulative quote asset transacted quantity
628+
totalTradeQuantity: string; // Cumulative filled quantity
629+
tradeId: number; // Trade ID
626630
}
627631

628632
export interface TradeResult {

src/websocket.js

+3
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ const userTransforms = {
306306
isBuyerMaker: m.m,
307307
creationTime: m.O,
308308
totalQuoteTradeQuantity: m.Z,
309+
orderListId: m.g,
310+
quoteOrderQuantity: m.Q,
311+
lastQuoteTransactedQuantity: m.Y,
309312
}),
310313
}
311314

0 commit comments

Comments
 (0)