Fix "No market symbol" exception in telegram calls

This commit is contained in:
Matthias
2018-10-10 21:28:48 +02:00
parent 3e8e8a55fa
commit a4d2bb6f29
3 changed files with 21 additions and 6 deletions

View File

@@ -375,6 +375,8 @@ class Exchange(object):
def get_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:
raise DependencyException(f"Pair {pair} not available")
data = self._api.fetch_ticker(pair)
try:
self._cached_ticker[pair] = {