ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[原文网址](https://connect.spotware.com/docs/open_api_2/protobuf_messages_reference_v2/open_api_messages) [Open API Messages .proto file](https://github.com/spotware/Open-API-2.0-protobuf-messages/blob/master/OpenApiMessages.proto) **ProtoOAApplicationAuthReq** *要求授权应用程序与cTrader平台代理一起使用。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | string | clientId | The unique Client ID provided during the registration. | | required | string | clientSecret | The unique Client Secret provided during the registration. | **ProtoOAApplicationAuthRes** *对 ProtoOAApplicationAuthReq 请求的响应。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | **ProtoOAAccountAuthReq** *要求授权交易账户会话。 需要与客户端应用程序建立授权连接。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | 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** *对ProtoOAAccountAuthReq请求的响应。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. | **ProtoOAErrorRes** *发生错误时的通用响应。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | 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. | **ProtoOAClientDisconnectEvent** *服务器取消与客户端应用程序的连接时发送的事件。 交易者账户的所有会话将被终止。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | optional | string | reason | The disconnection reason explained. For example: The application access was blocked by cTrader Administrator. | **ProtoOAAccountsTokenInvalidatedEvent** *服务器取消与特定交易者帐户的连接时发生的事件。 将保留与其他交易者账户的现有联系。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | repeated | int64 | ctidTraderAccountIds | Unique identifier of the Trader's Account. Used to match Responses to Trader's Accounts. | | optional | string | reason | The disconnection reason explained. For example: Access Token is expired or recalled. | **ProtoOAVersionReq** *代理版本请求。 可用于检查.proto文件是否过时。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | **ProtoOAVersionRes** *对ProtoOAVersionReq请求的响应。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | string | version | The current version of the server application. | **ProtoOANewOrderReq** *发送新交易订单的请求。 仅当accessToken字段具有交易账户的“交易”权限时才允许。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | A unique identifier of the Trader Account. Used to match responses to the Trader’s Accounts | | required | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. | | required | ProtoOAOrderType | orderType | The type of order - MARKET, LIMIT, STOP, MARKET\_RANGE, STOP\_LIMIT. | | required | ProtoOATradeSide | tradeSide | Trading 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 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 MARKER orders. | | optional | double | takeProfit | The absolute Take Profit price (1.23456 for example). Unsupported for the MARKER orders. | | optional | string | comment | User-specified comment. MaxLength = 512. | | optional | double | baseSlippagePrice | Base price to calculate relative slippage price for MARKET\_RANGE order. | | optional | int32 | slippageInPoints | Slippage distance for MARKET\_RANGE and STOP\_LIMIT order. | | optional | string | label | User-specified label. MaxLength = 100. | | optional | int64 | positionId | Reference to the existing position if the Order is intended to modify it. | | optional | string | clientOrderId | Optional user-specific clientOrderId (similar to FIX ClOrderID). MaxLength=50. | | optional | int64 | relativeStopLoss | Relative Stop Loss that can be specified instead of the absolute as one. Specified in 1/100'000 of unit of a price. For BUY stopLoss = entryPrice - relativeStopLoss, for SELL stopLoss = entryPrice + relativeStopLoss. | | optional | int64 | relativeTakeProfit | Relative Take Profit that can be specified instead of the absolute one. Specified in 1/100'000 of unit of a price. For BUY takeProfit = entryPrice + relativeTakeProfit, for SELL takeProfit = entryPrice - relativeTakeProfit. | | optional | bool | guaranteedStopLoss | If TRUE then stopLoss is guaranteed. Avalible for the French Risk or the Guaranteed Stop Loss Accounts. | | optional | bool | trailingStopLoss | If TRUE, then the Stop Loss is Trailing. | | optional | ProtoOAOrderTriggerMethod | stopTriggerMethod | The trigger method for the STOP or the STOP\_LIMIT pending orders. | **ProtoOAExecutionEvent** *在成功获得订单或服务器执行后发送的事件。 作为对ProtoOANewOrderReq,ProtoOACancelOrderReq,ProtoOAAmendOrderReq,ProtoOAAmendPositionSLTPReq,ProtoOAClosePositionReq请求的响应。 此外,该事件是在存款/借款发生时发送的。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | Unique identifier of the Trader's Account. Used to match Responses to 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** *要求取消现有挂单。 仅当accessToken字段具有交易账户的“交易”权限时才允许。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | Unique identifier of the Trader's Account. Used to match Responses to Trader's Accounts. | | required | int64 | orderId | The unique ID of an order to be canceled. | **ProtoOAAmendOrderReq** *要求修改现有挂单。 仅当accessToken具有交易账户的“交易”权限时才允许。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | 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 MARKER orders. | | optional | double | takeProfit | The absolute Take Profit price (1.23456 for example). Not supported for the MARKER 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. Sepcified in 1/100'000 of a unit of price. For BUY stopLoss = entryPrice - relativeStopLoss, for SELL stopLoss = entryPrice + relativeStopLoss. | | 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 takeProfit = entryPrice + relativeTakeProfit, for SELL takeProfit = entryPrice - relativeTakeProfit. | | 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** *要求修改现有头寸的StopLoss和TakeProfit。 仅当accessToken具有交易账户的“交易”权限时才允许。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | Unique identifier of the Trader's Account. Used to match Responses to Trader's Accounts. | | required | int64 | positionId | The unique ID 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 trigger method for the Stop Loss or the Take Profit orders. | **ProtoOAClosePositionReq** *要求关闭现有职位。 仅当accessToken具有交易账户的“交易”权限时才允许。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | required | int64 | positionId | The unique ID of the position to close. | | required | int64 | volume | Volume to close, represented in 0.01 of a unit (e.g. cents). | **ProtoOATrailingSLChangedEvent** *由于价格水平变化导致追踪止损水平发生变化时发生的事件。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | Unique identifier of the Trader's Account. Used to match Responses to Trader's Accounts. | | required | int64 | positionId | The unique ID of the position to close. | | required | int64 | orderId | The unique ID 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** *请求交易者账户可用的资产清单。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | Unique identifier of the Trader's Account. Used to match Responses to Trader's Accounts. | **ProtoOAAssetListRes** *响应ProtoOAAssetListReq请求。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | Unique identifier of the Trader's Account. Used to match Responses to Trader's Accounts. | | repeated | ProtoOAAsset | asset | The list of assets. | **ProtoOASymbolsListReq** *请求交易者账户服务器上可用的符号列表。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | Unique identifier of the Trader's Account. Used to match Responses to Trader's Accounts. | **ProtoOASymbolsListRes** *响应ProtoOASymbolsListReq请求。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | Unique identifier of the Trader's Account. Used to match Responses to Trader's Accounts. | | repeated | ProtoOALightSymbol | symbol | The list of symbols. | **ProtoOASymbolByIdReq** *请求获取完整的Symbol实体。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | Unique identifier of the Trader's Account. Used to match Responses to Trader's Accounts. | | repeated | int64 | symbolId | Unique identifier of the Symbol in cTrader platform. | **ProtoOASymbolByIdRes** *对ProtoOASymbolByIdReq请求的响应。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | Unique identifier of the Trader's Account. Used to match Responses to Trader's Accounts. | | repeated | ProtoOASymbol | symbol | Symbol entity with the full set of fields. | **ProtoOASymbolsForConversionReq** *请求获取由多个符号组成的两个资产之间的转换链。 在没有直接报价的情况下使用。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | Unique identifier of the Trader's Account. Used to match Responses to Trader's Accounts. | | required | int64 | firstAssetId | The ID of the first asset in the conversation chain. | | required | int64 | lastAssetId | The ID of the last asset in the conversation chain. | **ProtoOASymbolsForConversionRes** *对ProtoOASymbolsForConversionReq请求的响应。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | Unique identifier of the Trader's Account. Used to match Responses to Trader's Accounts. | | repeated | ProtoOALightSymbol | symbol | Conversion chain of the symbols (e.g. EUR/USD, USD/JPY, GBP/JPY -> EUR/GBP). | **ProtoOASymbolChangedEvent** *在服务器端更改符号时发送的事件。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | repeated | int64 | symbolId | A unique identifier of the Symbol in cTrader platform. | **ProtoOAAssetClassListReq** *索取交易者账户可用的资产类别列表。* *Request for a list of asset classes available for the trader's account.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | A unique identifier of the Trader's Account. Used to match responses to Trader's Accounts. | **ProtoOAAssetClassListRes** *对ProtoOAAssetListReq请求的响应。* *The response to the ProtoOAAssetListReq request.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | repeated | ProtoOAAssetClass | assetClass | List of the asset classes. | **ProtoOATraderReq** *要求获取交易者账户的数据。* *Request for getting data of Trader's Account.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | **ProtoOATraderRes** *对ProtoOATraderReq请求的响应。* *Response to the ProtoOATraderReq request.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | required | ProtoOATrader | trader | The Trader account information. | **ProtoOATraderUpdatedEvent** *在服务器端更新交易者时发送的事件。* *Event that is sent when a Trader is updated on Server side.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | required | ProtoOATrader | trader | The Trader account information. | **ProtoOAReconcileReq** *要求获取交易者当前未平仓头寸和挂单数据。* *Request for getting Trader's current open positions and pending orders data.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | **ProtoOAReconcileRes** *对ProtoOAReconcileReq请求的响应。* *The response to the ProtoOAReconcileReq request.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | repeated | ProtoOAPosition | position | The list of trader's account open positions. | | repeated | ProtoOAOrder | order | The list of trader's account pending orders. | **ProtoOAOrderErrorEvent** 在订单请求期间发生错误时发送的事件。 Event that is sent when errors occur during the order requests. | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | required | string | errorCode | The name of the ProtoErrorCode or the other custom ErrorCodes (e.g. ProtoCHErrorCode). | | optional | int64 | orderId | The unique ID of the order. | | optional | int64 | positionId | The unique ID of the position. | | optional | string | description | The error description. | **ProtoOADealListReq** *要求获得交易者的交易历史数据(执行细节)。* *Request for getting Trader's deals historical data (execution details).* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | 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** *对ProtoOADealListRes请求的响应。* *The response to the ProtoOADealListRes request.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | repeated | ProtoOADeal | deal | The list of the deals. | | repeated | bool | hasMore | If TRUE then the response will provide more than 10000 deals. | **ProtoOAExpectedMarginReq** *要求获得保证金估算。 可在发送新订单请求之前使用。* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | required | int64 | symbolId | A unique identifier of the Symbol in cTrader platform. | | repeated | int64 | volume | Volume represented in 0.01 of a unit (e.g. cents). | **ProtoOAExpectedMarginRes** *对ProtoOAExpectedMarginReq请求的响应。* *The response to the ProtoOAExpectedMarginReq request.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | repeated | ProtoOAExpectedMargin | margin | The buy and sell margin estimate. | **ProtoOAMarginChangedEvent** *更改分配给特定职位的保证金时发送的事件。* *Event that is sent when the margin allocated to a specific position is changed.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | required | uint64 | positionId | The unique ID of the position. | | required | uint64 | usedMargin | The new value of the margin used. | **ProtoOACashFlowHistoryListReq** *要求获取交易者的存款和取款历史数据。* *Request for getting Trader's historical data of deposits and withdrawals.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | 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** *对ProtoOACashFlowHistoryListReq请求的响应。* *Response to the ProtoOACashFlowHistoryListReq request.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | repeated | ProtoOADepositWithdraw | depositWithdraw | The list of deposit and withdrawal operations. | **ProtoOAGetAccountListByAccessTokenReq** *要求获取授权交易者的访问令牌帐户列表。* *Request for getting the list of granted trader's account for the access token.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | string | accessToken | The Access Token issued for providing access to the Trader's Account. | **ProtoOAGetAccountListByAccessTokenRes** *对ProtoOAGetAccountListByAccessTokenReq请求的响应。* *Response to the ProtoOAGetAccountListByAccessTokenReq request.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | string | accessToken | The Access Token issued for providing access to the Trader's Account. | | optional | ProtoOAClientPermissionScope | permissionScope | The sco0pe of permissions - SCOPE\_VIEW or SCOPE\_TRADE. | | repeated | ProtoOACtidTraderAccount | ctidTraderAccountIds | The list of the accounts IDs. | **Quotes** **ProtoOASubscribeSpotsReq** | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | repeated | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. | **ProtoOASubscribeSpotsRes** *Response to the ProtoOASubscribeSpotsReq request.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | **ProtoOAUnsubscribeSpotsReq** *要求取消订阅指定符号的现场活动。* *Request for unsubscribing from the spot events of the specified symbol.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | repeated | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. | **ProtoOAUnsubscribeSpotsRes** *Response to the ProtoOASubscribeSpotsRes request.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | **ProtoOASpotEvent** *在服务器端生成新的spot事件时发送的事件。 需要订阅现场活动,请参阅ProtoOASubscribeSpotsReq.* *Event that is sent 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 | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | required | int64 | symbolId | Unique identifier of the Symbol in cTrader platform. | | optional | uint64 | bid | Bid price. | | optional | uint64 | ask | Ask price. | | repeated | ProtoOATrendbar | trendbar | Returns live trend bar. Requires subscription on the trend bars. | **ProtoOASubscribeLiveTrendbarReq** *请求订阅实时趋势栏。 需要订阅现场活动,请参阅ProtoOASubscribeSpotsReq。* *Request for subscribing for live trend bars. Requires subscription on the spot events, see ProtoOASubscribeSpotsReq.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | required | ProtoOATrendbarPeriod | period | Specifies period of trend bar series (e.g. M1, M10, etc.). | | repeated | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. | **ProtoOAUnsubscribeLiveTrendbarReq** *要求从实时趋势栏中取消订阅。* *Request for unsubscribing from the live trend bars.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | required | ProtoOATrendbarPeriod | period | Specifies period of trend bar series (e.g. M1, M10, etc.). | | repeated | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. | **ProtoOAGetTrendbarsReq** *要求获取符号的历史趋势条。* *Request for getting historical trend bars for the symbol.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | 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 period of trend bar series (e.g. M1, M10, etc.). | | required | int64 | symbolId | Unique identifier of the Symbol in cTrader platform. | **ProtoOAGetTrendbarsRes** *Response to the ProtoOAGetTrendbarsReq request.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | required | ProtoOATrendbarPeriod | period | Specifies period of trend bar series (e.g. M1, M10, etc.). | | required | int64 | timestamp | Equals to toTimestamp from the request. | | repeated | int64 | imbolId | Unique identifier of the Symbol in cTrader platform. | **ProtoOAGetTickDataReq** *要求获取符号的历史刻度数据。* *Request for getting historical tick data for the symbol.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | 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 bigger of 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** *对ProtoOAGetTickDataReq请求的响应。* *Response to the ProtoOAGetTickDataReq request.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | repeated | ProtoOATickData | tickData | The list of ticks. | | required | bool | hasMore | If TRUE then the number of records by filter is larger than chunkSize, the response contains the number of records that is equal to chunkSize. | **End Quotes** **ProtoOAGetCtidProfileByTokenReq** *要求获取交易者个人资料的详细信息。 受GDRP要求限制。* *Request for getting details of Trader's profile. Limited due to GDRP requirements.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | string | accessToken | The Access Token issued for providing access to the Trader's Account. | **ProtoOAGetCtidProfileByTokenRes** *Response to the ProtoOAGetCtidProfileByTokenReq request.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | ProtoOACtidProfile | profile | Trader's profile. | **ProtoOADepthEvent** *市场深度结构发生变化时发送的事件。 需要订阅符号的市场深度,请参阅ProtoOASubscribeDepthQuotesReq。* *Event that is sent when the structure of the depth of market is changed. Requires subscription on the depth of markets for the symbol, see ProtoOASubscribeDepthQuotesReq.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | 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** *要求订阅指定符号的市场深度。* *Request for subscribing on depth of market of the specified symbol.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | required | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. | **ProtoOASubscribeDepthQuotesRes** *Response to the ProtoOASubscribeDepthQuotesReq request.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | **ProtoOAUnsubscribeDepthQuotesReq** *要求取消订阅指定符号的市场深度。* *Request for unsubscribing from the depth of market of the specified symbol.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | | required | int64 | symbolId | The unique identifier of the Symbol in cTrader platform. | **ProtoOAUnsubscribeDepthQuotesRes** *Response to the ProtoOAUnsubscribeDepthQuotesReq request.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique Trader's Account ID used to match the responses to the Trader's Account. | **ProtoOAAccountLogoutReq** *要求注销交易账户并关闭会话。 需要与客户端应用程序建立授权连接。* *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 | | | required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. | **ProtoOAAccountLogoutRes** *Response to the ProtoOATraderLogoutReq request.* | **Required** | **Type** | **Field Name** | **Description** | | --- | --- | --- | --- | | optional | ProtoOAPayloadType | payloadType | | | required | int64 | ctidTraderAccountId | The unique identifier of the Trader's Account in cTrader platform. |