diff --git a/piker/brokers/deribit/api.py b/piker/brokers/deribit/api.py index ae5e35a6..1e17868e 100644 --- a/piker/brokers/deribit/api.py +++ b/piker/brokers/deribit/api.py @@ -65,6 +65,7 @@ from .venues import ( ) from piker.accounting import ( Asset, + digits_to_dec, MktPair, ) from piker.data import ( @@ -308,18 +309,16 @@ class Client: """ assets = {} resp = await self.json_rpc( - 'private/get_account_summaries', - params={ - 'extended' : True - } + 'public/get_currencies', + params={} ) - summaries = resp.result['summaries'] - for summary in summaries: - currency = summary['currency'] - tx_tick = Decimal('1e-08') + currencies = resp.result + for currency in currencies: + name = currency['currency'] + tx_tick = digits_to_dec(currency['fee_precision']) atype='crypto_currency' - assets[currency] = Asset( - name=currency, + assets[name] = Asset( + name=name, atype=atype, tx_tick=tx_tick) return assets @@ -461,7 +460,6 @@ class Client: limit=limit ) - async def bars( self, mkt: MktPair,