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:
Scott
2021-07-19 11:48:52 +10:00
committed by GitHub
parent 0965678fbf
commit 6182dd6fbc
4 changed files with 14 additions and 2 deletions

View File

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