Cảnh báo
This feature is in pre-release and currently under testing. Documentation is for reference only.
Public message
ProtoGetServerDataReq
| Field | Type | Label | Description |
| payloadType | PublicMessagePayloadType | Optional | Code included in each message that tells cTrader and WebView plugins which specific request, response, or event is being sent so it can be routed and processed correctly |
| data | string | Required | Request parameters serialized as a string to retrieve specific server data from the cTrader platform |
ProtoGetServerDataRes
| Field | Type | Label | Description |
| payloadType | PublicMessagePayloadType | Optional | Code included in each message that tells cTrader and WebView plugins which specific request, response, or event is being sent so it can be routed and processed correctly |
| data | string | Required | Response data from server serialized as a string containing the requested information |
ProtoOpenInternalUrlReq
| Field | Type | Label | Description |
| payloadType | PublicMessagePayloadType | Optional | Code included in each message that tells cTrader and WebView plugins which specific request, response, or event is being sent so it can be routed and processed correctly |
| url | string | Required | The server‐returned data payload corresponding to the original request. |
ProtoOpenInternalUrlRes
| Field | Type | Label | Description |
| payloadType | PublicMessagePayloadType | Optional | Code included in each message that tells cTrader and WebView plugins which specific request, response, or event is being sent so it can be routed and processed correctly |
ProtoPublicConfirmEvent
| Field | Type | Label | Description |
| payloadType | PublicMessagePayloadType | Required | Code included in each message that tells cTrader and WebView plugins which specific request, response, or event is being sent so it can be routed and processed correctly |
ProtoPublicMessageErrorRes
| Field | Type | Label | Description |
| payloadType | PublicMessagePayloadType | Optional | Code included in each message that tells cTrader and WebView plugins which specific request, response, or event is being sent so it can be routed and processed correctly |
ProtoPublicRegisterEvent
| Field | Type | Label | Description |
| payloadType | PublicMessagePayloadType | Required | Code included in each message that tells cTrader and WebView plugins which specific request, response, or event is being sent so it can be routed and processed correctly |
| uuid | string | Required | Universally unique identifier for the client application instance |
ProtoServerDataEvent
| Field | Type | Label | Description |
| payloadType | PublicMessagePayloadType | Optional | Code included in each message that tells cTrader and WebView plugins which specific request, response, or event is being sent so it can be routed and processed correctly |
| data | string | Required | Server-pushed data serialized as a string containing real-time updates or notifications from the cTrader platform |
PublicMessagePayloadType
| Name | Value | Description |
| REGISTER_EVENT | 2000 | Plugin to host: handshake start |
| CONFIRM_EVENT | 2001 | Plugin to host: handshake confirmation |
| GET_SERVER_DATA_REQ | 2100 | Plugin to host: RPC request. Used in fetching data or invoking an operation (e.g. GetAccountInfo). |
| GET_SERVER_DATA_RES | 2101 | Host to plugin: RPC response (result) |
| SERVER_DATA_EVENT | 2102 | Host to plugin: one-way event (eventName + data) |
| OPEN_INTERNAL_URL_REQ | 2103 | Plugin to host: request to open a URL |
| OPEN_INTERNAL_URL_RES | 2104 | Host to plugin: URL open acknowledgment |
| PUBLIC_ERROR_RES | 2500 | Host to plugin: generic error wrapper |