Get desktop application:
View/edit binary Protocol Buffers messages
COMMON error codes 1 - 99
Generic error.
Message is not supported. Wrong message.
Generic error. Usually used when input value is not correct.
Deal execution is reached timeout and rejected.
Generic error for requests by id.
Connection to Server is lost or not supported.
Message is too large.
Market is closed.
Order is blocked (e.g. under execution) and change cannot be applied.
Message is blocked by server or rate limit is reached.
* Error response that is sent from Open API proxy when error occurs.
Contains name of ProtoErrorCode or other custom ErrorCodes (e.g. ProtoCHErrorCode).
Error description.
The Unix time in milliseconds of the end of the maintenance.
* Event that is sent from Open API proxy and can be used as criteria that connection is healthy when no other messages are sent by cTrader platform. Open API client can send this message when he needs to keep the connection open for a period without other messages longer than 30 seconds.
* Base message that is used for all messages that are sent to/from Open API proxy of cTrader platform.
Contains id of ProtoPayloadType or other custom PayloadTypes (e.g. ProtoOAPayloadType).
Serialized protobuf message that corresponds to payloadType.
Request message id, assigned by the client that will be returned in the response.
* Enum for specifying access right for a trader.
Used in:
Enable all trading.
Only closing trading request are enabled.
View only access.
No access.
* Request for authorizing of the trading account session. Requires established authorized connection with the client application using ProtoOAApplicationAuthReq.
The unique identifier of the trader's account in cTrader platform.
The Access Token issued for providing access to the Trader's Account.
* Response to the ProtoOAApplicationAuthRes request.
The unique identifier of the trader's account in cTrader platform.
* 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.
The unique identifier of the trader's account in cTrader platform.
* Request for logout of trading account session.
The unique identifier of the trader's account in cTrader platform.
* Response to the ProtoOAAccountLogoutReq request. Actual logout of trading account will be completed on ProtoOAAccountDisconnectEvent.
The unique identifier of the trader's account in cTrader platform.
* Enum for specifying type of an account.
Used in:
Allows multiple positions on a trading account for a symbol.
Only one position per symbol is allowed on a trading account.
Spread betting type account.
* Event that is sent when a session to a specific trader's account is terminated by the server but the existing connections with the other trader's accounts are maintained. Reasons to trigger: account was deleted, cTID was deleted, token was refreshed, token was revoked.
The unique identifier of the trader's account in cTrader platform.
The disconnection reason explained. For example: Access Token is expired or recalled.
* Request for amending the existing pending order. Allowed only if the Access Token has "trade" permissions for the trading account.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The unique ID of the order.
Volume, represented in 0.01 of a unit (e.g. 1000 in protocol means 10.00 units).
The Limit Price, can be specified for the LIMIT order only.
The Stop Price, can be specified for the STOP and the STOP_LIMIT orders.
The Unix timestamp in milliseconds of Order expiration. Should be set for the Good Till Date orders.
The absolute Stop Loss price (e.g. 1.23456). Not supported for MARKET orders.
The absolute Take Profit price (e.g. 1.23456). Not supported for MARKET orders.
Slippage distance for the MARKET_RANGE and the STOP_LIMIT orders.
The relative Stop Loss can be specified instead of the absolute one. Specified in 1/100000 of a unit of price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) For BUY stopLoss = entryPrice - relativeStopLoss, for SELL stopLoss = entryPrice + relativeStopLoss.
The relative Take Profit can be specified instead of the absolute one. Specified in 1/100000 of a unit of price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) For BUY takeProfit = entryPrice + relativeTakeProfit, for SELL takeProfit = entryPrice - relativeTakeProfit.
If TRUE then the Stop Loss is guaranteed. Available for the French Risk or the Guaranteed Stop Loss Accounts.
If TRUE then the Trailing Stop Loss is applied.
Trigger method for the STOP or the STOP_LIMIT pending order.
* Request for amending StopLoss and TakeProfit of existing position. Allowed only if the accessToken has "trade" permissions for the trading account.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The unique ID of the position to amend.
Absolute Stop Loss price (1.23456 for example).
Absolute Take Profit price (1.26543 for example).
If TRUE then the Stop Loss is guaranteed. Available for the French Risk or the Guaranteed Stop Loss Accounts.
If TRUE then the Trailing Stop Loss is applied.
The Stop trigger method for the Stop Loss/Take Profit order.
* Request for the authorizing an application to work with the cTrader platform Proxies.
The unique Client ID provided during the registration.
The unique Client Secret provided during the registration.
* Response to the ProtoOAApplicationAuthReq request.
Used in: ,
The unique identifier of the symbol in specific server environment within cTrader platform. Different brokers might have different IDs.
Name of the symbol (e.g. EUR/USD).
The Unix time in milliseconds of the last update of the symbol.
Description of the symbol.
* Asset entity.
Used in:
The unique asset ID.
The asset name.
User friendly name.
Precision of the asset.
* Asset class entity.
Used in:
Unique asset ID.
Asset class name.
The number used for sorting Asset Classes in the UI (lowest number should appear at the top).
* Request for a list of asset classes available for the trader's account.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
* Response to the ProtoOAAssetListReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
List of the asset classes.
* Request for the list of assets available for a trader's account.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
* Response to the ProtoOAAssetListReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The list of assets.
* Bonus deposit/withdrawal entity.
Used in:
Type of the operation. Deposit/Withdrawal.
The unique ID of the bonus deposit/withdrawal operation.
Total amount of broker's bonus after the operation.
Amount of bonus deposited/withdrew by manager.
Total amount of introducing broker's bonus after the operation.
Amount of bonus deposited/withdrew by introducing broker.
The Unix time in milliseconds when the bonus operation was executed.
Note added to operation. Visible to the trader.
ID of introducing broker who deposited/withdrew bonus.
Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects managerBonus, managerDelta, ibBonus, ibDelta.
* Request for cancelling existing pending order. Allowed only if the accessToken has "trade" permissions for the trading account.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The unique ID of the order.
* Request for getting Trader's historical data of deposits and withdrawals.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The Unix time from which the search starts >=0 (1st Jan 1970). Validation: toTimestamp - fromTimestamp <= 604800000 (1 week).
The Unix time where to stop searching <= 2147483646000 (19th Jan 2038).
* Response to the ProtoOACashFlowHistoryListReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The list of deposit and withdrawal operations.
* Balance operation entity. Covers all cash movement operations related to account, trading, IB operations, mirroring, etc.
Used in:
Cash deposit.
Cash withdrawal.
Received mirroring commission.
Paid mirroring commission.
For IB account. Commissions paid by trader.
For IB account. Withdrawal of commissions shared with broker.
For IB account. Commissions paid by sub-ibs.
For IB account. Commissions paid by broker.
Deposit rebate for trading volume for period.
Withdrawal of rebate.
Mirroring commission.
Mirroring commission.
For IB account. Share commission with the Broker.
IB commissions.
Deposit dividends payments.
Negative dividend charge for short position.
Charge for guaranteedStopLoss.
Charge of rollover fee for Shariah compliant accounts.
Broker's operation to deposit bonus.
Broker's operation to withdrawal bonus.
Deposits of negative SWAP.
SWAP charges.
Mirroring commission.
Mirroring commission. Deprecated since 7.1 in favor of BALANCE_WITHDRAW_COPY_FEE (34).
Mirroring commission.
Withdraw for subaccount creation (cTrader Copy).
Deposit to subaccount on creation (cTrader Copy).
Manual user's withdraw from subaccount (cTrader Copy), to parent account.
Manual user's deposit to subaccount (cTrader Copy), from parent account.
Withdrawal fees to Strategy Provider.
Withdraw of inactivity fee from the balance.
Deposit within the same server (from another account).
Withdraw within the same server (to another account).
Bonus being converted from virtual bonus to real deposit.
Applies if negative balance protection is configured by broker, should make balance = 0.
* Bonus operation type ENUM.
Used in:
* Event that is sent when the connection with the client application is cancelled by the server. All the sessions for the traders' accounts will be terminated.
The disconnection reason explained. For example: The application access was blocked by cTrader Administrator.
* Open API application permission in regards to token ENUM.
Used in:
Allows to use only view commends. Trade is prohibited.
Allows to use all commands.
* Trading details for closing deal.
Used in:
Position price at the moment of filling the closing order.
Amount of realized gross profit after closing deal execution.
Amount of realized swap related to closed volume.
Amount of realized commission related to closed volume.
Account balance after closing deal execution.
Quote/Deposit currency conversion rate on the time of closing deal execution.
Closed volume in cents.
Balance version of the account related to closing deal operation.
Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects grossProfit, swap, commission, balance, pnlConversionFee.
Fee for conversion applied to the Deal in account's ccy when trader symbol's quote asset id <> ProtoOATrader.depositAssetId.
* Request for closing or partially closing of an existing position. Allowed only if the accessToken has "trade" permissions for the trading account.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The unique ID of the position to close.
Volume to close, represented in 0.01 of a unit (e.g. 1000 in protocol means 10.00 units).
* Enum for specifying type of trading commission.
Used in:
USD per million USD volume - usually used for FX. Example: 50 USD for 1 mil USD of trading volume.
USD per 1 lot - usually used for CFDs and futures for commodities, and indices. Example: 15 USD for 1 contract.
Percentage of trading volume - usually used for Equities. Example: 0.005% of notional trading volume. Multiplied by 100,000.
Quote ccy of Symbol per 1 lot - will be used for CFDs and futures for commodities, and indices. Example: 15 EUR for 1 contract of DAX.
* Trader profile entity. Empty due to GDPR.
Used in:
* Trader account entity.
Used in:
Unique identifier of the trader's account. Used to match responses to trader's accounts.cTrader platform. Different brokers might have different ids
If TRUE then the account is belong to Live environment and live host must be used to authorize it
TraderLogin for a specific account. Value is displayed on Client App UI
The Unix time in milliseconds of the last ProtoOAClosePositionDetail happened to this account.
The Unix time in milliseconds of the last ProtoOADepositWithdraw happened to this account.
The name of the broker to which the account belongs to. Shortened to be displayed in the UI.
Used in:
* Execution entity.
Used in: , , ,
The unique ID of the execution deal.
Source order of the deal.
Source position of the deal.
Volume sent for execution, in cents.
Filled volume, in cents.
The unique identifier of the symbol in specific server environment within cTrader platform. Different servers have different IDs.
The Unix time in milliseconds when the deal was sent for execution.
The Unix time in milliseconds when the deal was executed.
The Unix time in milliseconds when the deal was created, executed or rejected.
Execution price.
Buy/Sell.
Status of the deal.
Rate for used margin computation. Represented as Base/Deposit.
Amount of trading commission associated with the deal.
Base to USD conversion rate on the time of deal execution.
Closing position detail. Valid only for closing deal.
Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects commission.
* Request for retrieving the deals related to a position.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The unique ID of the position.
The Unix time in milliseconds of starting the search. Must be bigger or equal to zero (1st Jan 1970).
The Unix time in milliseconds of finishing the search. <= 2147483646000 (19th Jan 2038).
* Response to the ProtoOADealListByPositionIdReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The list of deals.
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.
* Request for getting Trader's deals historical data (execution details).
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The Unix time from which the search starts >=0 (1st Jan 1970).
The Unix time where to stop searching <= 2147483646000 (19th Jan 2038).
The maximum number of the deals to return.
* The response to the ProtoOADealListRes request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The list of the deals.
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.
* Deal details for ProtoOADealOffsetListReq.
Used in:
The unique ID of the execution Deal.
Matched volume, in cents.
The Unix time in milliseconds when the offset Deal was executed.
Execution price of the offset Deal.
* Request for getting sets of Deals that were offset by a specific Deal and that are offsetting the Deal.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The unique ID of the Deal.
* Response for ProtoOADealOffsetListReq.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Deals which closed the specified deal.
Deals which were closed by the specified deal.
* Deal status ENUM.
Used in:
Deal filled.
Deal is partially filled.
Deal is correct but was rejected by liquidity provider (e.g. no liquidity).
Deal rejected by server (e.g. no price quotes).
Deal is rejected by LP due to error (e.g. symbol is unknown).
Liquidity provider did not sent response on the deal during specified execution time period.
* Account deposit/withdrawal operation entity.
Used in: ,
Type of the operation. Deposit/Withdrawal.
The unique ID of the deposit/withdrawal operation.
Account balance after the operation was executed.
Amount of deposit/withdrawal operation.
The Unix time in milliseconds when deposit/withdrawal operation was executed.
Note added to operation. Visible to the trader.
Balance version used to identify the final balance. Increments each time when the trader's account balance is changed.
Total account's equity after balance operation was executed.
Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects balance, delta, equity.
* Event that is sent when the structure of depth of market is changed. Requires subscription on the depth of markets for the symbol, see ProtoOASubscribeDepthQuotesReq.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Unique identifier of the Symbol in cTrader platform.
The list of changes in the depth of market quotes.
The list of quotes to delete.
* Depth of market entity.
Used in:
Quote ID.
Quote size in cents.
Bid price for bid quotes.
Ask price for ask quotes.
Used in:
Unique ID of dynamic leverage.
Tiers sorted by volume. Last tier's leverage is applied also to volume above specified.
Used in:
Max USD volume (in cents) of the Open Position (per side) to apply specified leverage. Last tier's leverage is applied also to volume above specified.
Applied leverage.
* Error code ENUM.
Authorization
When token used for account authorization is expired.
When account is not authorized.
When such account no longer exists.
When client tries to authorize after it was already authorized.
When account is disabled.
Open API client is not activated or wrong client credentials.
When a command is sent for not authorized Open API client.
Client is trying to authenticate twice.
Access token is invalid.
Trading service is not available.
Trading account is not found.
Could not find this client id.
General
Request frequency is reached.
Server is under maintenance.
Operations are not allowed for this account.
Limit of connections is reached for this Open API client.
Not allowed to increase risk for Positions with Guaranteed Stop Loss.
Trading disabled because symbol has holiday.
Pricing
When trying to subscribe to depth, trendbars, etc. without spot subscription.
When subscription is requested for an active.
Symbol not found.
Note: to be merged with SYMBOL_NOT_FOUND.
When requested period (from,to) is too large or invalid values are set to from/to.
Trading
Trading cannot be done as not quotes are available. Applicable for Book B.
Not enough funds to allocate margin.
Max exposure limit is reached for a {trader, symbol, side}.
Position not found.
Order not found.
When trying to close a position that it is not open.
Position in the state that does not allow to perform an operation.
Trading account reached its limit for max number of open positions and orders.
Invalid volume.
Invalid stop price.
Invalid price (e.g. negative).
Invalid stake volume (e.g. negative).
Invalid protection prices.
Invalid expiration.
Unable to apply changes as position has an order under execution.
Trading is blocked for the symbol.
Trading account is in read only mode.
Unable to cancel order.
Unable to amend order.
Short selling is not allowed.
* Generic response when an ERROR occurred.
The unique identifier of the trader's account in cTrader platform.
The name of the ProtoErrorCode or the other custom ErrorCodes (e.g. ProtoCHErrorCode).
The error description.
The Unix time in seconds when the current maintenance session will be ended.
When you hit rate limit with errorCode=BLOCKED_PAYLOAD_TYPE, this field will contain amount of seconds until related payload type will be unlocked.
* Event that is sent following the successful order acceptance or execution by the server. Acts as response to the ProtoOANewOrderReq, ProtoOACancelOrderReq, ProtoOAAmendOrderReq, ProtoOAAmendPositionSLTPReq, ProtoOAClosePositionReq requests. Also, the event is sent when a Deposit/Withdrawal took place.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Type of the order operation. For example: ACCEPTED, FILLED, etc.
Reference to the position linked with the execution
Reference to the initial order.
Reference to the deal (execution).
Reference to the Bonus Deposit or Withdrawal operation.
Reference to the Deposit or Withdrawal operation.
The name of the ProtoErrorCode or the other custom ErrorCodes (e.g. ProtoCHErrorCode).
If TRUE then the event generated by the server logic instead of the trader's request. (e.g. stop-out).
* Execution event type ENUM.
Used in:
Order passed validation.
Order filled.
Pending order is changed with a new one.
Order cancelled.
Order with GTD time in force is expired.
Order is rejected due to validations.
Cancel order request is rejected.
Type related to SWAP execution events.
Type related to event of deposit or withdrawal cash flow operation.
Order is partially filled.
Type related to event of bonus deposit or bonus withdrawal.
* Expected margin computation entity.
Used in:
Volume in cents used for computation of expected margin.
Buy margin amount.
Sell margin amount.
* Request for getting the margin estimate according to leverage profiles. Can be used before sending a new order request. This doesn't consider ACCORDING_TO_GSL margin calculation type, as this calculation is trivial: usedMargin = (VWAP price of the position - GSL price) * volume * Quote2Deposit.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Unique identifier of the Symbol in cTrader platform.
Volume represented in 0.01 of a unit (e.g. 1000 in protocol means 10.00 units).
* The response to the ProtoOAExpectedMarginReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The buy and sell margin estimate.
Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects margin.buyMargin, margin.sellMargin.
* Request for getting the list of granted trader's account for the access token.
The Access Token issued for providing access to the Trader's Account.
* Response to the ProtoOAGetAccountListByAccessTokenReq request.
The Access Token issued for providing access to the Trader's Account.
SCOPE_VIEW, SCOPE_TRADE.
The list of the accounts.
* Request for getting details of Trader's profile. Limited due to GDRP requirements.
The Access Token issued for providing access to the Trader's Account.
* Response to the ProtoOAGetCtidProfileByTokenReq request.
Trader's profile.
* Request for getting a dynamic leverage entity referenced in ProtoOASymbol.leverageId.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
* Response to the ProtoOAGetDynamicLeverageByIDReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
* Request for getting trader's positions' unrealized PnLs.
The unique identifier of the trader's account in cTrader platform.
* Response to ProtoOAGetPositionUnrealizedPnLReq request.
The unique identifier of the trader's account in cTrader platform.
Information about trader's positions' unrealized PnLs.
Specifies the exponent of various monetary values. E.g., moneyDigits = 8 should be interpreted as the value multiplied by 10^8 with the 'real' value equal to 10053099944 / 10^8 = 100.53099944. Affects positionUnrealizedPnL.grossUnrealizedPnL, positionUnrealizedPnL.netUnrealizedPnL.
* Request for getting historical tick data for the symbol.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Unique identifier of the Symbol in cTrader platform.
Bid/Ask (1/2).
The Unix time in milliseconds of starting the search. Must be bigger or equal to zero (1st Jan 1970).
The Unix time in milliseconds of finishing the search. <= 2147483646000 (19th Jan 2038).
* Response to the ProtoOAGetTickDataReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The list of ticks is in chronological order (newest first). The first tick contains Unix time in milliseconds while all subsequent ticks have the time difference in milliseconds between the previous and the current one.
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.
* Request for getting historical trend bars for the symbol.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The Unix time in milliseconds from which the search starts. Must be bigger or equal to zero (1st Jan 1970).
The Unix time in milliseconds of finishing the search. Smaller or equal to 2147483646000 (19th Jan 2038).
Specifies period of trend bar series (e.g. M1, M10, etc.).
Unique identifier of the Symbol in cTrader platform.
Limit number of trend bars in response back from toTimestamp.
* Response to the ProtoOAGetTrendbarsReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Specifies period of trend bar series (e.g. M1, M10, etc.).
Simply don't use this field, as your original request already contains toTimestamp.
The list of trend bars.
Unique identifier of the Symbol in cTrader platform.
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.
Used in:
Unique ID of holiday.
Name of holiday.
Description of holiday.
Timezone used for holiday.
Amount of days from 1st Jan 1970, multiply it by 86400000 to get Unix time in milliseconds.
If TRUE, then the holiday happens each year.
Amount of seconds from 00:00:00 of the holiday day when holiday actually starts.
Amount of seconds from 00:00:00 of the holiday day when holiday actually finishes.
* Symbol trading session entity.
Used in:
Interval start, specified in seconds starting from SUNDAY 00:00 in specified time zone (inclusive to the interval).
Interval end, specified in seconds starting from SUNDAY 00:00 in specified time zone (exclusive from the interval).
* Lightweight symbol entity.
Used in: ,
The unique identifier of the symbol in specific server environment within cTrader platform. Different brokers might have different IDs.
Name of the symbol (e.g. EUR/USD).
If TRUE then symbol is visible for traders.
Base asset.
Quote asset.
Id of the symbol category used for symbols grouping.
The number used for sorting Symbols in the UI (lowest number should appear at the top).
Used in:
* Margin call entity, specifies threshold for exact margin call type. Only 3 instances of margin calls are supported, identified by marginCallType. See ProtoOANotificationType for details.
Used in: , , ,
Type of margin call. All margin calls are similar, only difference is in marginLevelThreshold.
Margin level threshold for margin call.
The Unix time in milliseconds of the last update of the margin call.
* Request for a list of existing margin call thresholds configured for a user.
* Response with a list of existing user Margin Calls, usually contains 3 items.
* Event that is sent when account margin level reaches target marginLevelThreshold. Event is sent no more than once every 10 minutes to avoid spamming.
* Event that is sent when a Margin Call threshold configuration is updated.
* Request to modify marginLevelThreshold of specified marginCallType for ctidTraderAccountId.
* If this response received, it means that margin call was successfully updated.
* Event that is sent when the margin allocated to a specific position is changed.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The unique ID of the position.
The new value of the margin used.
Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects usedMargin.
* Enum for specifying type of minimum trading commission.
Used in:
* Request for sending a new trading order. Allowed only if the accessToken has the "trade" permissions for the trading account.
The unique identifier of the trader's account in cTrader platform.
The unique identifier of a symbol in cTrader platform.
The type of an order - MARKET, LIMIT, STOP, MARKET_RANGE, STOP_LIMIT.
The trade direction - BUY or SELL.
The volume represented in 0.01 of a unit (e.g. 1000 in protocol means 10.00 units).
The limit price, can be specified for the LIMIT order only.
Stop Price, can be specified for the STOP and the STOP_LIMIT orders only.
The specific order execution or expiration instruction - GOOD_TILL_DATE, GOOD_TILL_CANCEL, IMMEDIATE_OR_CANCEL, FILL_OR_KILL, MARKET_ON_OPEN.
The Unix time in milliseconds of Order expiration. Should be set for the Good Till Date orders.
The absolute Stop Loss price (1.23456 for example). Not supported for MARKET orders.
The absolute Take Profit price (1.23456 for example). Unsupported for MARKET orders.
User-specified comment. MaxLength = 512.
Base price to calculate relative slippage price for MARKET_RANGE order.
Slippage distance for MARKET_RANGE and STOP_LIMIT order.
User-specified label. MaxLength = 100.
Reference to the existing position if the Order is intended to modify it.
Optional user-specific clientOrderId (similar to FIX ClOrderID). MaxLength = 50.
Relative Stop Loss that can be specified instead of the absolute as one. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) For BUY stopLoss = entryPrice - relativeStopLoss, for SELL stopLoss = entryPrice + relativeStopLoss.
Relative Take Profit that can be specified instead of the absolute one. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) For BUY takeProfit = entryPrice + relativeTakeProfit, for SELL takeProfit = entryPrice - relativeTakeProfit.
If TRUE then stopLoss is guaranteed. Required to be set to TRUE for the Limited Risk accounts (ProtoOATrader.isLimitedRisk=true).
If TRUE then the Stop Loss is Trailing.
Trigger method for the STOP or the STOP_LIMIT pending order.
* Type of notification, currently only 3 instances of marginCall are supported.
Used in:
one of three margin calls, they are all similar.
one of three margin calls, they are all similar.
one of three margin calls, they are all similar.
* Trade order entity.
Used in: , , , ,
The unique ID of the order. Note: trader might have two orders with the same id if orders are taken from accounts from different brokers.
Detailed trader data.
Order type.
Order status.
The Unix time in milliseconds of expiration if the order has time in force GTD.
Price at which an order was executed. For order with FILLED status.
Part of the volume that was filled in cents (e.g. 1000 in protocol means 10.00 units).
The Unix time in milliseconds of the last update of the order.
Used for Market Range order with combination of slippageInPoints to specify price range were order can be executed.
Used for Market Range and STOP_LIMIT orders to to specify price range were order can be executed.
If TRUE then the order is closing part of whole position. Must have specified positionId.
Valid only for LIMIT orders.
Valid only for STOP and STOP_LIMIT orders.
Absolute stopLoss price.
Absolute takeProfit price.
Optional ClientOrderId. Max Length = 50 chars.
Order's time in force. Depends on order type.
ID of the position linked to the order (e.g. closing order, order that increase volume of a specific position, etc.).
Relative stopLoss that can be specified instead of absolute as one. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) For BUY stopLoss = entryPrice - relativeStopLoss, for SELL stopLoss = entryPrice + relativeStopLoss.
Relative takeProfit that can be specified instead of absolute one. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) ForBUY takeProfit = entryPrice + relativeTakeProfit, for SELL takeProfit = entryPrice - relativeTakeProfit.
If TRUE then order was stopped out from server side.
If TRUE then order is trailingStopLoss. Valid for STOP_LOSS_TAKE_PROFIT order.
Trigger method for the order. Valid only for STOP and STOP_LIMIT orders.
* Request for getting Order and its related Deals.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The unique ID of the Order.
* Response to the ProtoOAOrderDetailsReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Order details.
All Deals created by filling the specified Order.
* Event that is sent when errors occur during the order requests.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The name of the ProtoErrorCode or the other custom ErrorCodes (e.g. ProtoCHErrorCode).
The unique ID of the order.
The unique ID of the position.
The error description.
* Request for retrieving Orders related to a Position by using Position ID. Filtered by utcLastUpdateTimestamp.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The unique ID of the Position.
The Unix time from which the search starts >=0 (1st Jan 1970). Search by utcLastUpdateTimestamp of the Order.
The Unix time where to stop searching <= 2147483646000 (19th Jan 2038). Search by utcLastUpdateTimestamp of the Order.
* Response to ProtoOAOrderListByPositionIdReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Orders related to the specified Position, sorted by utcLastUpdateTimestamp in descending order (newest first).
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.
* Request for getting Trader's orders filtered by timestamp
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The Unix time from which the search starts >=0 (1st Jan 1970).
The Unix time where to stop searching <= 2147483646000 (19th Jan 2038).
* The response to the ProtoOAOrderListReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The list of the orders.
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.
* Order status ENUM.
Used in:
Order request validated and accepted for execution.
Order is fully filled.
Order is rejected due to validation.
Order expired. Might be valid for orders with partially filled volume that were expired on LP.
Order is cancelled. Might be valid for orders with partially filled volume that were cancelled by LP.
* Stop Order and Stop Loss triggering method ENUM.
Used in: , , , ,
Stop Order: buy is triggered by ask, sell by bid; Stop Loss Order: for buy position is triggered by bid and for sell position by ask.
Stop Order: buy is triggered by bid, sell by ask; Stop Loss Order: for buy position is triggered by ask and for sell position by bid.
The same as TRADE, but trigger is checked after the second consecutive tick.
The same as OPPOSITE, but trigger is checked after the second consecutive tick.
* Order type ENUM.
Used in: ,
Used in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
* Trade position entity.
Used in: ,
The unique ID of the position. Note: trader might have two positions with the same id if positions are taken from accounts from different brokers.
Position details. See ProtoOATradeData for details.
Current status of the position.
Total amount of charged swap on open position.
VWAP price of the position based on all executions (orders) linked to the position.
Current stop loss price.
Current take profit price.
The Unix time in milliseconds of the last change of the position, including amend SL/TP of the position, execution of related order, cancel or related order, etc.
Current unrealized commission related to the position.
Rate for used margin computation. Represented as Base/Deposit.
Amount of unrealized commission related to following of strategy provider.
If TRUE then position's stop loss is guaranteedStopLoss.
Amount of margin used for the position in deposit currency.
Stop trigger method for SL/TP of the position.
Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects swap, commission, mirroringCommission, usedMargin.
If TRUE then the Trailing Stop Loss is applied.
* Position status ENUM.
Used in:
Empty position is created for pending order.
Used in:
The position ID.
The gross unrealized PnL of the position denoted in the account deposit currency.
The net unrealized PnL of the position denoted in the account deposit currency. It does not include potential closing commission.
* Price quote type.
Used in:
* Request for getting Trader's current open positions and pending orders data.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
If TRUE, then current protection orders are returned separately, otherwise you can use position.stopLoss and position.takeProfit fields.
* The response to the ProtoOAReconcileReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The list of trader's account open positions.
The list of trader's account pending orders.
* Request to refresh the access token using refresh token of granted trader's account.
The Refresh Token issued for updating Access Token.
* Response to the ProtoOARefreshTokenReq request.
The Access Token issued for providing access to the Trader's Account.
bearer
Access Token expiration in seconds.
Your new Refresh Token.
* Event that is sent when a new spot event is generated on the server side. Requires subscription on the spot events, see ProtoOASubscribeSpotsReq. First event, received after subscription will contain latest spot prices even if market is closed.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Unique identifier of the Symbol in cTrader platform.
Bid price. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782)
Ask price. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782)
Returns live trend bar. Requires subscription on the trend bars.
Last session close. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782)
The Unix time for spot.
The strategy for choosing which Position to close during a Stop Out
Used in:
A Stop Out strategy that closes a Position with the largest Used Margin
A Stop Out strategy that closes a Position with the least PnL
* Request for subscribing on depth of market of the specified symbol.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Unique identifier of the Symbol in cTrader platform.
* Response to the ProtoOASubscribeDepthQuotesReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
* Request for subscribing for live trend bars. Requires subscription on the spot events, see ProtoOASubscribeSpotsReq.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Specifies period of trend bar series (e.g. M1, M10, etc.).
Unique identifier of the Symbol in cTrader platform.
* Response to the ProtoOASubscribeLiveTrendbarReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
* Request for subscribing on spot events of the specified symbol. After successful subscription you'll receive technical ProtoOASpotEvent with latest price, after which you'll start receiving updates on prices via consequent ProtoOASpotEvents.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Unique identifier of the Symbol in cTrader platform.
If TRUE you will also receive the timestamp in ProtoOASpotEvent.
* Response to the ProtoOASubscribeSpotsReq request. Reflects that your request to subscribe for symbol has been added to queue. You'll receive technical ProtoOASpotEvent with current price shortly after this response.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
* Enum for specifying SWAP calculation type for symbol.
Used in:
Specifies type of SWAP computation as PIPS (0)
Specifies type of SWAP computation as PERCENTAGE (1, annual, in percent)
Specifies type of SWAP computation as POINTS (2)
* Trading symbol entity.
Used in:
The unique identifier of the symbol in specific server environment within cTrader platform. Different servers have different IDs.
Number of price digits to be displayed.
Pip position on digits.
If TRUE then the short selling with the symbol is enabled.
If TRUE then setting of guaranteedStopLoss is available for limited risk accounts.
Day of the week when SWAP charge amount will be tripled. Doesn't impact Rollover Commission.
SWAP charge for long positions.
SWAP charge for short positions.
Maximum allowed volume in cents for an order with a symbol.
Minimum allowed volume in cents for an order with a symbol.
Step of the volume in cents for an order.
Value of max exposure per symbol, per account. Blocks execution if breached.
Symbol trading interval, specified in seconds starting from SUNDAY 00:00 in specified time zone.
Commission base amount. Total commission depends on commissionType. Use preciseTradingCommissionRate.
Commission type. See ProtoOACommissionType for details.
Minimum allowed distance between stop loss and current market price.
Minimum allowed distance between take profit and current market price.
Minimum allowed distance between guaranteed stop loss and current market price.
Guaranteed stop loss fee.
Unit of distance measure for slDistance, tpDistance, gslDistance.
Minimum commission amount per trade. Use preciseMinCommission.
Minimum commission Type. See ProtoOAMinCommissionType for details.
Currency for minimum commission. (USD or quote currency).
Administrative Fee, charged instead of Swaps if the Account is marked as a "Shariah Compliant (Swap Free)". The Administrative Fee is charged daily as USD per current open volume of Position in lots. The Account charged in the Deposit currency.
Initial period before the first rolloverCommission will be charged on the account.
Time zone for the symbol trading intervals.
Rules for trading with the symbol. See ProtoOATradingMode for details.
Day of the week (in UTC) when Administrative Fee charge amount will be tripled. Applied only if RolloverChargePeriod = 0 or 1.
Specifies type of SWAP computation as PIPS (0) or PERCENTAGE (1, annual, in percent).
Lot size of the Symbol (in cents).
Commission base amount. Total commission depends on commissionType: for non-percentage types it is multiplied by 10^8, for percentage of value commission type it is multiplied by 10^5.
Minimum commission amount per trade multiplied by 10^8.
List of holidays for this symbol specified by broker.
Percentage (1 = 0.01%) of the realized Gross Profit, which will be paid by the Trader for any trade if the Quote Asset of the traded Symbol is not matched with the Deposit Asset.
The unique identifier of dynamic leverage entity. https://help.ctrader.com/ctrader/trading/dynamic-leverage
Period of charging swaps in hours. 24 means swaps will be charged 1 time per day, 12 - every 12 hours, 8 - every 8 hours, etc.
Time in minutes from 00:00 (UTC) when intraday swaps are charged for the first time.
Count of swapPeriods before the first SWAP charge.
If enabled, SWAP will be charged for all days of the week, including Saturday and Sunday.
Specifies the units in which the base Asset of the Symbol is denominated.
* Request for getting a full symbol entity.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Unique identifier of the symbol in cTrader platform.
* Response to the ProtoOASymbolByIdReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Symbol entity with the full set of fields.
Archived symbols.
* Symbol category entity.
Used in:
The unique identifier of the symbol category.
Link to the asset class. One asset class can have many symbol categories.
Category name.
The number used for sorting Symbol Categories in the UI (lowest number should appear at the top).
* Request for a list of symbol categories available for a trading account.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
* Response to the ProtoSymbolCategoryListReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The list of symbol categories.
* Event that is sent when the symbol is changed on the Server side.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Unique identifier of the Symbol in cTrader platform.
* Enum for specifying stop loss and take profit distances.
Used in:
* Request for getting a conversion chain between two assets that consists of several symbols. Use when no direct quote is available.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The ID of the firs asset in the conversation chain. e.g.: for EUR/USD the firstAssetId is EUR ID and lastAssetId is USD ID.
The ID of the last asset in the conversation chain. e.g.: for EUR/USD the firstAssetId is EUR ID and lastAssetId is USD ID.
* Response to the ProtoOASymbolsForConversionReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Conversion chain of the symbols (e.g. EUR/USD, USD/JPY, GBP/JPY -> EUR/GBP).
* Request for a list of symbols available for a trading account. Symbol entries are returned with the limited set of fields.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Whether to include old archived symbols into response.
* Response to the ProtoOASymbolsListReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The list of symbols.
The list of archived symbols.
* Historical tick data type.
Used in:
The Unix time in milliseconds of the tick. See ProtoOAGetTickDataRes.tickData for details.
Tick price.
* Order's time in force ENUM.
Used in: ,
* Enum for specifying margin calculation type for an account.
Used in:
* Position/order trading details entity.
Used in: ,
The unique identifier of the symbol in specific server environment within cTrader platform. Different brokers might have different IDs.
Volume in cents (e.g. 1000 in protocol means 10.00 units).
Buy, Sell.
The Unix time in milliseconds when position was opened or order was created.
Text label specified during order request.
If TRUE then position/order stop loss is guaranteedStopLoss.
User-specified comment.
Specifies the units in which the Symbol is denominated.
The Unix time in milliseconds when a Position was closed
* Trader side ENUM. Used for order, position, deal.
Used in: , ,
* Trading account entity.
Used in: ,
The unique Trader's Account ID used to match the responses to the Trader's Account.
Current account balance.
Balance version used to identify the final balance. Increments each time when the trader's account balance is changed.
Amount of broker's bonus allocated to the account.
Amount of introducing broker bonus allocated to the account.
Broker's bonus that cannot be withdrew from the account as cash.
Access rights that an owner has to the account in cTrader platform. See ProtoOAAccessRights for details.
Deposit currency of the account.
If TRUE then account is Shariah compliant.
Account leverage (e.g. If leverage = 1:50 then value = 5000).
Margin computation type for the account (MAX, SUM, NET).
Maximum allowed leverage for the account. Used as validation when a Trader can change leverage value.
If TRUE then account is AMF compliant. Use isLimitedRisk and limitedRiskMarginCalculationStrategy.
ID of the account that is unique per server (Broker).
Account type: HEDGED, NETTED, etc.
Some whitelabel assigned to trader by broker at the moment of account creation.
The Unix timestamp in milliseconds of the account registration. Should be used as minimal date in historical data requests.
If TRUE then account is compliant to use specific margin calculation strategy. Such accounts are require to have guaranteed stop loss on all positions.
Special strategy used in margin calculations for this account (if account isLimitedRisk).
Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects balance, managerBonus, ibBonus, nonWithdrawableBonus.
If TRUE - Position is fully closed on Stop Out, if FALSE - smart (partial closing) Stop Out is applied, if unspecified - Stop Out format is determined by Broker.
The Stop Out strategy that is used for this Trader. The Trader can change the value in the cTrader UI if this option is not disabled by the Broker
* Request for getting data of Trader's Account.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
* Response to the ProtoOATraderReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The Trader account information.
* Event that is sent when a Trader is updated on Server side.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The Trader account information.
* Enum for specifying symbol trading mode.
Used in:
* Event that is sent when the level of the Trailing Stop Loss is changed due to the price level changes.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
The unique ID of the position.
The unique ID of the order.
New value of the Stop Loss price.
The Unix time in milliseconds when the Stop Loss was updated.
* Historical Trendbar entity.
Used in: ,
Bar volume in ticks.
Bar period.
Low price of the bar.
Delta between open and low price. open = low + deltaOpen.
Delta between close and low price. close = low + deltaClose.
Delta between high and low price. high = low + deltaHigh.
The Unix time in minutes of the bar, equal to the timestamp of the open tick.
* Trendbar period ENUM.
Used in: , , , ,
* Request for unsubscribing from the depth of market of the specified symbol.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Unique identifier of the Symbol in cTrader platform.
* Response to the ProtoOAUnsubscribeDepthQuotesReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
* Request for unsubscribing from the live trend bars.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Specifies period of trend bar series (e.g. M1, M10, etc.).
Unique identifier of the Symbol in cTrader platform.
* Response to the ProtoOASubscribeLiveTrendbarReq request.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
* Request for unsubscribing from the spot events of the specified symbol. Request to stop receiving ProtoOASpotEvents related to particular symbols. Unsubscription is useful to minimize traffic, especially during high volatility events.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
Unique identifier of the Symbol in cTrader platform.
* Response to the ProtoOASubscribeSpotsRes request. Reflects that your request to unsubscribe will has been added to queue and will be completed shortly. You may still occasionally receive ProtoOASpotEvents until request processing is complete.
Unique identifier of the trader's account. Used to match responses to trader's accounts.
* Request for getting the proxy version. Can be used to check the current version of the Open API scheme.
* Response to the ProtoOAVersionReq request.
The current version of the server application.
--- INTENSIVE COMMANDS 1 - 49 --- COMMON API 50 - 69
Used in: ,
common intensive
common commands