Explicitly check for False in fetch_ticker
This commit is contained in:
parent
1436dc58f5
commit
657b002a81
@ -658,7 +658,8 @@ class Exchange:
|
|||||||
@retrier
|
@retrier
|
||||||
def fetch_ticker(self, pair: str) -> dict:
|
def fetch_ticker(self, pair: str) -> dict:
|
||||||
try:
|
try:
|
||||||
if pair not in self._api.markets or not self._api.markets[pair].get('active'):
|
if (pair not in self._api.markets or
|
||||||
|
self._api.markets[pair].get('active', False) is False):
|
||||||
raise ExchangeError(f"Pair {pair} not available")
|
raise ExchangeError(f"Pair {pair} not available")
|
||||||
data = self._api.fetch_ticker(pair)
|
data = self._api.fetch_ticker(pair)
|
||||||
return data
|
return data
|
||||||
|
Loading…
Reference in New Issue
Block a user