mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
parse QuoteQuantity
This commit is contained in:
parent
409332a56c
commit
887400eb83
|
@ -15,8 +15,8 @@ import (
|
|||
executionReport
|
||||
|
||||
{
|
||||
"e": "executionReport", // KLineEvent type
|
||||
"E": 1499405658658, // KLineEvent time
|
||||
"e": "executionReport", // Event type
|
||||
"E": 1499405658658, // Event time
|
||||
"s": "ETHBTC", // Symbol
|
||||
"c": "mUvoqJxFIILMdfAW5iGSOW", // Client order ID
|
||||
"S": "BUY", // Side
|
||||
|
@ -79,6 +79,7 @@ type ExecutionReportEvent struct {
|
|||
LastExecutedQuantity string `json:"l"`
|
||||
CumulativeFilledQuantity string `json:"z"`
|
||||
LastExecutedPrice string `json:"L"`
|
||||
LastQuoteAssetTransactedQuantity string `json:"Y"`
|
||||
|
||||
OrderCreationTime int `json:"O"`
|
||||
}
|
||||
|
@ -94,6 +95,7 @@ func (e *ExecutionReportEvent) Trade() (*types.Trade, error) {
|
|||
Symbol: e.Symbol,
|
||||
Price: util.MustParseFloat(e.LastExecutedPrice),
|
||||
Quantity: util.MustParseFloat(e.LastExecutedQuantity),
|
||||
QuoteQuantity: util.MustParseFloat(e.LastQuoteAssetTransactedQuantity),
|
||||
Side: e.Side,
|
||||
IsBuyer: e.Side == "BUY",
|
||||
IsMaker: e.IsMaker,
|
||||
|
|
Loading…
Reference in New Issue
Block a user