cTrader ProtoOAExecutionEvent
Sent when the server accepts or executes an order. It is the answer to the new order, cancel, amend and close requests, and it is also sent when a deposit or withdrawal takes place.
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.
The message
- Name
- ProtoOAExecutionEvent
- Direction
- Event, sent by the server
- Payload type
- PROTO_OA_EXECUTION_EVENT, number 2126. This number is what identifies the message on the wire.
Fields
| Name | Type | Description |
|---|---|---|
| payloadType | ProtoOAPayloadType | Identifies the message. Its default in the definition is PROTO_OA_EXECUTION_EVENT, which is number 2126. |
| ctidTraderAccountIdrequired | int64 | The 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. |
| executionTyperequired | ProtoOAExecutionType | What happened to the order, as a value of ProtoOAExecutionType, for example ACCEPTED or FILLED. |
| position | ProtoOAPosition | The position the execution belongs to. |
| order | ProtoOAOrder | The order that started it. |
| deal | ProtoOADeal | The deal, which is the execution itself. |
| bonusDepositWithdraw | ProtoOABonusDepositWithdraw | The bonus deposit or withdrawal, where the event reports one. |
| depositWithdraw | ProtoOADepositWithdraw | The deposit or withdrawal, where the event reports one. |
| errorCode | string | The name of the error, taken from the ProtoErrorCode enumeration or from another error code enumeration. |
| isServerEvent | bool | True when the server's own logic caused the event and not a request from the trader. The definition's example is a stop out. |
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 |