Skip to content

Commit

Permalink
[Price Feed] Fix BTC38 - bad if-condition
Browse files Browse the repository at this point in the history
  • Loading branch information
xeroc committed Dec 2, 2015
1 parent daf0bdf commit 3cc3322
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/pricefeeds/feedsources.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,8 @@ def fetch(self):
params = { 'c': coin.lower(), 'mk_type': market.lower() }
response = requests.get(url=url, params=params, headers=_request_headers, timeout=10 )
result = response.json()
if coin.lower() in result :
feed[market][coin] = { "price" : (float(result["ticker"]["last"])),
"volume" : (float(result["ticker"]["vol"]/result["ticker"]["last"])*self.scaleVolumeBy) }
feed[market][coin] = { "price" : (float(result["ticker"]["last"])),
"volume" : (float(result["ticker"]["vol"]/result["ticker"]["last"])*self.scaleVolumeBy) }
except Exception as e:
print("\nError fetching results from {1}! ({0})".format(str(e), type(self).__name__))
if not self.allowFailure:
Expand Down

0 comments on commit 3cc3322

Please sign in to comment.