Broker API HubMenu

cTrader ProtoOASpotEvent

messageProtoOASpotEventcTrader Open APIpayloadType 2131Live prices

Carries a live price for a subscribed symbol. The first one after subscribing holds the latest prices even when the market is closed.

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.

Independent and unofficialhelp.ctrader.comchecked The definition file it was checked against

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.

The message

Name
ProtoOASpotEvent
Direction
Event, sent by the server
Payload type
PROTO_OA_SPOT_EVENT, number 2131. This number is what identifies the message on the wire.

Fields

NameTypeDescription
payloadTypeProtoOAPayloadTypeIdentifies the message. Its default in the definition is PROTO_OA_SPOT_EVENT, which is number 2131.
ctidTraderAccountIdrequiredint64The account the message is about, by its cTrader account id. Responses and events carry the same id, which is how a program holding several accounts on one connection tells them apart.
symbolIdrequiredint64The symbol, by its id on the cTrader platform. Ids come from the symbol list.
biduint64The bid price. As a whole number of 1/100000 of a price unit, so 123000 means 1.23.
askuint64The ask price. As a whole number of 1/100000 of a price unit, so 123000 means 1.23.
trendbarrepeated ProtoOATrendbarThe bar now forming, sent where live trend bars are subscribed to as well.
sessionCloseuint64The close of the last session. As a whole number of 1/100000 of a price unit, so 123000 means 1.23.
timestampint64The time of the price, as Unix time. Sent where the subscription asked for it.

Limits that apply at cTrader Open API

LimitValueScopeSource
Requests a second, not historical data50Per connection, requests that are not for historical datahelp.ctrader.comchecked
Requests a second, historical data5Per connection, historical data requests onlyhelp.ctrader.comchecked