get_assets now uses public endpoint
It's better if the data is available through a public endpoint.fix_deribit_hist_queries_BACKUP
							parent
							
								
									089c79e905
								
							
						
					
					
						commit
						5304a36b87
					
				|  | @ -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, | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue