Binance: GetOrderInfo method issue. Kraken - add Cost param to GetOrderInfo output (#615)

* add Cost param to Kraken GetOrderInfo output

* fmt

* faulty resp.Time handling in Binance GetOrderInfo method

Co-authored-by: Vazha Bezhanishvili <vazha.bezhanishvili@elegro.eu>
This commit is contained in:
Vazha
2021-01-07 07:33:27 +02:00
committed by GitHub
parent 7431bf8866
commit 29f7faea54
2 changed files with 2 additions and 5 deletions

View File

@@ -710,10 +710,6 @@ func (b *Binance) GetOrderInfo(orderID string, pair currency.Pair, assetType ass
}
orderSide := order.Side(resp.Side)
orderDate, err := convert.TimeFromUnixTimestampFloat(resp.Time)
if err != nil {
return
}
status, err := order.StringToOrderStatus(resp.Status)
if err != nil {
@@ -727,7 +723,7 @@ func (b *Binance) GetOrderInfo(orderID string, pair currency.Pair, assetType ass
return order.Detail{
Amount: resp.OrigQty,
Date: orderDate,
Date: resp.Time,
Exchange: b.Name,
ID: strconv.FormatInt(resp.OrderID, 10),
Side: orderSide,

View File

@@ -775,6 +775,7 @@ func (k *Kraken) GetOrderInfo(orderID string, pair currency.Pair, assetType asse
RemainingAmount: orderInfo.Volume - orderInfo.VolumeExecuted,
Fee: orderInfo.Fee,
Trades: trades,
Cost: orderInfo.Cost,
}
return orderDetail, nil