explorer icon indicating copy to clipboard operation
explorer copied to clipboard

New API features

Open B1ackt34 opened this issue 5 years ago • 7 comments

Is it possible in future versions to add the following API?

Daily trading volume

Thanks in advance

B1ackt34 avatar Sep 15 '20 20:09 B1ackt34

Add it to what? The exchanges? If so, we already do for most exchanges that offer it (now whether or not that gets shown is a different question).

uaktags avatar Sep 15 '20 21:09 uaktags

No i mean the daily volume of coins traded in total ... with the data taken from the blockchain. It is an important value to understand if the currency is used, beyond purchases / sales.

B1ackt34 avatar Sep 16 '20 06:09 B1ackt34

I have yet to see an exchange use the actual blockchain in trading activities, except for, maybe, some swap sites. Exchanges sweep deposits into their own wallet and credit/debit trading accounts for the amount deposited or withdrawn. All trading activity is then recorded on the exchange's trading DB. Only deposits and withdrawals to/from the exchange actually hit the blockchain.

svenrenhoek avatar Sep 16 '20 06:09 svenrenhoek

If I send coins to another user, they are not registered on exchanges. If I pay for online services with coins, neither

B1ackt34 avatar Sep 16 '20 07:09 B1ackt34

Ok. I misinterpreted what you meant by "traded". I don't think this is something that generic explorer should be doing. You would need to identify the addresses that you want to include/exclude from "Daily trading volume", sort and sum up the data. The addresses would be different on every chain. This is something better accomplished using a customized script querying the DB, then displaying the output.

edit - this assumes the includable/excludable addresses transact is a defined way, and do not perform transactions that are both includable and excludable. Then you would have to identify the type of data you are looking for on a per transaction basis. Not really feasible for a generic explorer.

svenrenhoek avatar Sep 16 '20 07:09 svenrenhoek

Thank you for answer ... i'll follow your advices !

B1ackt34 avatar Sep 16 '20 07:09 B1ackt34

To add to that, you're querying every TX that is not a coinbase origin or any other parameter you would wish to exclude. Some have done similar efforts to create line charts in the past to just show movement flow.

Fyi, charting requires storing of results (by day) in order to cache it so you don't dos yourself.

A simple ticker of the last 24hrs can be live that says how much has moved, but I'd still recommend mocking that query to the cron script and having it be delayed to ease the server strain

uaktags avatar Sep 16 '20 11:09 uaktags