From 0ece74eea658e93499634966c8fd6a52ba59b123 Mon Sep 17 00:00:00 2001 From: Anwesh Date: Thu, 3 Dec 2015 16:27:32 +0530 Subject: [PATCH] Coinsecure exchange added --- plugins/exchange_rate/exchange_rate.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/exchange_rate/exchange_rate.py b/plugins/exchange_rate/exchange_rate.py index 94f5e55ff..0b3458812 100644 --- a/plugins/exchange_rate/exchange_rate.py +++ b/plugins/exchange_rate/exchange_rate.py @@ -209,7 +209,12 @@ class CoinDesk(ExchangeBase): % (start, end)) json = self.get_json('api.coindesk.com', query) return json['bpi'] - + +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 )} + class itBit(ExchangeBase): def get_rates(self, ccy): ccys = ['USD', 'EUR', 'SGD']