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 ( | from piker.accounting import ( | ||||||
|     Asset, |     Asset, | ||||||
|  |     digits_to_dec, | ||||||
|     MktPair, |     MktPair, | ||||||
| ) | ) | ||||||
| from piker.data import ( | from piker.data import ( | ||||||
|  | @ -308,18 +309,16 @@ class Client: | ||||||
|         """ |         """ | ||||||
|         assets = {} |         assets = {} | ||||||
|         resp = await self.json_rpc( |         resp = await self.json_rpc( | ||||||
|             'private/get_account_summaries', |             'public/get_currencies', | ||||||
|             params={ |             params={} | ||||||
|                 'extended' : True |  | ||||||
|             } |  | ||||||
|         ) |         ) | ||||||
|         summaries = resp.result['summaries'] |         currencies = resp.result | ||||||
|         for summary in summaries: |         for currency in currencies: | ||||||
|             currency = summary['currency'] |             name = currency['currency'] | ||||||
|             tx_tick = Decimal('1e-08') |             tx_tick = digits_to_dec(currency['fee_precision'])  | ||||||
|             atype='crypto_currency' |             atype='crypto_currency' | ||||||
|             assets[currency] = Asset( |             assets[name] = Asset( | ||||||
|                 name=currency, |                 name=name, | ||||||
|                 atype=atype, |                 atype=atype, | ||||||
|                 tx_tick=tx_tick) |                 tx_tick=tx_tick) | ||||||
|         return assets  |         return assets  | ||||||
|  | @ -461,7 +460,6 @@ class Client: | ||||||
|             limit=limit |             limit=limit | ||||||
|         ) |         ) | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
|     async def bars( |     async def bars( | ||||||
|         self, |         self, | ||||||
|         mkt: MktPair, |         mkt: MktPair, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue