# Stream latest prices

**URL:** <https://forum.balancer.fi/t/stream-latest-prices/2190>\
**Category:** General Chat\
**Created:** [August 31, 2021, 1:27am UTC](https://forum.balancer.fi/t/stream-latest-prices/2190 "2021-08-31T01:27:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jterns](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@jterns](https://forum.balancer.fi/u/jterns)\
**Post date:** [August 31, 2021, 1:27am UTC](https://forum.balancer.fi/t/stream-latest-prices/2190/1 "2021-08-31T01:27:59Z")

</div>

Hi all,

I have been able to get the latest prices from Balancer pools with this query:

const client = new ApolloClient({ uri: kovanUrl, cache: new InMemoryCache()});

const pricesQuery = `{ latestPrices { id asset pricingAsset poolId { id } price block } }`;

```
  client.query({ query: gql(pricesQuery)}).then(data => console.log("Prices data: ", data)).catch(err => { console.log("Error fetching prices data: ", err) });

```

However, I would like to subscribe to the latest prices and get the prices updates.

I have read the Apollo documentation

> **[Subscriptions](https://www.apollographql.com/docs/react/data/subscriptions/)**
>
> Get real-time updates from your GraphQL server

and it seems that it is possible to do it. What changes do I need to do to the query to be able to subscribe to the latestPrices price updates?

Thanks in advance,

Jordi

---

<div class="post-metadata">

**Author:** ![DavisRamsey](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.balancer.fi/davisramsey/32/973_2.png) [@DavisRamsey](https://forum.balancer.fi/u/DavisRamsey)\
**Post date:** [August 31, 2021, 2:24am UTC](https://forum.balancer.fi/t/stream-latest-prices/2190/2 "2021-08-31T02:24:08Z")

</div>

you should come to discord and ask this in #dev

---

<div class="post-metadata">

**Author:** ![jterns](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@jterns](https://forum.balancer.fi/u/jterns)\
**Post date:** [August 31, 2021, 3:42am UTC](https://forum.balancer.fi/t/stream-latest-prices/2190/3 "2021-08-31T03:42:32Z")

</div>

> [@jterns](#):
>
> and it seems that it is possible to do it. What changes do I need to do to the query to be able to subscribe to the latestPrices price updates?
> 
> Thanks in advance,
> 
> Jordi

I will do it, Thanks!

---

<div class="post-metadata">

**Author:** ![jterns](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@jterns](https://forum.balancer.fi/u/jterns)\
**Post date:** [August 31, 2021, 4:53am UTC](https://forum.balancer.fi/t/stream-latest-prices/2190/4 "2021-08-31T04:53:18Z")

</div>

I created a message thread in discord

> **[Discord - A New Way to Chat with Friends & Communities](https://discord.com/channels/638460494168064021/882107448243159050/882107450155728976)**
>
> Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.

Not sure if it is the right place.

Thanks
