mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-19 23:16:48 +00:00
BUGFIX: GateIO candle retrieval, backtester formatting (#715)
* Fixes gateio candle retrieval. Fixes backtester exch & currency lookups * Fixes strat whoopsie * Using a helper function instead * shadowy lint figures defeated * Fixes fodmap typo Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io> Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
This commit is contained in:
@@ -826,7 +826,7 @@ func (g *Gateio) GetHistoricCandles(pair currency.Pair, a asset.Item, start, end
|
||||
return kline.Item{}, err
|
||||
}
|
||||
|
||||
hours := end.Sub(start).Hours()
|
||||
hours := time.Since(start).Hours()
|
||||
formattedPair, err := g.FormatExchangeCurrency(pair, a)
|
||||
if err != nil {
|
||||
return kline.Item{}, err
|
||||
@@ -847,6 +847,7 @@ func (g *Gateio) GetHistoricCandles(pair currency.Pair, a asset.Item, start, end
|
||||
klineData.Asset = a
|
||||
|
||||
klineData.SortCandlesByTimestamp(false)
|
||||
klineData.RemoveOutsideRange(start, end)
|
||||
return klineData, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user