# OHLC in Streaming APIs

**URL:** <https://community.bitquery.io/t/ohlc-in-streaming-apis/1513>\
**Category:** GraphQL Tutorials\
**Tags:** feature\
**Created:** [June 5, 2023, 9:08am UTC](https://community.bitquery.io/t/ohlc-in-streaming-apis/1513 "2023-06-05T09:08:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gaurav](https://avatars.discourse-cdn.com/v4/letter/g/b487fb/32.png) [@gaurav](https://community.bitquery.io/u/gaurav)\
**Post date:** [June 5, 2023, 9:08am UTC](https://community.bitquery.io/t/ohlc-in-streaming-apis/1513/1 "2023-06-05T09:08:49Z")

</div>

Please check the following query, which provides real-time OHLC data in streaming APIs.

> **[OHLC by intervals](https://ide.bitquery.io/OHLC-by-intervals)**
>
> Bitquery is analytical engine for blockchains

```auto
{
  EVM(dataset: realtime) {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Time"}
      where: {Trade: {Side: {Currency: {SmartContract: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}, Type: {is: buy}}, Currency: {SmartContract: {is: "0xdac17f958d2ee523a2206206994597c13d831ec7"}}}}
     
    ) {
      Block {
        Time(interval: {in: minutes, count: 10})
      }
      volume: sum(of: Trade_Amount)
      Trade {
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Number)
        close: Price(maximum: Block_Number)
      }
      count
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![duotang](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@duotang](https://community.bitquery.io/u/duotang)\
**Post date:** [May 1, 2024, 1:43am UTC](https://community.bitquery.io/t/ohlc-in-streaming-apis/1513/2 "2024-05-01T01:43:54Z")

</div>

What is the purpose of getting ’count’ in this example?

---

<div class="post-metadata">

**Author:** ![Divya](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@Divya](https://community.bitquery.io/u/Divya)\
**Post date:** [May 1, 2024, 7:19am UTC](https://community.bitquery.io/t/ohlc-in-streaming-apis/1513/3 "2024-05-01T07:19:17Z")

</div>

`count` in this case is the number of trades. It is an additional metric, you can remove it if you don’t need that information.
