> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ondo.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# OHLC Streaming

> gRPC endpoint for real-time, minute-bucketed asset OHLC streaming.

The stream emits only live, in-progress candles; it does not backfill history. Candles are bucketed by minute and updated on every tick within the bucket. To load historical OHLC candles, use the REST [Get OHLC Data for an Asset](/api-reference/assets/get-ohlc-open-high-low-close-data-for-an-asset) endpoint. Both endpoints are intended to be used together to provide a complete picture. The REST endpoint provides historical candles to build the chart while the streaming endpoint keeps the chart up to date in real time.

<Note>
  To generate a typed client for this endpoint, see [Protobuf Schema & Code Generation](/api-reference/protobuf-schema).
</Note>

## Authentication

All requests must include your API key in the `x-api-key` metadata header.

## Request

**Endpoint:** `grpc.gm.ondo.finance:443`

**RPC:** `ondo.gm.backend.v1.BackendService/StreamOHLC`

<ParamField body="symbols" type="string[]">
  Asset symbols to subscribe to. If empty, you will receive updates for all assets.
</ParamField>

## Response

A server stream of messages. Each message batches one or more `OHLCUpdate` objects into a single `updates` array. Each update is a partial or closed minute candle for a single symbol, covering both the GM token (primary market) and the underlying stock (underlying market).

<ResponseField name="updates" type="OHLCUpdate[]">
  Array of OHLC updates.

  <Expandable title="OHLCUpdate">
    <ResponseField name="primary_market" type="object">
      OHLC candle for the GM token, keyed by `symbol`.

      <Expandable title="primary_market">
        <ResponseField name="symbol" type="string">
          Asset symbol.
        </ResponseField>

        <ResponseField name="open" type="string">
          Opening price for the bucket.
        </ResponseField>

        <ResponseField name="high" type="string">
          Highest price for the bucket.
        </ResponseField>

        <ResponseField name="low" type="string">
          Lowest price for the bucket.
        </ResponseField>

        <ResponseField name="close" type="string">
          Most recent price for the bucket.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="underlying_market" type="object">
      OHLC candle for the underlying stock, keyed by `ticker`.

      <Expandable title="underlying_market">
        <ResponseField name="ticker" type="string">
          Stock ticker.
        </ResponseField>

        <ResponseField name="open" type="string">
          Opening price for the bucket.
        </ResponseField>

        <ResponseField name="high" type="string">
          Highest price for the bucket.
        </ResponseField>

        <ResponseField name="low" type="string">
          Lowest price for the bucket.
        </ResponseField>

        <ResponseField name="close" type="string">
          Most recent price for the bucket.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="is_closed" type="boolean">
      Marks the final emission for the bucket (the minute boundary crossed). Subsequent updates with a higher timestamp belong to the next bucket.
    </ResponseField>

    <ResponseField name="timestamp" type="uint64">
      Bucket start (minute floor) in nanoseconds since epoch. Stable across all partials and the final closed update for a given bucket.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash grpcurl theme={null}
  grpcurl \
    -H "x-api-key: <YOUR_API_KEY>" \
    -d '{"symbols": ["AAPLon", "GOOGLon"]}' \
    grpc.gm.ondo.finance:443 \
    ondo.gm.backend.v1.BackendService/StreamOHLC
  ```
</RequestExample>

<ResponseExample>
  ```json Streamed theme={null}
  {
    "updates": [
      {
        "primaryMarket": {
          "symbol": "AAPLon",
          "open": "256.791808070580506978",
          "high": "257.013422018348623853",
          "low": "256.500000000000000000",
          "close": "256.901234567890123456"
        },
        "underlyingMarket": {
          "ticker": "AAPL",
          "open": "256.2475",
          "high": "256.47",
          "low": "255.96",
          "close": "256.36"
        },
        "isClosed": false,
        "timestamp": "1773350220000000000"
      },
      {
        "primaryMarket": {
          "symbol": "GOOGLon",
          "open": "305.39957516982939159",
          "high": "305.812345678901234567",
          "low": "304.900000000000000000",
          "close": "305.612345678901234567"
        },
        "underlyingMarket": {
          "ticker": "GOOGL",
          "open": "304.915",
          "high": "305.33",
          "low": "304.51",
          "close": "305.12"
        },
        "isClosed": false,
        "timestamp": "1773350220000000000"
      }
    ]
  }
  ```
</ResponseExample>
