Rename get_ticker to fetch_ticker

This commit is contained in:
Matthias
2019-12-18 16:34:30 +01:00
parent ce190a7485
commit 21622ac313
8 changed files with 136 additions and 136 deletions

View File

@@ -524,7 +524,7 @@ class Exchange:
raise OperationalException(e) from e
@retrier
def get_ticker(self, pair: str, refresh: Optional[bool] = True) -> dict:
def fetch_ticker(self, pair: str, refresh: Optional[bool] = True) -> dict:
if refresh or pair not in self._cached_ticker.keys():
try:
if pair not in self._api.markets or not self._api.markets[pair].get('active'):

View File

@@ -192,7 +192,7 @@ class FreqtradeBot:
else:
if not tick:
logger.info('Using Last Ask / Last Price')
ticker = self.exchange.get_ticker(pair)
ticker = self.exchange.fetch_ticker(pair)
else:
ticker = tick
if ticker['ask'] < ticker['last']:
@@ -570,7 +570,7 @@ class FreqtradeBot:
"""
Get sell rate - either using get-ticker bid or first bid based on orderbook
The orderbook portion is only used for rpc messaging, which would otherwise fail
for BitMex (has no bid/ask in get_ticker)
for BitMex (has no bid/ask in fetch_ticker)
or remain static in any other case since it's not updating.
:return: Bid rate
"""
@@ -582,7 +582,7 @@ class FreqtradeBot:
rate = order_book['bids'][0][0]
else:
rate = self.exchange.get_ticker(pair, refresh)['bid']
rate = self.exchange.fetch_ticker(pair, refresh)['bid']
return rate
def handle_trade(self, trade: Trade) -> bool: