24H trade volume
Last updated
Last updated
Let's build a text chart to show the trading volume of past 24 hours.
Search all the transactions which contain SellBaseToken(seller, payBase, receiveQuote) or BuyBaseToken(buyer, receiveBase, payQuote) logs. And to be completely accurate, you also want to limit the logs.address
to all the trading pairs on DODO.
It's relative safe not to include the logs.address as part of the filter since the chance that other protocols might use the exact same log name and parameters is relative small at this stage. The chart would also require no update when DODO adds new trading pair.
What data looks like now:
The trade volume is in the third parameter of BuyBaseToken log, payQuote
It can be referred as $$this.params.2.value
What the data looks like now: