From c299601ece12c388a20042fc508debbd89b3ca1d Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 13 May 2022 07:03:18 +0200 Subject: [PATCH] Add warning about OKX futures backtesting data --- docs/exchanges.md | 5 +++-- freqtrade/exchange/okx.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/exchanges.md b/docs/exchanges.md index b2759893b..50ebf9e0a 100644 --- a/docs/exchanges.md +++ b/docs/exchanges.md @@ -228,11 +228,12 @@ OKX requires a passphrase for each api key, you will therefore need to add this ``` !!! Warning - OKX only provides 300 candles per api call. Therefore, the strategy will only have a pretty low amount of data available in backtesting mode. + OKX only provides 100 candles per api call. Therefore, the strategy will only have a pretty low amount of data available in backtesting mode. -!!! Warning "Futures - position mode" +!!! Warning "Futures" OKX Futures has the concept of "position mode" - which can be Net or long/short (hedge mode). Freqtrade supports both modes - but changing the mode mid-trading is not supported and will lead to exceptions and failures to place trades. + OKX also only provides MARK candles for the past ~3 months. Backtesting futures prior to that date will therefore lead to slight deviations, as funding-fees cannot be calculated correctly without this data. ## Gate.io diff --git a/freqtrade/exchange/okx.py b/freqtrade/exchange/okx.py index 9aeefd450..654021182 100644 --- a/freqtrade/exchange/okx.py +++ b/freqtrade/exchange/okx.py @@ -20,7 +20,7 @@ class Okx(Exchange): """ _ft_has: Dict = { - "ohlcv_candle_limit": 300, + "ohlcv_candle_limit": 100, "mark_ohlcv_timeframe": "4h", "funding_fee_timeframe": "8h", }