# Price Feed

## DNS

&#x20;[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

### Charts

Fetch current OHLCs for each pair.

`/charts`

Format:&#x20;

* Comprehensive list of OHLCs
* pairId is the index in the array (I.e. BTC/USD pairId = 0; opens\[0], highs\[0], lows\[0], closes\[0] will construct OHLC)
* `{ time, opens: [], highs: [], lows: [], closes: [] }`

## Event Stream

Subscribe for all price updates. Provides updates every 25ms.&#x20;

`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>...]`

{% hint style="info" %}
Every \~1000ms there's single item array update. It's ping message with updated timestamp ie:`[1724244390036]`
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gains.trade/developer/integrators/price-feed.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
