Skip to content
This repository has been archived by the owner on May 16, 2019. It is now read-only.

Commit

Permalink
TWEAK: Use proxy for bitcoinaverage.com.
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-smith committed Jan 4, 2017
1 parent 248b43c commit 32d2273
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion market/btcprice.py
Expand Up @@ -6,6 +6,7 @@
from urllib2 import Request, urlopen, URLError
from datetime import datetime, timedelta

BITCOIN_PRICE_ENDPOINT = "https://ticker.openbazaar.org/api"

class BtcPrice(Thread):
"""
Expand Down Expand Up @@ -87,7 +88,7 @@ def dictForUrl(url):
return json.loads(result)

def loadbitcoinaverage(self):
for currency, info in self.dictForUrl('https://api.bitcoinaverage.com/ticker/global/all').iteritems():
for currency, info in self.dictForUrl(BITCOIN_PRICE_ENDPOINT).iteritems():
if currency != "timestamp":
self.prices[currency] = info["last"]

Expand Down

0 comments on commit 32d2273

Please sign in to comment.