Fixing exchanges error

This commit is contained in:
Vivek Teega 2019-01-31 20:30:57 +05:30
parent 1a111b98d4
commit cdaf874228
2 changed files with 3 additions and 3 deletions

View File

@ -41,4 +41,4 @@
"USD",
"VND"
]
}
}

View File

@ -262,7 +262,6 @@ class CoinDesk(ExchangeBase):
json = await self.get_json('api.coindesk.com',
'/v1/bpi/currentprice/%s.json' % ccy)
result = {ccy: Decimal(json['bpi'][ccy]['rate_float'])}
print(result)
return result
def history_starts(self):
@ -280,6 +279,7 @@ class CoinDesk(ExchangeBase):
json = await self.get_json('api.coindesk.com', query)
return json['bpi']
class CoinMarketcap(ExchangeBase):
async def get_rates(self, ccy):
@ -613,4 +613,4 @@ class FxThread(ThreadJob):
def timestamp_rate(self, timestamp):
from .util import timestamp_to_datetime
date = timestamp_to_datetime(timestamp)
return self.history_rate(date)
return self.history_rate(date)