Adjust documentation to tuple use
This commit is contained in:
parent
f0af4601f9
commit
6525a838d1
@ -228,12 +228,23 @@ The strategy provides access to the `DataProvider`. This allows you to get addit
|
||||
|
||||
**NOTE**: The DataProvier is currently not available during backtesting / hyperopt.
|
||||
|
||||
All methods return `None` in case of failure (do not raise an exception).
|
||||
|
||||
Please always check if the `DataProvider` is available to avoid failures during backtesting.
|
||||
|
||||
#### Possible options for DataProvider
|
||||
|
||||
- `available_pairs` - Property with tuples listing cached pairs with their intervals. (pair, interval)
|
||||
- `ohlcv(pair, ticker_interval)` - Currently cached ticker data for all pairs in the whitelist, returns DataFrame or empty DataFrame
|
||||
- `historic_ohlcv(pair, ticker_interval)` - Data stored on disk
|
||||
- `runmode` - Property containing the current runmode.
|
||||
|
||||
#### ohlcv / historic_ohlcv
|
||||
|
||||
``` python
|
||||
if self.dp:
|
||||
if dp.runmode == 'live':
|
||||
if 'ETH/BTC' in self.dp.available_pairs:
|
||||
if ('ETH/BTC', ticker_interval) in self.dp.available_pairs:
|
||||
data_eth = self.dp.ohlcv(pair='ETH/BTC',
|
||||
ticker_interval=ticker_interval)
|
||||
else:
|
||||
@ -242,14 +253,13 @@ if self.dp:
|
||||
ticker_interval='1h')
|
||||
```
|
||||
|
||||
All methods return `None` in case of failure (do not raise an exception).
|
||||
#### Available Pairs
|
||||
|
||||
#### Possible options for DataProvider
|
||||
|
||||
- `available_pairs` - Property containing cached pairs
|
||||
- `ohlcv(pair, ticker_interval)` - Currently cached ticker data for all pairs in the whitelist, returns DataFrame or empty DataFrame
|
||||
- `historic_ohlcv(pair, ticker_interval)` - Data stored on disk
|
||||
- `runmode` - Property containing the current runmode.
|
||||
``` python
|
||||
if self.dp:
|
||||
for pair, ticker in self.dp.available_pairs:
|
||||
print(f"available {pair}, {ticker}")
|
||||
```
|
||||
|
||||
### Additional data - Wallets
|
||||
|
||||
|
@ -46,7 +46,6 @@ class DataProvider(object):
|
||||
:param copy: copy dataframe before returning.
|
||||
Use false only for RO operations (where the dataframe is not modified)
|
||||
"""
|
||||
# TODO: Should not be stored in exchange but in this class
|
||||
if self.runmode in (RunMode.DRY_RUN, RunMode.LIVE):
|
||||
if tick_interval:
|
||||
pairtick = (pair, tick_interval)
|
||||
|
Loading…
Reference in New Issue
Block a user