Capital.com ohlc.event
Carries one candlestick bar update for an epic subscribed to with OHLCMarketData.subscribe: the open, high, low and close for one resolution and bar type.
Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.
This is a message of the Capital.com WebSocket API, not an HTTP endpoint. It has no method and no path: it is sent as JSON over an open WebSocket connection.
The vendor's page documents this message by one example and gives no table of its fields, so no type is recorded and nothing is said about which fields are always present.
The message
- Name
- ohlc.event
- Direction
- Event, sent by the server
- Carried by
- WebSocket. Capital.com's page says to ping the service at least once every 10 minutes to keep the connection alive.
- WebSocket address
- wss://api-streaming-capital.backend-capital.com/connect
- Also sent in answer to
Fields
The vendor's page does not say which of these fields are required or always present.
| Name | Type | Description |
|---|---|---|
| status | Not stated | OK in the vendor's example. |
| destination | Not stated | Always ohlc.event for this message. |
| payload.resolution | Not stated | The width of the bar, in the same words the subscription takes, such as MINUTE_5. |
| payload.epic | Not stated | The epic the bar is for. |
| payload.type | Not stated | The kind of candlestick. classic in the vendor's example. |
| payload.priceType | Not stated | Which price the bar is built from. bid in the vendor's example. |
| payload.t | Not stated | The time of the bar. In the vendor's example it is a 13 digit number, which reads as Unix time in milliseconds. |
| payload.h | Not stated | The high of the bar. |
| payload.l | Not stated | The low of the bar. |
| payload.o | Not stated | The open of the bar. |
| payload.c | Not stated | The close of the bar. |
Limits that apply at Capital.com
| Limit | Value | Scope | Source |
|---|---|---|---|
| Headline limit | 10/s per user | user | open-api.capital.comchecked |