mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
binance: fix parse type
This commit is contained in:
parent
d0e26c66e4
commit
734221028b
|
@ -731,13 +731,13 @@ func (e *OrderTradeUpdateEvent) TradeFutures() (*types.Trade, error) {
|
||||||
Symbol: e.OrderTrade.Symbol,
|
Symbol: e.OrderTrade.Symbol,
|
||||||
OrderID: uint64(e.OrderTrade.OrderId),
|
OrderID: uint64(e.OrderTrade.OrderId),
|
||||||
Side: toGlobalSideType(binance.SideType(e.OrderTrade.Side)),
|
Side: toGlobalSideType(binance.SideType(e.OrderTrade.Side)),
|
||||||
Price: util.MustParseFloat(e.OrderTrade.LastFilledPrice),
|
Price: float64(e.OrderTrade.LastFilledPrice),
|
||||||
Quantity: util.MustParseFloat(e.OrderTrade.OrderLastFilledQuantity),
|
Quantity: float64(e.OrderTrade.OrderLastFilledQuantity),
|
||||||
QuoteQuantity: util.MustParseFloat(e.OrderTrade.OrderFilledAccumulatedQuantity),
|
QuoteQuantity: float64(e.OrderTrade.OrderFilledAccumulatedQuantity),
|
||||||
IsBuyer: e.OrderTrade.Side == "BUY",
|
IsBuyer: e.OrderTrade.Side == "BUY",
|
||||||
IsMaker: e.OrderTrade.IsMaker,
|
IsMaker: e.OrderTrade.IsMaker,
|
||||||
Time: types.Time(tt),
|
Time: types.Time(tt),
|
||||||
Fee: util.MustParseFloat(e.OrderTrade.CommissionAmount),
|
Fee: float64(e.OrderTrade.CommissionAmount),
|
||||||
FeeCurrency: e.OrderTrade.CommissionAsset,
|
FeeCurrency: e.OrderTrade.CommissionAsset,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user