mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-30 07:26:46 +00:00
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:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user