ProtoOAApplicationAuthReq
The request for authorizing an application to work with the cTrader platform proxies.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | string | clientId | The unique Client ID provided during the registration. |
required | string | clientSecret | The unique Client Secret provided during the registration. |
ProtoOAApplicationAuthRes
Response to the ProtoOAApplicationAuthReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
ProtoOAAccountAuthReq
Request for authorizing a trading account session. Requires established authorized connection with the client application.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. |
required | string | accessToken | The Access Token issued for providing access to the Trader's Account. |
ProtoOAAccountAuthRes
Response to the ProtoOAAccountAuthReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. |
ProtoOAErrorRes
Generic response when an error occurs.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
optional | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader's Accounts. |
required | string | errorCode | The name of the ProtoErrorCode or the other custom ErrorCodes (e.g. ProtoCHErrorCode). |
optional | string | description | The error description. |
optional | int64 | maintenanceEndTimestamp | The timestamp in seconds when the current maintenance session will end. If specified, then the back-end is on maintenance and the field specifies the expected time of the end of maintenance. |
ProtoOAClientDisconnectEvent
The event that is sent when the connection with the client application is canceled by the server. All the sessions for the traders' accounts will be terminated.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
optional | string | reason | The disconnection reason explained. For example, The application access was blocked by the cTrader Administrator. |
ProtoOAAccountsTokenInvalidatedEvent
The event that occurs when the connection with a specific Trader's Account is canceled by the server. The existing connections with the other Traders' Accounts will be maintained.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
repeated | int64 | ctidTraderAccountIds | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
optional | string | reason | The disconnection reason explained. For example, the Access Token is expired or recalled. |
ProtoOAVersionReq
The request for getting the proxy version. Can be used to check if the .proto file is obsolete.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
ProtoOAVersionRes
Response to the ProtoOAVersionReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | string | version | The current version of the server application. |
ProtoOANewOrderReq
The request for sending a new trading order. Allowed only if the accessToken field has the "trade" permissions for the Trading Account.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | int64 | symbolId | The unique identifier of a Symbol in cTrader platform. |
required | ProtoOAOrderType | orderType | The type of order - MARKET, LIMIT, STOP, MARKET_RANGE, STOP_LIMIT. |
required | ProtoOATradeSide | tradeSide | The trade direction - BUY or SELL. |
required | int64 | volume | The volume represented in 0.01 of a unit (e.g. US 10.00 = 1000). |
optional | double | limitPrice | The limit price, can be specified for the LIMIT order only. |
optional | double | stopPrice | Stop Price, can be specified for the STOP and the STOP_LIMIT orders only. |
optional | ProtoOATimeInForce | timeInForce | The specific order execution or expiration instruction - GOOD_TILL_DATE, GOOD_TILL_CANCEL, IMMEDIATE_OR_CANCEL, FILL_OR_KILL, MARKET_ON_OPEN. |
optional | int64 | expirationTimestamp | The exact time of the order expiration. Should be set for the Good Till Date orders. |
optional | double | stopLoss | The absolute Stop Loss price (1.23456 for example). Not supported for the Market Orders. |
optional | double | takeProfit | The absolute Take Profit price (1.23456 for example). Not supported for the Market Orders. |
optional | string | comment | User custom comment. Maximum length - 512 symbols. |
optional | double | baseSlippagePrice | Base price to calculate relative slippage price for the Market Range Order. |
optional | int32 | slippageInPoints | Slippage distance for the Market Range and Stop Limit order. |
optional | string | label | User custom label. Maximum length - 100 symbols. |
optional | int64 | positionId | Reference to the existing position if an order is intended to modify it. |
optional | string | clientOrderId | Optional user-specific clientOrderId (similar to FIX ClOrderID). Maximum length - 50 symbols. |
optional | int64 | relativeStopLoss | Relative Stop Loss that can be specified instead of the absolute one. Specified in 1/100'000 of a unit of the price. For Buy: Stop Loss = Entry Price - Relative Stop Loss, for Sell: Stop Loss = Entry Price + Relative Stop Loss. |
optional | int64 | relativeTakeProfit | Relative Take Profit that can be specified instead of the absolute one. Specified in 1/100'000 of a unit of the price. For Buy: Take Profit = Entry Price + Relative Take Profit, for Sell: Take Profit = Entry Price - Relative Take Profit. |
optional | bool | guaranteedStopLoss | If TRUE then Stop Loss is guaranteed. Available for the French Risk or the Guaranteed Stop Loss Accounts. |
optional | bool | trailingStopLoss | The Trailing Stop Loss. If TRUE, then the Stop Loss is Trailing. |
optional | ProtoOAOrderTriggerMethod | stopTriggerMethod | The trigger method for the STOP or the STOP_LIMIT pending orders. |
ProtoOAExecutionEvent
The event that is sent following the successful order acceptance or execution by the server. Acts as Response to the ProtoOANewOrderReq, ProtoOACancelOrderReq, ProtoOAAmendOrderReq, ProtoOAAmendPositionSLTPReq, and ProtoOAClosePositionReq requests. Also, the event is sent when a Deposit/Withdrawal took place.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | ProtoOAExecutionType | executionType | Type of the order operation. For example, ACCEPTED, FILLED, etc. |
optional | ProtoOAPosition | position | Reference to the position linked with the execution. |
optional | ProtoOAOrder | order | Reference to the initial order. |
optional | ProtoOADeal | deal | Reference to the deal (execution). |
optional | ProtoOABonusDepositWithdraw | bonusDepositWithdraw | Reference to the Bonus Deposit or Withdrawal operation. |
optional | ProtoOADepositWithdraw | depositWithdraw | Reference to the Deposit or Withdrawal operation. |
optional | string | errorCode | The name of the ProtoErrorCode or the other custom ErrorCodes (e.g. ProtoCHErrorCode). |
optional | bool | isServerEvent | If TRUE, then the event is generated as a result of Server logic instead of the Trader's request (e.g. Stop Out). |
ProtoOACancelOrderReq
The request for canceling the existing pending orders. Allowed only if the accessToken field has the "trade" permissions for the Trading Account.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | int64 | orderId | The unique identifier of an order to be canceled. |
ProtoOAAmendOrderReq
The request for amending an existing pending order. Allowed only if the accessToken has "trade" permissions for the Trading Account.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | int64 | orderId | The ID of the order to amend. |
optional | int64 | volume | Volume represented in 0.01 of a unit (e.g. cents). |
optional | double | limitPrice | The Limit Price. Can be specified for the LIMIT order only. |
optional | double | stopPrice | The Stop Price. Can be specified for the STOP and the STOP_LIMIT orders. |
optional | int64 | expirationTimestamp | The exact Order expiration time. Should be set for the Good Till Date orders. |
optional | double | stopLoss | The absolute Stop Loss price (1.23456 for example). Not supported for the Market Orders. |
optional | double | takeProfit | The absolute Take Profit price (1.23456 for example). Not supported for the Market Orders. |
optional | int32 | slippageInPoints | Slippage distance for the Market Range and the Stop Limit orders. |
optional | int64 | relativeStopLoss | The relative Stop Loss can be specified instead of the absolute one. Specified in 1/100'000 of a unit of price. For Buy: Stop Loss = Entry Price - Relative Stop Loss, for Sell: Stop Loss = Entry Price + Relative Stop Loss. |
optional | int64 | relativeTakeProfit | The relative Take Profit can be specified instead of the absolute one. Specified in 1/100'000 of a unit of price. For Buy: Take Profit = Entry Price + Relative Take Profit, for Sell: Take Profit = Entry Price - Relative Take Profit. |
optional | bool | guaranteedStopLoss | If TRUE then the Stop Loss is guaranteed. Available for the French Risk or the Guaranteed Stop Loss Accounts. |
optional | bool | trailingStopLoss | If TRUE then the Trailing Stop Loss is applied. |
optional | ProtoOAOrderTriggerMethod | stopTriggerMethod | Trigger method for the Stop or the Stop Limit pending orders. |
ProtoOAAmendPositionSLTPReq
The request for amending Stop Loss and Take Profit for an existing position. Allowed only if the access token has the "trade" permissions for the Trading Account.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | int64 | positionId | The unique identifier of the position to amend. |
optional | double | stopLoss | The absolute Stop Loss price (e.g.: 1.23456). |
optional | double | takeProfit | The absolute Take Profit price (e.g.: 1.26543). |
optional | bool | guaranteedStopLoss | If TRUE, then the Stop Loss is guaranteed. Available for the French Risk or the Guaranteed Stop Loss accounts. |
optional | bool | trailingStopLoss | If TRUE, then the Trailing Stop Loss is applied. |
optional | ProtoOAOrderTriggerMethod | topLossTriggerMethod | The Stop Loss trigger method for the Stop Loss or the Take Profit orders. |
ProtoOAClosePositionReq
The request for closing existing positions. Allowed only if the Access Token has the "trade" permissions for the Trading Account.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | int64 | positionId | The unique identifier of the position to close. |
required | int64 | volume | Volume to close, represented in 0.01 of a unit (e.g. cents). |
ProtoOATrailingSLChangedEvent
Event that occurs when the Trailing Stop Loss level has changed due to the price level changes.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | int64 | positionId | The unique identifier of the position to close. |
required | int64 | orderId | The unique identifier of the order. |
required | double | stopPrice | New value of the Stop Loss price. |
required | int64 | utcLastUpdateTimestamp | The exact UTC time when the Stop Loss was updated. |
ProtoOAAssetListReq
The request for the list of assets available for the Trader's Account.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
ProtoOAAssetListRes
Responce to the ProtoOAAssetListReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
repeated | ProtoOAAsset | asset | The list of assets. |
ProtoOASymbolsListReq
The request for the list of symbols available on the Server of the Trader's Account. Symbol entries are returned with a limited set of fields.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response, or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
optional | bool | includeArchivedSymbols | Include archived symbols in the request. |
ProtoOASymbolsListRes
The response to the ProtoOASymbolsListReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
repeated | ProtoOALightSymbol | symbol | The list of symbols. |
repeated | ProtoOAArchivedSymbol | archivedSymbol | The list of archived symbols. |
ProtoOASymbolByIdReq
The request for getting a full Symbol entity.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
repeated | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. |
ProtoOASymbolByIdRes
The response to the ProtoOASymbolByIdReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
repeated | ProtoOASymbol | symbol | The symbol entity with the full set of fields. |
repeated | ProtoOAArchivedSymbol | archivedSymbol | Archived symbols. |
ProtoOASymbolsForConversionReq
A request for getting the conversion chain between two assets that consist of several symbols. Use when no direct quote is available.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | int64 | firstAssetId | The unique identifier of the first asset in the conversation chain. For example, for EUR/USD the firstAssetId is EUR ID and lastAssetId is USD ID. |
required | int64 | lastAssetId | The unique identifier of the last asset in the conversation chain. For example, for EUR/USD the firstAssetId is EUR ID and lastAssetId is USD ID. |
ProtoOASymbolsForConversionRes
The response to the ProtoOASymbolsForConversionReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
repeated | ProtoOALightSymbol | symbol | Conversion chain of the symbols. For example, EUR/USD, USD/JPY, GBP/JPY --> EUR/GBP. |
ProtoOASymbolChangedEvent
The event that is sent when the symbol is changed on the server-side.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
repeated | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. |
ProtoOAAssetClassListReq
The request for the list of asset classes available for the trader's account.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
ProtoOAAssetClassListRes
The response to the ProtoOAAssetListReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
repeated | ProtoOAAssetClass | assetClass | The list of the asset classes. |
ProtoOATraderReq
The request for getting the Trader's Account data.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
ProtoOATraderRes
The response to the ProtoOATraderReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | ProtoOATrader | trader | The Trader's Account information. |
ProtoOATraderUpdatedEvent
The event that occurs when a Trader is updated on the server side.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | ProtoOATrader | trader | The Trader's Account information. |
ProtoOAReconcileReq
Request for getting Trader's current open positions and pending orders data.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
ProtoOAReconcileRes
The response to the ProtoOAReconcileReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
repeated | ProtoOAPosition | position | The list of Trader's Account open positions. |
repeated | ProtoOAOrder | order | The list of Trader's Account pending orders. |
ProtoOAOrderErrorEvent
The event that is sent when errors occur during the order requests.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | string | errorCode | The name of the ProtoErrorCode or the other custom ErrorCodes (e.g. ProtoCHErrorCode). |
optional | int64 | orderId | The unique identifier of the order. |
optional | int64 | positionId | The unique identifier of the position. |
optional | string | description | The error description. |
ProtoOADealListReq
The request for getting Trader's deals historical data (execution details).
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | int64 | fromTimestamp | The UNIX time from which the search starts >=0 (1-1-1970). Validation: toTimestamp - fromTimestamp \<= 604800000 (1 week). |
required | int64 | toTimestamp | The UNIX time where to stop searching \<= 2147483646000 (19-1-2038). |
optional | int32 | maxRows | The maximum number of the deals to return. |
ProtoOADealListRes
The response to the ProtoOADealListRes request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
repeated | ProtoOADeal | deal | The list of the deals. |
repeated | bool | hasMore | If TRUE then the response will provide more than 10000 deals. |
ProtoOAExpectedMarginReq
The request for getting the margin estimate. Can be used before sending a New Order request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. |
repeated | int64 | volume | Volume represented in 0.01 of a unit (e.g. cents). |
ProtoOAExpectedMarginRes
The response to the ProtoOAExpectedMarginReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
repeated | ProtoOAExpectedMargin | margin | The buy and sell margin estimate. |
optional | uint32 | moneyDigits | Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpreted as business value multiplied by 10^8, then the real balance would be 10053099944 / 10^8 = 100.53099944. Affects margin.buyMargin, margin.sellMargin. |
ProtoOAMarginChangedEvent
The event that is sent when the margin allocated to a specific position is changed.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | uint64 | positionId | The unique identifier of the position. |
required | uint64 | usedMargin | Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpreted as business value multiplied by 10^8, then the real balance would be 10053099944 / 10^8 = 100.53099944. Affects margin.buyMargin, margin.sellMargin. |
ProtoOACashFlowHistoryListReq
The request for getting Trader's historical data of deposits and withdrawals.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | int64 | fromTimestamp | The exact UNIX time from which the search starts >=0 (1-1-1970). Validation: toTimestamp - fromTimestamp \<= 604800000 (1 week). |
required | int64 | toTimestamp | The exact UNIX time where to stop searching \<= 2147483646000 (19-1-2038). |
ProtoOACashFlowHistoryListRes
The response to the ProtoOACashFlowHistoryListReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
repeated | ProtoOADepositWithdraw | depositWithdraw | The list of deposit and withdrawal operations. |
ProtoOAGetAccountListByAccessTokenReq
The request for getting the list of granted Trader's Account for the access token.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | string | accessToken | The Access Token issued for providing access to the Trader's Account. |
ProtoOAGetAccountListByAccessTokenRes
The response to the ProtoOAGetAccountListByAccessTokenReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | string | accessToken | The Access Token issued for providing access to the Trader's Account. |
optional | ProtoOAClientPermissionScope | permissionScope | The scope of permissions - SCOPE_VIEW or SCOPE_TRADE. |
repeated | ProtoOACtidTraderAccount | ctidTraderAccountIds | The list of the account IDs. |
ProtoOARefreshTokenReq
The request to refresh the access token using the refresh token of the granted trader's account.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | string | refreshToken | The Refresh Token issued for updating Access Token. |
ProtoOARefreshTokenRes
Response to the ProtoOARefreshTokenReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | string | accessToken | The Access Token issued for providing access to the Trader's Account. |
required | string | tokenType | The bearer token. |
required | int64 | expiresIn | Access Token expiration period in seconds. |
required | string | refreshToken | The Refresh Token issued for updating Access Token. |
Quotes
ProtoOASubscribeSpotsReq
The request for subscribing on spot events of the specified symbol.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
repeated | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. |
ProtoOASubscribeSpotsRes
The response to the ProtoOASubscribeSpotsReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
ProtoOAUnsubscribeSpotsReq
The request for unsubscribing from the spot events of the specified symbol.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
repeated | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. |
ProtoOAUnsubscribeSpotsRes
The response to the ProtoOASubscribeSpotsRes request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
ProtoOASpotEvent
The event that occurs when a new spot event is generated on the server-side. Requires subscription on the spot events, see ProtoOASubscribeSpotsReq.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. |
optional | uint64 | bid | The Bid price. Specified in 1/100000 of a unit of the price (e.g. 1.23 -> 123_000). |
optional | uint64 | ask | The Ask price. Specified in 1/100000 of a unit of the price (e.g. 1.23 -> 123_000). |
repeated | ProtoOATrendbar | trendbar | Returns the live trend bar. Requires subscription on the trend bars. |
optional | uint64 | sessionClose | The last session closed. Specified in 1/100_000 of a unit of the price. |
ProtoOASubscribeLiveTrendbarReq
The request for subscribing for live trend bars. Requires subscription on the spot events, see ProtoOASubscribeSpotsReq.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | ProtoOATrendbarPeriod | period | Specifies the period of trend bar series (e.g. M1, M10, etc.). |
repeated | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. |
ProtoOASubscribeLiveTrendbarRes
The response to the ProtoOASubscribeLiveTrendbarReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
ProtoOAUnsubscribeLiveTrendbarReq
The request for unsubscribing from the live trend bars.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | ProtoOATrendbarPeriod | period | Specifies the period of trend bar series (e.g. M1, M10, etc.). |
repeated | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. |
ProtoOAUnsubscribeLiveTrendbarRes
The response to the ProtoOASubscribeLiveTrendbarReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
ProtoOAGetTrendbarsReq
The request for getting historical trend bars for the symbol (14000 bars maximum).
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | int64 | fromTimestamp | The exact time of starting the search in milliseconds. Must be bigger or equal to zero (1-1-1970). Validation: toTimestamp - fromTimestamp \<= X, where X depends on series period: M1, M2, M3, M4, M5: 302400000 (5 weeks); M10, M15, M30, H1: 21168000000 (35 weeks), H4, H12, D1: 31622400000 (1 year); W1, MN1: 158112000000 (5 years). |
required | int64 | toTimestamp | The exact time of finishing the search in milliseconds. Smaller or equal to 2147483646000 (19-1-2038). |
required | ProtoOATrendbarPeriod | period | Specifies the period of trend bar series (e.g. M1, M10, etc.). |
required | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. |
ProtoOAGetTrendbarsRes
The response to the ProtoOAGetTrendbarsReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | ProtoOATrendbarPeriod | period | Specifies the period of trend bar series (e.g. M1, M10, etc.). |
required | int64 | timestamp | Equals to toTimestamp from the request. |
repeated | ProtoOATrendbar | trendbar | The list of trend bars. |
repeated | int64 | imbolId | Unique identifier of the Symbol in cTrader platform. |
ProtoOAGetTickDataReq
The request for getting historical tick data for the symbol.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. |
repeated | ProtoOAQuoteType | type | Bid/Ask (1/2). |
required | int64 | fromTimestamp | The exact time of starting the search in milliseconds. Must be greater or equal to zero (1-1-1970). Validation: toTimestamp - fromTimestamp \<= 604800000 (1 week). |
required | int64 | toTimestamp | The exact time of finishing the search in milliseconds \<= 2147483646000 (19-1-2038). |
ProtoOAGetTickDataRes
The response to the ProtoOAGetTickDataReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
repeated | ProtoOATickData | tickData | The list of ticks. |
required | bool | hasMore | If TRUE then the number of records by the filter is larger than chunkSize, the response contains the number of records that are equal to chunkSize. |
End Quotes
ProtoOAGetCtidProfileByTokenReq
The request for getting details of Trader's profile. Limited due to GDRP requirements.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | string | accessToken | The Access Token issued for providing access to the Trader's Account. |
ProtoOAGetCtidProfileByTokenRes
The response to the ProtoOAGetCtidProfileByTokenReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | ProtoOACtidProfile | profile | Trader's profile. |
ProtoOADepthEvent
The event that is sent when the structure of the depth of the market is changed. Requires subscription on the depth of markets for the symbol, see ProtoOASubscribeDepthQuotesReq.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. |
repeated | ProtoOADepthQuote | newQuotes | The list of changes in the depth of market quotes. |
repeated | uint64 | deletedQuotes | The list of quotes to delete. |
ProtoOASubscribeDepthQuotesReq
The request for subscribing on the depth of market of the specified symbol.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. |
ProtoOASubscribeDepthQuotesRes
The response to the ProtoOASubscribeDepthQuotesReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
ProtoOAUnsubscribeDepthQuotesReq
The request for unsubscribing from the depth of market of the specified symbol.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. |
ProtoOAUnsubscribeDepthQuotesRes
The response to the ProtoOAUnsubscribeDepthQuotesReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
ProtoOASymbolCategoryListReq
The request for a list of symbol categories available for a trading account.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
ProtoOASymbolCategoryListRes
The response to the ProtoSymbolCategoryListReq request
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
required | ProtoOASymbolCategory | symbolCategory | The list of symbol categories. |
ProtoOAAccountLogoutReq
The request to logout a trading account and close the session. Requires established authorized connection with the client application.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
ProtoOAAccountLogoutRes
The response to the ProtoOATraderLogoutReq request.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
ProtoOAAccountDisconnectEvent
The event that is sent when the established session for an account is dropped on the server-side. A new session must be authorized for the account.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
ProtoOAMarginCallListReq
The request for a list of existing margin call thresholds configured for a user.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
ProtoOAMarginCallListRes
The response with a list of existing user Margin Calls, usually contains 3 items.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
repeated | ProtoOAMarginCall | marginCall | The margin call entity specifies a threshold for the exact margin call type. Only 3 instances of margin calls are supported, identified by marginCallType. See ProtoOANotificationType for details. |
ProtoOAMarginCallUpdateReq
The request to modify marginLevelThreshold of the specified marginCallType for ctidTraderAccountId.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
repeated | ProtoOAMarginCall | marginCall | The margin call entity specifies a threshold for the exact margin call type. Only 3 instances of margin calls are supported, identified by marginCallType. See ProtoOANotificationType for details. |
ProtoOAMarginCallUpdateRes
The response received when the margin call was successfully updated.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
ProtoOAMarginCallUpdateEvent
The event that is sent when a Margin Call threshold configuration is updated.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
repeated | ProtoOAMarginCall | marginCall | The margin call entity specifies a threshold for the exact margin call type. Only 3 instances of margin calls are supported, identified by marginCallType. See ProtoOANotificationType for details. |
ProtoOAMarginCallTriggerEvent
The event that is sent when the account margin level reaches the target marginLevelThreshold. The event is sent no more than once every 10 minutes to avoid spamming.
Required | Type | Field Name | Description |
---|---|---|---|
optional | ProtoOAPayloadType | payloadType | The unique identifier of the request, response or event command. |
required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. Used to match responses to the Trader’s Accounts. |
repeated | ProtoOAMarginCall | marginCall | The margin call entity specifies a threshold for the exact margin call type. Only 3 instances of margin calls are supported, identified by marginCallType. See ProtoOANotificationType for details. |