binance: update stream order fields

This commit is contained in:
c9s 2022-04-27 14:43:39 +08:00
parent ce6fd387be
commit 1f736d1f5e
No known key found for this signature in database
GPG Key ID: F0A7E4490F2EBC8C

View File

@ -113,13 +113,17 @@ func (e *ExecutionReportEvent) Order() (*types.Order, error) {
orderCreationTime := time.Unix(0, e.OrderCreationTime*int64(time.Millisecond))
return &types.Order{
SubmitOrder: types.SubmitOrder{
Symbol: e.Symbol,
ClientOrderID: e.ClientOrderID,
Symbol: e.Symbol,
Side: toGlobalSideType(binance.SideType(e.Side)),
Type: toGlobalOrderType(binance.OrderType(e.OrderType)),
Quantity: e.OrderQuantity,
Price: e.OrderPrice,
StopPrice: e.StopPrice,
TimeInForce: types.TimeInForce(e.TimeInForce),
IsFutures: false,
ReduceOnly: false,
ClosePosition: false,
},
Exchange: types.ExchangeBinance,
IsWorking: e.IsOnBook,