diff --git a/exchanges/gateio/gateio.go b/exchanges/gateio/gateio.go index be9da955cb4..adc2b998ecd 100644 --- a/exchanges/gateio/gateio.go +++ b/exchanges/gateio/gateio.go @@ -2655,7 +2655,7 @@ func (g *Gateio) GetDeliveryOrderbook(ctx context.Context, settle currency.Code, } // GetDeliveryTradingHistory retrieves futures trading history -func (g *Gateio) GetDeliveryTradingHistory(ctx context.Context, settle currency.Code, lastID string, contract currency.Pair, limit uint64, from, to time.Time) ([]DeliveryTradingHistory, error) { +func (g *Gateio) GetDeliveryTradingHistory(ctx context.Context, settle currency.Code, lastID string, contract currency.Pair, limit uint64, from, to time.Time) ([]TradingHistoryItem, error) { if settle.IsEmpty() { return nil, errEmptyOrInvalidSettlementCurrency } @@ -2676,7 +2676,7 @@ func (g *Gateio) GetDeliveryTradingHistory(ctx context.Context, settle currency. if lastID != "" { params.Set("last_id", lastID) } - var histories []DeliveryTradingHistory + var histories []TradingHistoryItem return histories, g.SendHTTPRequest(ctx, exchange.RestSpot, publicTradingHistoryDeliveryEPL, common.EncodeURLValues(deliveryPath+settle.Item.Lower+"/trades", params), &histories) } diff --git a/exchanges/gateio/gateio_types.go b/exchanges/gateio/gateio_types.go index 0577f6d2d11..3bca9c0ccfc 100644 --- a/exchanges/gateio/gateio_types.go +++ b/exchanges/gateio/gateio_types.go @@ -836,15 +836,6 @@ type DeliveryContract struct { InDelisting bool `json:"in_delisting"` } -// DeliveryTradingHistory represents futures trading history -type DeliveryTradingHistory struct { - ID int64 `json:"id"` - CreateTime types.Time `json:"create_time"` - Contract string `json:"contract"` - Size float64 `json:"size"` - Price types.Number `json:"price"` -} - // OptionUnderlying represents option underlying and it's index price. type OptionUnderlying struct { Name string `json:"name"` diff --git a/exchanges/gateio/gateio_wrapper.go b/exchanges/gateio/gateio_wrapper.go index 4e5ee95b084..4992d9a0cd4 100644 --- a/exchanges/gateio/gateio_wrapper.go +++ b/exchanges/gateio/gateio_wrapper.go @@ -1000,8 +1000,7 @@ func (g *Gateio) GetRecentTrades(ctx context.Context, p currency.Pair, a asset.I if err != nil { return nil, err } - var deliveryTrades []DeliveryTradingHistory - deliveryTrades, err = g.GetDeliveryTradingHistory(ctx, settle, "", p.Upper(), 0, time.Time{}, time.Time{}) + deliveryTrades, err := g.GetDeliveryTradingHistory(ctx, settle, "", p.Upper(), 0, time.Time{}, time.Time{}) if err != nil { return nil, err } @@ -1875,7 +1874,7 @@ func (g *Gateio) GetOrderHistory(ctx context.Context, req *order.MultiOrderReque if err != nil { return nil, err } - var futuresOrder []TradingHistoryItem + var futuresOrder []TradingHistoryItem if req.AssetType == asset.Futures { futuresOrder, err = g.GetMyFuturesTradingHistory(ctx, settle, "", req.FromOrderID, fPair, 0, 0, 0) } else {