Get the latest pool prices

Hi all,

I am creating an app and I need to get the list of pools and the latest token price in that pool.
I went through the documentation and I don’t have a clear idea of how to start.

  1. I guess that first, I need to get the list of pools (how can I do that?)
  2. for each pool, get the token list and the price of each token.

Can anybody help me?

It would be great if you can point me to which typescript library or method I need to use.

Thanks in advance,

Jordi

1 Like

You’d use the subgraph for all of that - https://thegraph.com/legacy-explorer/subgraph/balancer-labs/balancer-v2

Unless you’re talking about doing it on chain, which I don’t know. Someone else can answer that :slight_smile:

1 Like

Thank You!

I will give it a try

Hi all,

Is there any REST API where I can do a call and get the list of pools?

Thanks and regards,

Jordi

Sorry, I just realized that thegraph is a web interface for REST calls.
I also found a tutorial.

Jordi

1 Like