Add BitStamp to exchange rate options.

This commit is contained in:
Tim Bellefleur 2015-10-15 13:10:15 -07:00
parent 80bf9952e8
commit ad198c372b
1 changed files with 5 additions and 0 deletions

View File

@ -130,6 +130,11 @@ class BitPay(ExchangeBase):
json = self.get_json('bitpay.com', '/api/rates')
return dict([(r['code'], Decimal(r['rate'])) for r in json])
class BitStamp(ExchangeBase):
def get_rates(self, ccy):
json = self.get_json('www.bitstamp.net', '/api/ticker/')
return {'USD': Decimal(json['last'])}
class BlockchainInfo(ExchangeBase):
def get_rates(self, ccy):
json = self.get_json('blockchain.info', '/ticker')