commit fbdfb45dd1edf03a8664f3d554db1a493f353b04
parent fb8f9e55efa2f4bed36c8120834b8e823f1a70a7
Author: ThomasV <thomasv@electrum.org>
Date: Thu, 24 Dec 2015 06:19:53 +0100
Merge pull request #1577 from kanishkablack/master
Updated Coinsecure Api
Diffstat:
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/plugins/exchange_rate/exchange_rate.py b/plugins/exchange_rate/exchange_rate.py
@@ -212,9 +212,14 @@ class CoinDesk(ExchangeBase):
class Coinsecure(ExchangeBase):
def get_rates(self, ccy):
- json = self.get_json('api.coinsecure.in', '/v0/noauth/lasttrade')
- return {'INR': Decimal(json['result'][0]['lasttrade'][0][bid][0][rate] / 100.0 )}
-
+ json = self.get_json('api.coinsecure.in', '/v0/noauth/newticker')
+ 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):
def get_rates(self, ccy):
ccys = ['USD', 'EUR', 'SGD']