From 32d2273699b16eef52d6bc991c0eb85c88b7c337 Mon Sep 17 00:00:00 2001 From: Tyler Smith Date: Tue, 3 Jan 2017 13:58:52 -0800 Subject: [PATCH] TWEAK: Use proxy for bitcoinaverage.com. --- market/btcprice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/market/btcprice.py b/market/btcprice.py index f458656f..3157837e 100644 --- a/market/btcprice.py +++ b/market/btcprice.py @@ -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): """ @@ -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"]