From 887400eb834c7c4f5f7a9dcb7bb8c6526e000780 Mon Sep 17 00:00:00 2001 From: c9s Date: Thu, 6 Aug 2020 13:18:41 +0800 Subject: [PATCH] parse QuoteQuantity --- bbgo/exchange/binance/parse.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bbgo/exchange/binance/parse.go b/bbgo/exchange/binance/parse.go index 1ce18a2e2..ff4b62a1a 100644 --- a/bbgo/exchange/binance/parse.go +++ b/bbgo/exchange/binance/parse.go @@ -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,