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

# Live prices and OHLC snapshots

> How to stream live prices and fetch current OHLC snapshots. This endpoint does not provide historical OHLCV candles.

<Info>
  This page documents the **v3** feed format. Since **February 16, 2025**, the **v4** format separating mark prices from index prices is the recommended one — see the [Mark + Index introduction](/developer/integrators/guides/mark-+-index-introduction) for the v4 endpoints and migration details.
</Info>

## DNS

[https://backend-pricing.eu.gains.trade](https://backend-pricing.eu.gains.trade/charts)

*NOTE: No auth is required for accessing REST GET endpoints and the WebSocket event stream. However, rate limiting is in place, so please fetch data only as necessary and rely on the event stream to keep price data updated.*

## Common Endpoint

### Current OHLC snapshots

Fetch the current OHLC snapshot for each pair.

`/charts`

Format:

* Comprehensive list of OHLCs
* `pairId` is the index in the array. For example, BTC/USD `pairId = 0`, so `opens[0]`, `highs[0]`, `lows[0]`, and `closes[0]` construct the OHLC.
* `{ time, opens: [], highs: [], lows: [], closes: [] }`

<Info>
  `/charts` is a current OHLC snapshot endpoint. It is not a historical OHLCV candles API. It does not include volume, interval, `from`, or `to` parameters.
</Info>

For live price updates, use the event stream below. For recent executed trade data that you can use to derive gTrade volume, use the [trading history endpoints](/developer/integrators/guides/history-endpoints-migration). Those endpoints do not return price candles. For the v4 response shape with `indexPrices`, see the [Mark + Index introduction](/developer/integrators/guides/mark-+-index-introduction).

## Event Stream

Subscribe for all price updates. The stream provides updates every 25ms.

`wss://backend-pricing.eu.gains.trade`

* Format:
  * Array of price updates for a given 25ms interval
  * All even indexes are pairIds, odd are pair prices
  * No particular order
  * `[<pairIdX>,<pairIdXPrice>, <pairIdN>, <pairIdNPrice>, <pairIdY>, <pairIdYPrice>...]`

<Info>
  Every \~1000ms, the stream sends a single-item array as a ping message with an updated timestamp, for example: `[1724244390036]`.
</Info>
