Scout Chart Creator
  • Overview
  • Get Started
    • Tutorial 1: NMR Daily Transaction Count
    • Tutorial 2: LPT Weekly Volume (USD)
    • Tutorial 3: NMR vs LPT Daily comparison
  • Pipeline
    • Filter
    • Project
    • Group
      • Accumulators
    • Sort
    • Unwind
    • Custom
  • Data Source
    • Transactions
    • States
    • Contracts
    • Aragon
    • Livepeer
    • dYdX
    • Set
    • Token holders
  • Operators
    • Math operators
    • Logic operators
    • Function operators
    • Array operators
    • String operators
  • Config
  • Protocols
    • Dodo
      • 24H trade volume
      • Deposit & Withdraw
    • Livepeer
    • dYdX
      • Making sense of the trade data
    • MakerDao
    • Pickle Finance
      • Example: Daily deposit and withdraw of jar 0.88
      • Example: Listing all borrows of a strategy
  • FAQ
    • Dealing with "logs" field in "Transaction"
    • How to handle "Query Timeout" error?
    • How to use a variable in a Pipeline
  • Research
    • The circulating supply of DODO tokens
    • How are bitcoins doing on Ethereum? (as of Jan 20th 2021)
Powered by GitBook
On this page

Was this helpful?

  1. Protocols
  2. Dodo

24H trade volume

PreviousDodoNextDeposit & Withdraw

Last updated 4 years ago

Was this helpful?

Let's build a text chart to show the trading volume of past 24 hours.

1.Choose data source.

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

5. Don't forget to divide it by 1000000 since USDT and USDC are both 6 decimals.

What the data looks like now:

7. Plug it in and you are all set!

2. Use instruction.

3. Using instruction to filter out logs which are not SellBaseToken or BuyBaseToken.

4. Use to sum up all the trade volume in one transaction

6. Use to sum up the value from all the transactions (in the past 24 hours).

Filter
Project
Project
Group
Transaction