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.
|
**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.
|
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
|
``` python
|
||||||
if self.dp:
|
if self.dp:
|
||||||
if dp.runmode == 'live':
|
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',
|
data_eth = self.dp.ohlcv(pair='ETH/BTC',
|
||||||
ticker_interval=ticker_interval)
|
ticker_interval=ticker_interval)
|
||||||
else:
|
else:
|
||||||
@ -242,14 +253,13 @@ if self.dp:
|
|||||||
ticker_interval='1h')
|
ticker_interval='1h')
|
||||||
```
|
```
|
||||||
|
|
||||||
All methods return `None` in case of failure (do not raise an exception).
|
#### Available Pairs
|
||||||
|
|
||||||
#### Possible options for DataProvider
|
``` python
|
||||||
|
if self.dp:
|
||||||
- `available_pairs` - Property containing cached pairs
|
for pair, ticker in self.dp.available_pairs:
|
||||||
- `ohlcv(pair, ticker_interval)` - Currently cached ticker data for all pairs in the whitelist, returns DataFrame or empty DataFrame
|
print(f"available {pair}, {ticker}")
|
||||||
- `historic_ohlcv(pair, ticker_interval)` - Data stored on disk
|
```
|
||||||
- `runmode` - Property containing the current runmode.
|
|
||||||
|
|
||||||
### Additional data - Wallets
|
### Additional data - Wallets
|
||||||
|
|
||||||
|
@ -46,7 +46,6 @@ class DataProvider(object):
|
|||||||
:param copy: copy dataframe before returning.
|
:param copy: copy dataframe before returning.
|
||||||
Use false only for RO operations (where the dataframe is not modified)
|
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 self.runmode in (RunMode.DRY_RUN, RunMode.LIVE):
|
||||||
if tick_interval:
|
if tick_interval:
|
||||||
pairtick = (pair, tick_interval)
|
pairtick = (pair, tick_interval)
|
||||||
|
Loading…
Reference in New Issue
Block a user