Binance websocket: Order Detail Execution Report (#750)

* * Binance websocket: set commission of order Detail

* * Binance websocket: set commissionAsset of order.Detail

* * Binance websocket: change CostAsset to type currency.Code

* * Binance websocket: call NewCode after checking CommissionAsset is not empty. This guarantees that NULL CommissionAsset is mapped to an empty order.Detail.CostAsset. Otherwise, reflect.DeepEqual will fail on test. Update TestWsOrderExecutionReport json message to BTC commission.

* * Binance websocket: binance websocket "ExecutionReport" only provides "trade" status (partially filled), so check that executed amount == total amount before change status to filled
This commit is contained in:
Rocky Yang
2021-08-17 12:33:54 +08:00
committed by GitHub
parent 96669e29cf
commit c38757a689
3 changed files with 14 additions and 1 deletions

View File

@@ -133,6 +133,7 @@ type Detail struct {
ExecutedAmount float64
RemainingAmount float64
Cost float64
CostAsset currency.Code
Fee float64
Exchange string
InternalOrderID string