Add Bit2C exchange (#8767)
* Add Bit2C exchange * Remove whitespace --------- Co-authored-by: sha-265 <sha@mempool.party>
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
"BitFlyer": [
|
||||
"JPY"
|
||||
],
|
||||
"Bit2C": [
|
||||
"ILS"
|
||||
],
|
||||
"BitPay": [
|
||||
"AED",
|
||||
"AFN",
|
||||
|
||||
@@ -358,6 +358,23 @@ class CoinGecko(ExchangeBase):
|
||||
for h in history['prices']])
|
||||
|
||||
|
||||
class Bit2C(ExchangeBase):
|
||||
|
||||
async def get_rates(self, ccy):
|
||||
json = await self.get_json('bit2c.co.il', '/Exchanges/BtcNis/Ticker.json')
|
||||
return {'ILS': to_decimal(json['ll'])}
|
||||
|
||||
def history_ccys(self):
|
||||
return CURRENCIES[self.name()]
|
||||
|
||||
async def request_history(self, ccy):
|
||||
history = await self.get_json('bit2c.co.il',
|
||||
'/Exchanges/BtcNis/KLines?resolution=1D&from=1357034400&to=%s' % int(time.time()))
|
||||
|
||||
return dict([(datetime.utcfromtimestamp(h[0]).strftime('%Y-%m-%d'), str(h[6]))
|
||||
for h in history])
|
||||
|
||||
|
||||
class CointraderMonitor(ExchangeBase):
|
||||
|
||||
async def get_rates(self, ccy):
|
||||
|
||||
Reference in New Issue
Block a user