Skip to content

Commit

Permalink
Add warning about OKX futures backtesting data
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed May 13, 2022
1 parent 5444f4e commit c299601
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docs/exchanges.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion freqtrade/exchange/okx.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
Expand Down

0 comments on commit c299601

Please sign in to comment.