Skip to content

Commit

Permalink
Add market() method to dataprovider
Browse files Browse the repository at this point in the history
  • Loading branch information
hroff-1902 committed Oct 2, 2019
1 parent 2c0d2c1 commit 3ac5b91
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions freqtrade/data/dataprovider.py
Expand Up @@ -85,6 +85,14 @@ def get_pair_dataframe(self, pair: str, ticker_interval: str = None) -> DataFram
logger.warning(f"No data found for ({pair}, {ticker_interval}).")
return data

def market(self, pair: str):
"""
Return market data for the pair
:param pair: Pair to get the data for
:return: Market data dict from ccxt or None if market info is not available for the pair
"""
return self._exchange.markets.get(pair)

def ticker(self, pair: str):
"""
Return last ticker data
Expand Down

0 comments on commit 3ac5b91

Please sign in to comment.