mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-17 07:26:48 +00:00
GateIO: Fixed OrderHistory unmarshalling (#255)
* Fixed OrderHistory unmarshalling on the GateIo
This commit is contained in:
committed by
Adrian Gallagher
parent
0990f9d118
commit
2cb2413131
@@ -167,14 +167,15 @@ type TradHistoryResponse struct {
|
||||
|
||||
// TradesResponse details trade history
|
||||
type TradesResponse struct {
|
||||
ID string `json:"id"`
|
||||
OrderID string `json:"orderid"`
|
||||
ID int64 `json:"tradeID"`
|
||||
OrderID int64 `json:"orderNumber"`
|
||||
Pair string `json:"pair"`
|
||||
Type string `json:"type"`
|
||||
Rate float64 `json:"rate,string"`
|
||||
Amount float64 `json:"amount,string"`
|
||||
Time string `json:"time"`
|
||||
TimeUnix int64 `json:"time_unix,string"`
|
||||
Total float64 `json:"total"`
|
||||
Time string `json:"date"`
|
||||
TimeUnix int64 `json:"time_unix"`
|
||||
}
|
||||
|
||||
// WithdrawalFees the large list of predefined withdrawal fees
|
||||
|
||||
@@ -395,7 +395,7 @@ func (g *Gateio) GetOrderHistory(getOrdersRequest exchange.GetOrdersRequest) ([]
|
||||
side := exchange.OrderSide(strings.ToUpper(trade.Type))
|
||||
orderDate := time.Unix(trade.TimeUnix, 0)
|
||||
orders = append(orders, exchange.OrderDetail{
|
||||
ID: trade.OrderID,
|
||||
ID: strconv.FormatInt(trade.OrderID, 10),
|
||||
Amount: trade.Amount,
|
||||
Price: trade.Rate,
|
||||
OrderDate: orderDate,
|
||||
|
||||
Reference in New Issue
Block a user