Getting bulk price and volume data for all tokens from an exchange

Hello, I am trying to get full price data from all tokens on an exchange but am only finding the ability to pull by token. Is there a way to pull all tokens from an exchange to get up-to-date price and volume data per exchange?
Thank you guys for crushing it!

1 Like

Hey @ACBassman

Currently getting price function is available only for one token. You can interact with factory and router smart contracts of an exchange for getting that info using web3 methods

Hope this will help you :mage:

1 Like

For getting volume you can listen to transfer events on exchange smrt contract and aggregate them

3 Likes

Great. I was looking for this. Currently I’m just using web3 and eth pastLogs. With

  1. the address = the Token Address I want the volume for

  2. topics =[ transfer, one of the token’s related LPs ]

  3. summing up the data of each transfer, looping through most liquid pairs with this token

Is there a better way? Some way of querying the blockchain transfer with just referencing the DEX’s Router address?

Thanks for your help.

Terry