BitShares Forum

Main => Technical Support => Topic started by: btswolf on May 30, 2017, 10:11:19 pm

Title: Is there an easy way to get all the tickers for all assets with just one call?
Post by: btswolf on May 30, 2017, 10:11:19 pm
I'm trying to get BitShares listed on http://www.exchangewar.info but need some technical assistance for the admin there.

"I was looking into the API and it's confusing:
http://docs.bitshares.org/api/
For example, to get all assets, I'd use get_assets, but it's limited to 100 assets. Is there an easy way to get all the tickers for all assets with just one call?"

https://disqus.com/home/discussion/exchangewar/exchange_war_list_of_crypto_exchanges_60/#comment-3331130193
Title: Re: Is there an easy way to get all the tickers for all assets with just one call?
Post by: xeroc on May 31, 2017, 08:59:57 am
Is there an easy way to get all the tickers for all assets with just one call?"
Erm, an asset doesn't not have a ticker. A market does and requires TWO assets to be paired. with N assets available, you'd end up with N * N-1 pairs/markets.
Since that "doesn't scale", such a call isn't available (it would literally eat all the resources of the backend server).
Title: Re: Is there an easy way to get all the tickers for all assets with just one call?
Post by: fluxer555 on May 31, 2017, 02:31:56 pm
The number of pairs with non-empty orderbooks is, in practice, a small fraction of N * N-1, right? What does an efficient implementation of finding all non-empty orderbooks that include a single symbol look like?
Title: Re: Is there an easy way to get all the tickers for all assets with just one call?
Post by: xeroc on May 31, 2017, 04:03:33 pm
The number of pairs with non-empty orderbooks is, in practice, a small fraction of N * N-1, right? What does an efficient implementation of finding all non-empty orderbooks that include a single symbol look like?
You'd need to go through all (open or filled) orders and sort them into the markets accordingly. With that, you build a list of 'active' markets.
However, that thing potentially grows quickly aswell ...