cTrader ProtoHeartbeatEvent
A message with no content that shows the connection is alive. The server sends it when nothing else is being sent, and a client can send it to keep a connection open through a quiet spell of more than 30 seconds.
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 cTrader Open API, not an HTTP endpoint. It has no method and no path: it is sent over an open TCP or WebSocket connection, as Protocol Buffers or as JSON.
This is one of the common messages, shared by every cTrader proxy, so its payload type comes from ProtoPayloadType and not from ProtoOAPayloadType. The definition calls it an event, and it is the one event here that a client also sends.
The message
- Name
- ProtoHeartbeatEvent
- Direction
- Event, sent by the server
- Payload type
- HEARTBEAT_EVENT, number 51. This number is what identifies the message on the wire.
Fields
| Name | Type | Description |
|---|---|---|
| payloadType | ProtoPayloadType | Identifies the message. Its default in the definition is HEARTBEAT_EVENT, which is number 51. |
Limits that apply at cTrader Open API
| Limit | Value | Scope | Source |
|---|---|---|---|
| Requests a second, not historical data | 50 | Per connection, requests that are not for historical data | help.ctrader.comchecked |
| Requests a second, historical data | 5 | Per connection, historical data requests only | help.ctrader.comchecked |