Extend get_top_markets API#1911
Conversation
|
@oxarbitrage: I think this would be helpful for bitshares/bitshares-explorer-api#64. |
|
sure it will :) |
|
@oxarbitrage I think it's better to move the timestamp out of the individual items. Since the API was noted as experimental, I guess we can make the change. What do you think? Do you know who are using this API except the open explorer? |
d51305c to
62fc622
Compare
For get_top_markets API
Also refactored some related code for better performance.
8b6f923 to
1e8fc78
Compare
|
Right now, the
Possible approaches:
Thoughts? |
|
what about considering also what @Zapata did in the bitshares-explorer-api to get top markets? This is count of fill orders in the last 24 hours. It could mess the results a bit considering some markets will fill less but bigger orders but will still be better than what we have now as we have a reference value in all pairs. |
|
Another thing i tried in the past with @MichelSantos is to normalize the volume in BTS by querying the crosses tickers https://github.com/oxarbitrage/scripts/blob/master/bitshares_market_volume.lua#L73-L103 of the market base and quote against BTS. Not very reliable, the ticker prices need to be up to date and we assume there is a cross in BTS for at least 1 asset or the market pair. Still can be an approach to consider. |
Count of fill orders makes sense for some people (E.G. a website that measures Dapps' activities) but I think it doesn't make sense for traders.
Ideally we should do this or normalize volume in another currency E.G. USD or CNY. However, if we can't stably get somewhat accurate reference prices, the result would be unreliable thus mostly useless. Specifically, hard to do this on-chain, perhaps we (API server admins) can feed some external data to the back end of explorer API and serve results from there. |
get_top_marketsAPI( limit, optional base_asset )TODO: