List all assets using python-bitshares

Started by jackingyang, January 23, 2019, 09:21:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jackingyang

Quote from: xeroc on January 23, 2019, 10:07:21 AM
Assets have an "id" of the form "1.3.xxx". The easiest way to iterate through them would be to just count
from 1.3.0 (BTS) until you get an AssetDoesNotExist exception.
Keep in mind that there are a few empty ids right after 1.3.0 too ..
Thanks

xeroc

Assets have an "id" of the form "1.3.xxx". The easiest way to iterate through them would be to just count
from 1.3.0 (BTS) until you get an AssetDoesNotExist exception.
Keep in mind that there are a few empty ids right after 1.3.0 too ..

jackingyang

from bitshares.asset import Asset
print(dict(Asset('USD')))


For listing assets, i believe there is no call in pybitshares yet. But you could call any rpc call thru the lib directly to by using

BitShares().rpc.CALLNAME()

It don't work.