GateIO: Fixed OrderHistory unmarshalling (#255)

* Fixed OrderHistory unmarshalling on the GateIo
This commit is contained in:
Vadim Zhuk
2019-03-19 14:21:58 +02:00
committed by Adrian Gallagher
parent 0990f9d118
commit 2cb2413131
2 changed files with 6 additions and 5 deletions

View File

@@ -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

View File

@@ -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,