Browse Source

Updated Coinsecure Api

Added Unocoin Api
283
Anwesh 9 years ago
parent
commit
b23c22b29d
  1. 9
      plugins/exchange_rate/exchange_rate.py

9
plugins/exchange_rate/exchange_rate.py

@ -212,8 +212,13 @@ class CoinDesk(ExchangeBase):
class Coinsecure(ExchangeBase): class Coinsecure(ExchangeBase):
def get_rates(self, ccy): def get_rates(self, ccy):
json = self.get_json('api.coinsecure.in', '/v0/noauth/lasttrade') json = self.get_json('api.coinsecure.in', '/v0/noauth/newticker')
return {'INR': Decimal(json['result'][0]['lasttrade'][0][bid][0][rate] / 100.0 )} return {'INR': Decimal(json['lastprice'] / 100.0 )}
class Unocoin(ExchangeBase):
def get_rates(self, ccy):
json = self.get_json('www.unocoin.com', 'trade?buy')
return {'INR': Decimal(json)}
class itBit(ExchangeBase): class itBit(ExchangeBase):
def get_rates(self, ccy): def get_rates(self, ccy):

Loading…
Cancel
Save