경고
This feature is in pre-release and currently under testing. Documentation is for reference only.
Public server model¶
ProtoAccessRights¶
| Name | Value | Description |
|---|---|---|
| FULL_ACCESS | 0 | Full access to the account. |
| CLOSE_ONLY | 1 | Only trading that reduces volume of the position is allowed. Deals that increase volume of the position are rejected with error "Trading disabled for the account". |
| NO_TRADING | 2 | No trading is allowed for this account. All new deals will be rejected with error "Trading disabled for the account", including SL/TP and Stop Out. |
| NO_LOGIN | 3 | No login is allowed for this account. Pending and other orders are still executed. |
ProtoAccountLifetimeType¶
Lifetime type of accounts
| Name | Value | Description |
|---|---|---|
| UNLIMITED | 1 | Default type for live accounts and subaccounts, exempt from expiration |
| LIMITED_INACTIVITY | 2 | Accounts that expire based on inactivity |
| LIMITED_CREATION | 3 | Accounts with a predefined lifespan from creation time |
| LIMITED_CREATION_FREE | 4 | Accounts with a predefined lifespan from creation time but are explicitly free for proprietary firms with deposit/withdrawal restrictions (it must be available only for servers with setting.PROP_TRADING != 0 |
ProtoAccountType¶
Defines the type of trading account which determines how positions are managed
| Name | Value | Description |
|---|---|---|
| HEDGED | 0 | Allows multiple positions on the same instrument in opposite directions (buy and sell) simultaneously |
| NETTED | 1 | Consolidates all positions on the same instrument into a single net position |
| SPREAD_BETTING | 2 | An account enabling speculation on price movements through spreads rather than ownership of underlying assets |
ProtoArchivedSymbol¶
| Field | Type | Label | Description |
|---|---|---|---|
| symbolId | int64 | Required | The unique identifier of the symbol in the specific server environment within the cTrader platform |
| name | string | Required | Symbol code or ticker symbol used for identification (e.g., "EURUSD", "BTCUSD") |
| utcLastUpdateTimestamp | int64 | Required | UNIX timestamp in milliseconds indicating when the symbol information was last updated |
| description | string | Optional | Human-readable description of the trading instrument |
| digits | int32 | Required | Number of decimal places in the symbol's price representation |
| pipPosition | int32 | Required | Position of the pip digit in the price (e.g., for EURUSD with price 1.12345, pipPosition=4 means the '4' digit) |
| lotSize | int64 | Required | Standard lot size for the instrument, expressed in base units |
| measurementUnits | string | Optional | The unit of measurement for the instrument (e.g., "USD", "Barrels", "Troy Ounces") |
| baseAssetId | int64 | Required | Identifier of the base asset (first currency in a pair or underlying asset) |
| unifiedSymbolId | int32 | Optional | Cross-broker standardized identifier for the same financial instrument |
ProtoBonusDepositWithdraw¶
| Field | Type | Label | Description |
|---|---|---|---|
| operationType | ProtoChangeBonusType | Required | Type of bonus change operation (deposit or withdraw) |
| bonusHistoryId | int64 | Required | Unique identifier for this bonus history record |
| traderId | int64 | Required | ID of the trader whose bonus is being modified |
| managerBonus | int64 | Required | Total manager bonus amount after the operation in cents |
| managerDelta | int64 | Required | Change in manager bonus amount in cents |
| ibBonus | int64 | Required | Total introducing broker bonus amount after the operation in cents |
| ibDelta | int64 | Required | Change in introducing broker bonus amount in cents |
| changeBonusTimestamp | int64 | Required | createTimestamp of this bonus history operation |
| externalNote | string | Optional | Note visible to external users and traders |
| introducingBrokerId | int64 | Optional | ID of the introducing broker related to this bonus operation |
| moneyDigits | uint32 | Optional | Number of decimal places for monetary values |
ProtoBookType¶
| Name | Value | Description |
|---|---|---|
| BOOK_A | 1 | Primary order book used for standard trading |
| BOOK_B | 2 | Secondary order book used for special trading conditions |
ProtoChangeBalanceType¶
| Name | Value | Description |
|---|---|---|
| BALANCE_DEPOSIT | 0 | Manual deposit operation, or initial deposit operation for demo accounts. Can be initiated via cBroker "Deposit" button, via client application "Deposit" button for demo accounts, via API endpoints |
| BALANCE_WITHDRAW | 1 | Manual withdrawal operation |
| BALANCE_CLOSE_POSITION | 2 | Internal balance update when a position is closed |
| BALANCE_DEPOSIT_STRATEGY_COMMISSION_INNER | 3 | Used for payment of Copy fees to Provider from Follower of the same brokerName |
| BALANCE_WITHDRAW_STRATEGY_COMMISSION_INNER | 4 | Used for withdrawal of performance and management Copy fees from the Follower to the Provider from the same brokerName |
| BALANCE_DEPOSIT_IB_COMMISSIONS | 5 | Direct IB commission paid to IB by Trader. Done with nightly job |
| BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE | 6 | Commission paid by IB to its parent IB or to broker. Done with nightly job |
| BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_SUB_IB | 7 | Commission received by parent IB from his sub-ibs. Done with nightly job |
| BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_BROKER | 8 | Commission paid by Broker to IB |
| BALANCE_DEPOSIT_REBATE | 9 | Deposit of trading rebate to the trader's account |
| BALANCE_WITHDRAW_REBATE | 10 | Withdrawal of trading rebate from the trader's account |
| BALANCE_DEPOSIT_STRATEGY_COMMISSION_OUTER | 11 | Used for payment of Copy fees to Provider from Follower of another brokerName |
| BALANCE_WITHDRAW_STRATEGY_COMMISSION_OUTER | 12 | Used for withdrawal of performance and management Copy fees from the Follower to the Provider from another brokerName |
| BALANCE_WITHDRAW_BONUS_COMPENSATION | 13 | Withdrawal to compensate for bonus funds |
| BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE_TO_BROKER | 14 | Commission paid by IB to the broker |
| BALANCE_DEPOSIT_DIVIDENDS | 15 | Deposit of dividends to the trader's account |
| BALANCE_WITHDRAW_DIVIDENDS | 16 | Withdrawal of dividends from the trader's account |
| BALANCE_WITHDRAW_GSL_CHARGE | 17 | Withdrawal of guaranteed stop loss charge |
| BALANCE_WITHDRAW_ROLLOVER | 18 | Withdrawal of rollover fee for swap-free accounts |
| BALANCE_DEPOSIT_NONWITHDRAWABLE_BONUS | 19 | Deposit of bonus funds that cannot be withdrawn |
| BALANCE_WITHDRAW_NONWITHDRAWABLE_BONUS | 20 | Withdrawal of non-withdrawable bonus funds |
| BALANCE_DEPOSIT_SWAP | 21 | used only for limited risk accounts. SWAP for ordinary accounts is based on swapCalculationEvents |
| BALANCE_WITHDRAW_SWAP | 22 | used only for limited risk accounts |
| BALANCE_WITHDRAW_INVESTMENT_TO_STRATEGY | 23 | Withdrawal for investment into a copy trading strategy |
| BALANCE_DEPOSIT_FROM_INVESTOR | 24 | Deposit received from an investor into a strategy |
| BALANCE_DEPOSIT_RETURNED_INVESTMENT | 25 | Deposit of returned investment funds from a strategy |
| BALANCE_WITHDRAW_BY_INVESTOR | 26 | Withdrawal by an investor from a strategy |
| BALANCE_DEPOSIT_MANAGEMENT_FEE | 27 | Deposit of management fee to strategy provider |
| BALANCE_WITHDRAW_MANAGEMENT_FEE | 28 | Withdrawal of management fee from investor |
| BALANCE_DEPOSIT_PERFORMANCE_FEE | 29 | Deposit of performance fee to strategy provider |
| BALANCE_WITHDRAW_FOR_SUBACCOUNT | 30 | Withdrawal from main account to fund a subaccount |
| BALANCE_DEPOSIT_TO_SUBACCOUNT | 31 | Deposit to a subaccount from the main account |
| BALANCE_WITHDRAW_FROM_SUBACCOUNT | 32 | Withdrawal from a subaccount |
| BALANCE_DEPOSIT_FROM_SUBACCOUNT | 33 | Deposit from a subaccount to the main account |
| BALANCE_WITHDRAW_COPY_FEE | 34 | Withdrawal of copy trading fee |
| BALANCE_WITHDRAW_INACTIVITY_FEE | 35 | Withdraw of inactivity fee from the balance |
| BALANCE_DEPOSIT_TRANSFER | 36 | Deposit from an internal transfer |
| BALANCE_WITHDRAW_TRANSFER | 37 | Withdrawal for an internal transfer |
| BALANCE_DEPOSIT_CONVERTED_BONUS | 38 | Deposit of bonus funds converted to real balance |
| BALANCE_DEPOSIT_NEGATIVE_BALANCE_PROTECTION | 39 | Deposit to reset negative balance to zero for protected accounts |
| BALANCE_RESERVED1 | 40 | Reserved for future use |
| BALANCE_RESERVED2 | 41 | Reserved for future use |
| BALANCE_RESERVED3 | 42 | Reserved for future use |
ProtoChangeBonusType¶
| Name | Value | Description |
|---|---|---|
| BONUS_DEPOSIT | 0 | Adding bonus funds to a trader's account |
| BONUS_WITHDRAW | 1 | Removing bonus funds from a trader's account |
ProtoClosePositionDetail¶
| Field | Type | Label | Description |
|---|---|---|---|
| entryPrice | double | Required | Position price, based on vwap of all open deals that link to this position, at the moment of filling the closing order |
| profit | int64 | Required | Gross realized profit related to the closing of offset part of opening deals |
| swap | int64 | Required | Realized swap. |
| commission | int64 | Required | Realized commission |
| balance | int64 | Required | Resulted trader's balance following closing deal execution |
| comment | string | Optional | User or system comment attached to the position closing |
| stopLoss | double | Optional | Stop loss price level at the time of closing |
| takeProfit | double | Optional | Take profit price level at the time of closing |
| quoteToDepositConversionRate | double | Optional | on the moment when the closing deal was sent execution |
| closedVolume | int64 | Optional | Volume that was closed in this operation in cents |
| balanceVersion | int64 | Optional | Version number for tracking balance changes |
| introducingBrokerCommission | int64 | Optional | Commission paid to introducing broker in cents |
| pocketCommission | int64 | Optional | Value in USD cents |
| pocketMarkup | int64 | Optional | Value in USD cents |
| equity | int64 | Optional | Resulted trader's equity following closing deal execution |
| netProfit | int64 | Optional | Net realized profit related to the closing of offset part of opening deals |
| mirroringCommission | int64 | Optional | In deposit ccy, cents |
| depositToIbDepositRate | double | Optional | Conversion rate from deposit currency to IB deposit currency |
| minEquity | int64 | Optional | Minimum Equity value starting from the last previous balance history operation and before applying close position balance history operation |
| maxEquity | int64 | Optional | Maximum Equity value starting from the last previous balance history operation and before applying close position balance history operation |
| rebate | int64 | Optional | In deposit ccy, cents |
| balanceHistoryId | int64 | Optional | ID of the balance history record for this closing |
| markup | int64 | Optional | In USD cents |
| equityBasedRoi | double | Optional | Return on investment based on account equity |
| closedStake | uint64 | Optional | Stake amount closed for spread betting accounts |
| ibCommissionsPaid | bool | Optional | If TRUE, introducing broker commissions have been paid |
| nonWithdrawableBonus | int64 | Optional | Amount of Credit available for trader after operation. Can be used for trading but cannot be withdrawn. |
| stopLossTriggerMethod | ProtoOrderTriggerMethod | Optional | Stop trigger method for SL/TP order |
| offsetDealTimestamp | int64 | Optional | Execution time of the first offset deal for this closing deal |
| moneyDigits | uint32 | Optional | Number of decimal places for monetary values |
| pnlConversionFee | int64 | Optional | This is actual fee, applied to the Deal in account's ccy |
ProtoCommissionType¶
| Name | Value | Description |
|---|---|---|
| USD_PER_MILLION_USD | 1 | USD per million USD volume - usually used for FX. Example: 50 USD for 1 mil USD of trading volume. In 10^8. |
| USD_PER_LOT | 2 | USD per 1 lot - usually used for CFDs and futures for commodities, and indices. Example: 15 USD for 1 contract. In 10^8. |
| PERCENTAGE_OF_VALUE | 3 | Percentage of trading volume - usually used for Equities. Example: 0.005% of notional trading volume. Multiplied by 100000. |
| QUOTE_CCY_PER_LOT | 4 | 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. In 10^8. |
ProtoDayOfWeek¶
| Name | Value | Description |
|---|---|---|
| NONE | 0 | No specific day, or day not applicable |
| MONDAY | 1 | First day of the trading week |
| TUESDAY | 2 | Second day of the trading week |
| WEDNESDAY | 3 | Third day of the trading week |
| THURSDAY | 4 | Fourth day of the trading week |
| FRIDAY | 5 | Fifth day of the trading week |
| SATURDAY | 6 | Weekend day, limited trading hours |
| SUNDAY | 7 | Weekend day, market opening preparations |
ProtoDeal¶
| Field | Type | Label | Description |
|---|---|---|---|
| dealId | int64 | Required | Unique identifier for the deal |
| orderId | int64 | Required | Identifier of the order that generated this deal |
| positionId | int64 | Required | Identifier of the position associated with this deal |
| volume | int64 | Required | Total volume of the deal in cents |
| filledVolume | int64 | Required | Actual volume that was filled in cents |
| symbolId | int64 | Required | Identifier of the trading symbol |
| createTimestamp | int64 | Required | Timestamp when the deal was created |
| executionTimestamp | int64 | Required | Timestamp when the deal was executed |
| executionPrice | double | Optional | Price at which the deal was executed |
| tradeSide | ProtoTradeSide | Required | Buy or sell direction of the deal |
| dealStatus | ProtoDealStatus | Required | Current status of the deal |
| dealType | ProtoDealType | Required | Type of the deal (market or limit) |
| commission | int64 | Optional | Commission charged for the deal in deposit currency cents |
| label | string | Optional | Label field value from corresponding order. Used by cAlgo bots to identify its own orders. max length 100 |
| channel | string | Optional | Channel through which the deal was executed |
| comment | string | Optional | User or system comment attached to the deal |
| priceSnapshotId | int64 | Optional | Reference to the price snapshot at execution time |
| baseToUsdConversionRate | double | Optional | Conversion rate from base currency to USD |
| closePositionDetail | ProtoLightClosePositionDetail | Optional | Details if this deal closed a position |
| introducingBrokerCommission | int64 | Optional | Commission paid to introducing broker in cents |
| mirroringCommission | int64 | Optional | Commission for copy trading in deposit currency cents |
| lotSize | int64 | Optional | Standard lot size for the symbol in cents |
| stake | int64 | Optional | Stake amount for spread betting accounts |
| offsetDeals | RepeatedField<ProtoLightOffsetDeal> | Repeated | List of deals that offset this deal |
| moneyDigits | uint32 | Optional | Number of decimal places for monetary values |
| marginRate | double | Optional | Base to Deposit rate computed before deal is sent for execution |
ProtoDealStatus¶
| Name | Value | Description |
|---|---|---|
| FILLED | 2 | Order or deal was fully executed at the requested volume |
| PARTIALLY_FILLED | 3 | Order or deal was partially executed with some volume remaining |
| REJECTED | 4 | Order was rejected by the system before execution |
| INTERNALLY_REJECTED | 5 | Order was rejected internally by the broker's system |
| ERROR | 6 | An error occurred during order processing |
| MISSED | 7 | Order was missed or not processed due to market conditions |
ProtoDealType¶
| Name | Value | Description |
|---|---|---|
| MARKET_DEAL | 1 | Deal executed at current market price |
| LIMIT_DEAL | 2 | Deal executed at a specific price limit set by the trader |
ProtoDepositWithdraw¶
| Field | Type | Label | Description |
|---|---|---|---|
| operationType | ProtoChangeBalanceType | Required | Type of balance change operation |
| balanceHistoryId | int64 | Required | Unique identifier for this balance history record |
| traderId | int64 | Required | ID of the trader whose balance is being modified |
| balance | int64 | Required | Resulted balance after application of this balance history |
| delta | int64 | Required | Delta between balance amount before and after application of this balance history operation |
| changeBalanceTimestamp | int64 | Required | createTimestamp of this balance history operation |
| comment | string | Optional | Internal comment for the balance operation |
| externalNote | string | Optional | Note visible to external users and traders |
| balanceVersion | int64 | Optional | Version number for tracking balance changes |
| equity | int64 | Optional | Equity value resulted from application of this balance history operation. equity can be less than minEquity |
| minEquity | int64 | Optional | Minimum Equity value starting from the last previous balance history operation and before applying this balance history operation |
| maxEquity | int64 | Optional | Maximum Equity value starting from the last previous balance history operation and before applying this balance history operation |
| nonWithdrawableBonus | int64 | Optional | Amount of Credit available for trader. Can be used for trading but cannot be withdrawn. |
| source | string | Optional | Source of the balance operation (system, manual, etc.) |
| externalId | string | Optional | External identifier for reconciliation purposes |
| moneyDigits | uint32 | Optional | Number of decimal places for monetary values |
ProtoDepthQuote¶
| Field | Type | Label | Description |
|---|---|---|---|
| id | uint64 | Optional | Unique identifier for the market depth quote |
| size | uint64 | Required | Size in whole units (e.g. USD 1000.20 will have size = 1_000) |
| bid | uint64 | Optional | Bid price in platform's internal price format |
| ask | uint64 | Optional | Ask price in platform's internal price format |
| fractionalSize | uint32 | Optional | Value of fractional part of volume (size) in cents (e.g. 1000.20 = 20) |
ProtoDynamicCommission¶
| Field | Type | Label | Description |
|---|---|---|---|
| monthlyVolume | int64 | Required | Monthly trading volume threshold in USD cents that triggers this commission tier |
| discount | int64 | Required | Discount percentage applied to commission when monthly volume exceeds the threshold, multiplied by 10^6 |
ProtoDynamicLeverage¶
Dynamic Leverage <https://help.
ctrader.
com/trading-with-ctrader/dynamic-leverage>
| Field | Type | Label | Description |
|---|---|---|---|
| leverageId | int64 | Required | unique identifier returned in ProtoSymbol by ProtoGetSymbolReq |
| name | string | Required | Leverage ratio |
| description | string | Optional | Symbol category or leverage ratio |
| tiers | RepeatedField<ProtoDynamicLeverageTier> | Repeated | Tier of Dynamic Leverage |
| utcLastUpdateTimestamp | int64 | Optional | UNIX timestamp in milliseconds when record was updated |
ProtoDynamicLeverageTier¶
Dynamic Leverage tier entity
| Field | Type | Label | Description |
|---|---|---|---|
| volume | int64 | Required | Maximum position size in USD for this tier; when position size exceeds this value, the next tier's leverage applies |
| leverage | int32 | Required | Leverage ratio for this tier expressed in hundredths (e.g., 1000 = 1:10, 2000 = 1:20) |
ProtoExecutionType¶
Execution type ENUM
| Name | Value | Description |
|---|---|---|
| ORDER_ACCEPTED | 2 | Sent when order is accepted by server, and initial validations passed |
| ORDER_FILLED | 3 | Sent when order is filled - could be opening new position, closing existing position, changing volume or direction of the position |
| ORDER_REPLACED | 4 | Sent when existing order was amended - in most cases, due to changes in pending orders (price, side, TIF) |
| ORDER_CANCELLED | 5 | Sent when order is cancelled - in case of incomplete fill, or due to client request for pending orders |
| ORDER_EXPIRED | 6 | Sent when order with ProtoTimeInForce = GOOD_TILL_DATE has expired |
| ORDER_REJECTED | 7 | Sent when order is rejected due to validation failure or market conditions |
| ORDER_CANCEL_REJECTED | 8 | Sent when we can't cancel order (for example, it has already been sent to LP for execution and is currently being processed) |
| SWAP | 9 | Sent when swap is charged or credited |
| DEPOSIT_WITHDRAW | 10 | Sent when funds are deposited to or withdrawn from the account |
| ORDER_PARTIAL_FILL | 11 | Sent when order is partially filled with some volume remaining |
| BONUS_DEPOSIT_WITHDRAW | 12 | Sent when bonus funds are added to or removed from the account |
ProtoFuturesSettings¶
| Field | Type | Label | Description |
|---|---|---|---|
| datesTimeZone | string | Required | Time zone used for futures dates calculation |
| lastTradeTimestampInMinutes | uint32 | Required | In order to get epoch time in milliseconds should be multiplied by 60000. We do not need millisecond granularity, so decided to optimize a little bit like into ProtoTrendbar |
| expirationTimestampInMinutes | uint32 | Required | In order to get epoch time in milliseconds should be multiplied by 60000. We do not need millisecond granularity, so decided to optimize a little bit like into ProtoTrendbar |
| maintenanceMargin | int64 | Optional | Amount of quote Asset per 1 traded lot. 1 protocol value always equal to 0.00000001. If not NULL, then must be >0 |
ProtoGroup¶
| Field | Type | Label | Description |
|---|---|---|---|
| groupId | int64 | Required | Unique identifier for the trader group |
| name | string | Optional | Display name of the group |
| enabled | bool | Optional | If TRUE, the group is active and can be used |
| swapEnabled | bool | Optional | If TRUE, swap charges are applied to positions held overnight |
| swapAndDividendProfileId | int64 | Optional | ID reference to the swap and dividend profile applied to this group |
| marginStopout | double | Optional | Margin level percentage at which positions will be automatically closed |
| description | string | Optional | Detailed description of the group's purpose and settings |
| utcLastUpdateTimestamp | int64 | Optional | Timestamp of the last update to this group's settings |
| priceStreamId | int64 | Optional | ID reference to the price stream used for this group |
| deleted | bool | Optional | If TRUE, the group is marked as deleted but retained for historical purposes |
| hasAccess | bool | Optional | Indicates if the current user has access to this group |
| symbol | RepeatedField<ProtoGroupSymbol> | Repeated | List of trading symbols available to this group |
| dynamicCommission | RepeatedField<ProtoDynamicCommission> | Repeated | Volume-based commission tiers for this group |
| bonusConversionRate | int64 | Optional | Rate at which bonuses are converted to real balance |
| bonusConvertLots | bool | Optional | If TRUE, bonuses are converted based on trading volume in lots |
| bonusConversionRateLots | int64 | Optional | Rate at which bonuses are converted based on traded lots |
| isDealingDesk | bool | Optional | If TRUE then orders in this group are executed manually according to Dealing Desk rules and Max Auto Execution Size Profile. |
| maxAutoExecutionSizeProfileId | int64 | Optional | ID reference to the profile defining maximum order sizes for automatic execution |
| blockedChannels | string | Optional | Contains semicolon(;)-separated list of channels that should be blocked for trading (examples: "cTrader Copy", "cBot Cloud", "cTrader Web"). If new order request contains channel from the list, it will be rejected with error CHANNEL_IS_BLOCKED "Operations through current channel is blocked by your Broker". If manager specifies "openAPI", then all trades related to Open API will be rejected. |
| fairStopOut | bool | Optional | If TRUE - Position is fully closed on Stop Out, if FALSE - smart (partial closing) Stop Out is applied. ProtoTrader.fairStopOut overrides this setting for the Trader. If ProtoTrader.fairStopOut is not specified then ProtoGroup.fairStopOut is used. |
| regionId | int64 | Optional | Internal usage only. Logic is on CID side. |
| copyDisabled | bool | Optional | If TRUE then trader's of the Group are unable to create sub-accounts (ProtoCreateSubAccountReq and InternalCreateSubAccountReq). |
| stopoutDisabled | bool | Optional | If TRUE then account is not checked for breaching Stop-Out level |
| inactivityGracePeriod | int32 | Optional | Grace period in days during which an inactivity fee is not charged for an account since last filled deal's execution_timestamp. If 0 then inactivity fee is charged immediately after grace period ends. |
| inactivityChargePeriod | int32 | Optional | Period in days after which an inactivity fee is charged. If 0 then inactivity fee is not charged. |
| inactivityFeeAmount | int32 | Optional | Inactivity fee amount in cents, specified in USD and converted to Deposit CCY of an account. Operations of charging Inactivity fee appear with description=externalNote=Inactivity fee. |
| copyProvidingDisabled | bool | Optional | If TRUE then traders of the group are unable to become copy provider. Logic is on JM side |
| legalEntityId | int64 | Optional | Identifies reporting Legal Entity for all Traders in the Group |
| disablePasswordLogin | bool | Optional | Primary used to disable FIX API login |
| allowWorseGSL | bool | Optional | Allows to increase risk for Positions with Guaranteed Stop Loss |
| isFakeSpreadBetting | bool | Optional | Needed for UI in order to understand that they must show normal CFD account as Spread-betting and show "stakes" everywhere |
| negativeBalanceProtection | bool | Optional | If TRUE accounts with no positions and negative balance in this group will have additional balance operation to make their balance = 0 in case their balance becomes negative. Such operations will appear with description=externalNote=Negative Balance Protection. |
| allowTraderChangeSO | bool | Optional | If FALSE trader can not change their Stop Out strategy. Null value in ProtoCrudGroupReq is interpreted as keeping the current value of allowTraderChangeSO |
| sharedAccessEnabled | bool | Optional | If true, it will be permitted to share access to the Accounts belonging to the Group with other cTrader users |
| stopOutStrategy | ProtoStopOutStrategy | Optional | The Stop Out strategy that is used when a Stop Out strategy is not selected for a Trader entity |
| negativeBalanceProtectionLimitUsd | int32 | Optional | If the account balance is lower than negativeBalanceProtectionLimitUsd, then negativeBalanceProtection is not applied and the operation of type BALANCE_DEPOSIT_NEGATIVE_BALANCE_PROTECTION, which sets the balance to 0, is not executed. If negativeBalanceProtection<>TRUE then negativeBalanceProtectionLimitUsd will be set to unspecified |
ProtoGroupSymbol¶
| Field | Type | Label | Description |
|---|---|---|---|
| symbolId | int64 | Required | Unique identifier for the trading symbol |
| enabled | bool | Required | If TRUE, then this symbol is available for end trader and will be send in symbol list responses. Otherwise we act like this symbol doesn't exist |
| leverageId | uint64 | Optional | ID of related Dynamic Leverage Profile. |
| gslScheduleId | uint64 | Optional | ID of related GSL Schedule Profile. |
| commissionProfileId | int64 | Optional | ID of related Commission Profile. |
| volumeProfileId | int64 | Optional | ID of related Volume Profile. |
| executionProfileId | int64 | Optional | ID of related Execution Profile. |
| protectionProfileId | int64 | Optional | ID of related Protection Profile. |
| swapFreeProfileId | int64 | Optional | ID of related Swap Free Profile. |
| tradeNotificationProfileId | int64 | Optional | ID of related Trade Notification Profile. |
ProtoHoliday¶
| Field | Type | Label | Description |
|---|---|---|---|
| holidayId | int64 | Required | Unique identifier for the holiday entry |
| name | string | Required | Display name of the holiday |
| description | string | Optional | Detailed description of the holiday |
| scheduleTimeZone | string | Required | Time zone for the holiday schedule |
| holidayDate | int64 | Required | EpochMillis / 86400000 (ms * sec * min * hours) |
| isRecurring | bool | Required | If TRUE, the holiday repeats annually |
| startSecond | int32 | Optional | Amount of seconds from 00:00:00 of the holiday day when holiday actually starts |
| endSecond | int32 | Optional | Amount of seconds from 00:00:00 of the holiday day when holiday actually finished |
ProtoIbCommissionSymbolCategory¶
| Field | Type | Label | Description |
|---|---|---|---|
| symbolCategoryId | int64 | Required | Unique identifier for a category of trading symbols |
| introducingBrokerCommissionRate | int32 | Required | Commission rate paid to the introducing broker for trades in this category |
| pocketCommissionRate | int32 | Required | Commission rate paid to the trader's pocket account for trades in this category |
| pocketMarkupRate | int32 | Required | Markup rate applied to trades in this category for the pocket account |
| ibCommissionsType | ProtoCommissionType | Required | Type of commission calculation used for IB commissions in this category |
ProtoInterval¶
Represents time frame of symbol session
| Field | Type | Label | Description |
|---|---|---|---|
| startSecond | uint32 | Required | Seconds from the beginning of Sunday 00:00:00 |
| endSecond | uint32 | Required | Seconds from the beginning of Sunday 00:00:00 |
| isGlobalSessionStart | bool | Optional | If TRUE then session start is considered as a start of the Global session. Used for MOO desired timestamp validation |
| isGlobalSessionEnd | bool | Optional | If TRUE then session end is considered as end of the Global session. spotEvent.sessionClose,high,low will be generated |
ProtoLightClosePositionDetail¶
| Field | Type | Label | Description |
|---|---|---|---|
| entryPrice | double | Required | Position price, based on vwap of all open deals that link to this position, at the moment of filling the closing order |
| profit | int64 | Required | Gross realized profit related to the closing of offset part of opening deals |
| swap | int64 | Required | Realized swap |
| commission | int64 | Required | Realized commission |
| balance | int64 | Required | Resulted trader's balance following closing deal execution |
| quoteToDepositConversionRate | double | Optional | Rate on the moment when the closing deal was sent execution |
| closedVolume | int64 | Optional | Volume that was closed in this operation in cents |
| balanceVersion | int64 | Optional | Version number for tracking balance changes |
| introducingBrokerCommission | int64 | Optional | Commission paid to introducing broker in cents |
| mirroringCommission | int64 | Optional | Commission for copy trading in deposit currency cents |
| minEquity | int64 | Optional | Minimum Equity value starting from the last previous balance history operation and before applying close position balance history operation |
| maxEquity | int64 | Optional | Maximum Equity value starting from the last previous balance history operation and before applying close position balance history operation |
| closedStake | int64 | Optional | Used for SB accounts. Closed volume in stake cents. |
| moneyDigits | uint32 | Optional | Number of decimal places for monetary values |
| pnlConversionFee | int64 | Optional | This is actual fee, applied to the Deal in account's ccy |
ProtoLightOffsetDeal¶
| Field | Type | Label | Description |
|---|---|---|---|
| dealId | int64 | Required | Unique identifier for the offset deal |
| filledVolume | int64 | Required | Actual volume filled in this offset deal in cents |
| executionTimestamp | int64 | Required | Timestamp when the offset deal was executed |
| executionPrice | double | Optional | Price at which the offset deal was executed |
| stake | uint64 | Optional | Stake amount for spread betting accounts |
ProtoLightSymbol¶
| Field | Type | Label | Description |
|---|---|---|---|
| id | int64 | Required | Unique identifier for the trading symbol |
| symbolCategoryId | int64 | Required | Category identifier for grouping related symbols |
| sortingNumber | double | Required | Number used for sorting symbols in lists and displays |
| name | string | Optional | Display name of the symbol (e.g. "EURUSD") |
| description | string | Optional | Human-readable description of the symbol |
| tags | string | Optional | Comma-separated list of tags for categorizing and filtering symbols |
| favorite | bool | Optional | Indicates if the symbol is marked as favorite for the user |
| enabled | bool | Optional | Indicates if trading is enabled for this symbol |
| baseAssetId | int64 | Optional | ID of the base asset (first currency in a pair or the actual asset) |
| quoteAssetId | int64 | Optional | ID of the quote asset (second currency in a pair or the pricing currency) |
| translation | string | Optional | Localized name of the symbol in the user's language |
| unifiedSymbolId | int32 | Optional | Cross-broker identifier for the same instrument |
ProtoLimitedRiskMarginCalculationStrategy¶
| Name | Value | Description |
|---|---|---|
| ACCORDING_TO_LEVERAGE | 0 | Calculates margin based on account leverage settings only |
| ACCORDING_TO_GSL | 1 | Calculates margin based on Guaranteed Stop Loss level only |
| ACCORDING_TO_GSL_AND_LEVERAGE | 2 | Combines both leverage and Guaranteed Stop Loss for margin calculation |
ProtoLocalization¶
| Field | Type | Label | Description |
|---|---|---|---|
| locale | string | Required | Language and region code in ISO format |
| title | string | Required | Localized text for the title in the specified locale |
ProtoMinCommissionType¶
| Name | Value | Description |
|---|---|---|
| CURRENCY | 1 | Uses the account's deposit currency for minimum commission |
| QUOTE_CURRENCY | 2 | Uses the symbol's quote currency for minimum commission |
ProtoOrder¶
| Field | Type | Label | Description |
|---|---|---|---|
| orderId | int64 | Required | Unique identifier for the order |
| tradeData | ProtoTradeData | Required | Trade data associated with this order |
| orderType | ProtoOrderType | Required | Type of order (market, limit, stop, etc.) |
| orderStatus | ProtoOrderStatus | Required | Current status of the order (created, filled, rejected, etc.) |
| expirationTimestamp | int64 | Optional | Timestamp when the order expires if not executed |
| executionPrice | double | Optional | Price at which an order was executed |
| executedVolume | int64 | Optional | Volume that has been executed from the total order volume |
| stopLoss | double | Optional | Value set from ProtoClosePositionDetail for closing market orders |
| takeProfit | double | Optional | Value set from ProtoClosePositionDetail for closing market orders |
| utcLastUpdateTimestamp | int64 | Optional | Timestamp of the last update to this order |
| bookType | ProtoBookType | Optional | Type of order book used for execution |
| method | string | Optional | quickTrade button, Order screen, Chart trading, etc. |
| baseSlippagePrice | double | Optional | Base price used for slippage calculation |
| closingOrder | bool | Optional | If TRUE, this order is closing an existing position |
| limitPrice | double | Optional | Price at which a limit order will be executed |
| stopPrice | double | Optional | Price at which a stop order will be triggered |
| clientOrderId | string | Optional | Optional clientOrderId. Max Length = 50 chars. |
| commission | int64 | Optional | Trading commission charged in deposit currency cents |
| clientToken | string | Optional | Optional clientToken. Max Length = 100 chars. |
| timeInForce | ProtoTimeInForce | Optional | Specifies how long the order remains active |
| positionId | int64 | Optional | ID of the position this order is associated with |
| relativeStopLoss | int64 | Optional | Relative stop loss level in points or percentage |
| relativeTakeProfit | int64 | Optional | Relative take profit level in points or percentage |
| introducingBrokerCommission | int64 | Optional | Commission paid to introducing broker in cents |
| pocketCommission | int64 | Optional | Commission paid to trader's pocket account in cents |
| pocketMarkup | int64 | Optional | Markup applied to trader's pocket account in cents |
| mirroringCommission | int64 | Optional | Commission for copy trading in deposit currency cents |
| originalClientOrderId | string | Optional | Original client order ID for modified orders |
| checkTolerance | bool | Optional | If TRUE, execution price is checked against tolerance |
| login | int64 | Optional | Trader login associated with this order |
| name | string | Optional | First name of the trader who placed the order |
| lastName | string | Optional | Last name of the trader who placed the order |
| isStopOut | bool | Optional | If TRUE, this order was triggered by a stop out |
| trailingStopLoss | bool | Optional | If TRUE, stop loss adjusts automatically as price moves favorably |
| closeWithPID | int64 | Optional | Position ID to close with this order |
| stopTriggerMethod | ProtoOrderTriggerMethod | Optional | Trigger method for main pending order |
| stopLossTriggerMethod | ProtoOrderTriggerMethod | Optional | Stop trigger method for SL/TP order |
| slippageInPoints | int32 | Optional | Maximum allowed slippage in price points |
| desiredOpenTimestamp | int64 | Optional | Desired timestamp for order opening |
| ocoOrderId | int64 | Optional | ID of related one-cancels-other order |
| moneyDigits | uint32 | Optional | Number of decimal places for monetary values |
ProtoOrderStatus¶
| Name | Value | Description |
|---|---|---|
| ORDER_STATUS_CREATED | 0 | Order has been created in the system but not yet processed |
| ORDER_STATUS_ACCEPTED | 1 | Order has been accepted by the system and is active |
| ORDER_STATUS_FILLED | 2 | Order has been fully executed |
| ORDER_STATUS_REJECTED | 3 | Order has been rejected by the system |
| ORDER_STATUS_EXPIRED | 4 | Order has reached its expiration time and is no longer active |
| ORDER_STATUS_CANCELLED | 5 | Order has been cancelled by the trader or system |
| ORDER_STATUS_ERROR | 6 | Order has no symbol or any other reason |
| ORDER_STATUS_RESERVED | 7 | Order status reserved for future use |
ProtoOrderTriggerMethod¶
| Name | Value | Description |
|---|---|---|
| TRADE | 1 | Triggered by a trade price that crosses the trigger level |
| OPPOSITE | 2 | Triggered by a price from the opposite side (bid for buy stop, ask for sell stop) |
| DOUBLE_TRADE | 3 | Requires two consecutive trade prices to cross the trigger level |
| DOUBLE_OPPOSITE | 4 | Requires two consecutive opposite prices to cross the trigger level |
ProtoOrderType¶
| Name | Value | Description |
|---|---|---|
| MARKET | 1 | Executes immediately at the current market price |
| LIMIT | 2 | Executes at specified price or better |
| STOP | 3 | Becomes market order when price reaches specified level |
| STOP_LOSS_TAKE_PROFIT | 4 | Used to modify or place SL/TP on an existing position |
| MARKET_RANGE | 5 | Market order with allowed price range |
| STOP_LIMIT | 6 | Places a limit order when stop price is reached |
ProtoPosition¶
| Field | Type | Label | Description |
|---|---|---|---|
| positionId | int64 | Required | Unique identifier for the position |
| tradeData | ProtoTradeData | Required | Trade data associated with this position |
| positionStatus | ProtoPositionStatus | Required | Current status of the position (open, closed, etc.) |
| swap | int64 | Required | Accumulated swap charges/credits in deposit currency cents |
| price | double | Optional | vwap price shown as entry price in cTrader |
| stopLoss | double | Optional | Price level at which position will be closed to limit losses |
| takeProfit | double | Optional | Price level at which position will be closed to secure profits |
| utcLastUpdateTimestamp | int64 | Optional | Timestamp of the last update to this position |
| bookType | ProtoBookType | Optional | Type of order book used for execution |
| commission | int64 | Optional | Trading commission charged in deposit currency cents |
| marginRate | double | Optional | Rate used to calculate required margin for this position |
| introducingBrokerCommission | int64 | Optional | Commission paid to introducing broker in cents |
| pocketCommission | int64 | Optional | Commission paid to trader's pocket account in cents |
| pocketMarkup | int64 | Optional | Markup applied to trader's pocket account in cents |
| mirroringCommission | int64 | Optional | Commission for copy trading in deposit currency cents |
| guaranteedStopLoss | bool | Optional | If TRUE, stop loss is guaranteed at exact price level |
| usedMargin | uint64 | Optional | Amount of margin required to maintain this position |
| trailingStopLoss | bool | Optional | If TRUE, stop loss adjusts automatically as price moves favorably |
| stopLossTriggerMethod | ProtoOrderTriggerMethod | Optional | Stop trigger method for SL/TP order |
| moneyDigits | uint32 | Optional | Number of decimal places for monetary values |
| pnlConversionFeeRate | int32 | Optional | Fee rate for converting profit/loss to deposit currency |
ProtoPositionStatus¶
Describes position status
| Name | Value | Description |
|---|---|---|
| POSITION_STATUS_OPEN | 1 | Position is currently active in the market |
| POSITION_STATUS_CLOSED | 2 | Position has been closed and is no longer active |
| POSITION_STATUS_CREATED | 3 | Position has been created but not yet opened in the market |
| POSITION_STATUS_ERROR | 4 | An error occurred during position processing |
ProtoStopOutStrategy¶
The strategy for choosing which Position to close during a Stop Out
| Name | Value | Description |
|---|---|---|
| MOST_MARGIN_USED_FIRST | 0 | A Stop Out strategy that closes a Position with the largest Used Margin |
| MOST_LOSING_FIRST | 1 | A Stop Out strategy that closes a Position with the least PnL |
ProtoSwapCalculationType¶
| Name | Value | Description |
|---|---|---|
| PIPS | 0 | Specifies type of SWAP computation as PIPS (0): swap = (volume * swapInPips) / (10 ^ Symbol.pipPosition) * dayOfWeekMultiplier * quoteToDeposit, round HALF_UP |
| PERCENTAGE | 1 | Specifies type of SWAP computation as PERCENTAGE (1, annual, in percent): swap = (volume * bid * swapInPips / 100 / 365) * dayOfWeekMultiplier * quoteToDeposit, round HALF_UP, for Spread-Betting accounts: swap = stake * swapInPips, round HALF_UP |
| POINTS | 2 | Specifies type of SWAP computation as POINTS (2): swap = (volume * swapInPips) / (10 ^ Symbol.digits) * dayOfWeekMultiplier * quoteToDeposit, round HALF_UP |
ProtoSymbol¶
| Field | Type | Label | Description |
|---|---|---|---|
| symbolId | int64 | Required | Unique identifier for the trading symbol |
| name | string | Required | Display name of the symbol (e.g., "EURUSD", "GOLD") |
| digits | int32 | Required | Number of decimal places displayed in the symbol's price |
| pipPosition | int32 | Required | Position of the pip decimal place (e.g., 4 for forex meaning 0.0001 is one pip) |
| lpEnabled | bool | Optional | If TRUE, the symbol is enabled and subscribed with the liquidity provider |
| enabled | bool | Optional | If TRUE, the symbol is enabled for trading on the platform |
| swapRollover3Days | ProtoDayOfWeek | Optional | Day of the week when SWAP charge amount will be tripled. Doesn't impact rollover commission |
| swapLong | double | Optional | Swap rate in pips per 100K for long positions held overnight |
| swapShort | double | Optional | Swap rate in pips per 100K for short positions held overnight |
| description | string | Optional | description |
| utcLastUpdateTimestamp | int64 | Optional | Timestamp of the last update to this symbol's settings |
| maxVolume | int64 | Optional | In cents. Maximum allowed volume in cents for an order with a symbol. Excludes closePosition orders |
| minVolume | int64 | Optional | In cents. Minimum allowed volume in cents for an order with a symbol. Excludes closePosition orders |
| schedule | RepeatedField<ProtoInterval> | Repeated | Trading schedule defining when the symbol can be traded |
| sortingNumber | double | Optional | Number used for sorting symbols in lists and displays |
| measurementUnits | string | Optional | OZ (ounces), BBL (barrels), BTU (British thermal units) |
| lotSize | int64 | Optional | Standard lot size in cents for the symbol |
| enableShortSelling | bool | Optional | If TRUE, selling without owning the asset is allowed |
| internalAlias | string | Optional | Symbol alias used for technical purposes |
| symbolCategoryId | int64 | Optional | Identifier for the category to which the symbol belongs (e.g., Forex, Indices, Commodities) |
| favorite | bool | Optional | If TRUE, the symbol is marked as a favorite for the user |
| tolerance | int32 | Optional | Allowed deviation in points from requested price for order execution |
| minStake | int64 | Optional | minimal stake in cents. Minimal - 1 |
| maxStake | int64 | Optional | maximal stake in cents. Default - 10000000 |
| guaranteedStopLoss | bool | Optional | Whether this symbol is allowed to have guaranteed stop loss orders. |
| commissionType | ProtoCommissionType | Optional | |
| slDistance | uint32 | Optional | Minimum distance in points required between current price and stop loss level |
| tpDistance | uint32 | Optional | Minimum distance in points required between current price and take profit level |
| gslDistance | uint32 | Optional | Minimum distance in points required between current price and guaranteed stop loss level |
| gslCharge | int64 | Optional | Fee charged when a guaranteed stop loss is triggered, in deposit currency cents |
| tags | string | Optional | Comma-separated list of tags for categorizing and filtering symbols |
| minCommissionType | ProtoMinCommissionType | Optional | |
| minCommissionAsset | string | Optional | |
| baseAssetId | int64 | Optional | ID of the base asset (first currency in a pair or the actual asset) |
| quoteAssetId | int64 | Optional | ID of the quote asset (second currency in a pair or the pricing currency) |
| stepVolume | int64 | Optional | Minimum volume increment allowed for orders in cents |
| stepStake | int64 | Optional | Minimum stake increment allowed for spread betting orders in cents |
| maxExposure | uint64 | Optional | Maximum allowed exposure in USD cents per combination of symbol and account |
| rolloverCommission | int64 | Optional | 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. |
| skipRolloverDays | int32 | Optional | defer rolloverCommission by skipRolloverDays, accounts weekends |
| leverageId | int64 | Optional | ID of the dynamic leverage profile applied to this symbol |
| scheduleTimeZone | string | Optional | Time zone used for the symbol's trading schedule |
| gslScheduleId | int64 | Optional | ID of the guaranteed stop loss schedule profile applied to this symbol |
| tradingMode | ProtoTradingMode | Optional | |
| distanceSetIn | ProtoSymbolDistanceType | Optional | |
| translation | RepeatedField<ProtoLocalization> | Repeated | |
| rolloverChargePeriod | int32 | Optional | Payment period of rolloverCommission in days (default = 1). 1 (or 0) means daily payments, 2 each second day. 3x rollover is applied only for daily payments |
| rolloverCommission3Days | ProtoDayOfWeek | Optional | Day of the week (in UTC) when Administrative Fee charge amount will be tripled. Applied only if rollover charge period = 0 or 1 |
| swapCalculationType | ProtoSwapCalculationType | Optional | Specifies type of SWAP computation |
| autochartistAlias | string | Optional | Symbol alias used for Autochartist pattern recognition integration |
| tradingCentralAlias | string | Optional | Symbol alias used for Trading Central analysis integration |
| unifiedSymbolId | int32 | Optional | Cross-broker identifier for the same instrument |
| holiday | RepeatedField<ProtoHoliday> | Repeated | |
| preciseTradingCommissionRate | int64 | Optional | Trading commission rate with higher precision, in platform's internal format |
| preciseMinCommission | int64 | Optional | Minimum commission amount with higher precision, in platform's internal format |
| bbspAlias | string | Optional | Symbol alias used for Bloomberg Best Sell Price integration |
| pnlConversionFeeRate | int32 | Optional | Fee rate applied when converting profit/loss to deposit currency, percentage value where 1 = 0.01% |
| futuresSettings | ProtoFuturesSettings | Optional | |
| swapTime | int32 | Optional | Time of day in seconds from midnight when swap charges are applied |
| swapPeriod | int32 | Optional | Period in days between swap charges (default is 1 for daily charges) |
| skipSWAPPeriods | int32 | Optional | Number of swap periods to skip before first charge |
| chargeSwapAtWeekends | bool | Optional | If TRUE, swap charges are applied on weekends |
| lastManualChartInvalidateTimestamp | int64 | Optional | Timestamp of last manual update of charts |
ProtoSymbolDistanceType¶
| Name | Value | Description |
|---|---|---|
| SYMBOL_DISTANCE_IN_POINTS | 1 | Distances measured in price points |
| SYMBOL_DISTANCE_IN_PERCENTAGE | 2 | Distances measured as percentage of current price |
ProtoTickbar¶
| Field | Type | Label | Description |
|---|---|---|---|
| period | ProtoTickbarPeriod | Optional | Tick aggregation period setting, default value handles .Net protobuf generator bug |
| low | uint64 | Required | Lowest price for the tick period in platform's internal price format |
| deltaOpen | uint64 | Required | Delta between open and low price in platform's internal price format |
| deltaClose | uint64 | Optional | Delta between close and low price in platform's internal price format |
| deltaHigh | uint64 | Required | Delta between high and low price in platform's internal price format |
| createTimestamp | uint64 | Required | Creation timestamp in milliseconds since epoch |
| volume | uint32 | Optional | Number of ticks in the bar |
ProtoTickbarPeriod¶
| Name | Value | Description |
|---|---|---|
| T2 | 2 | Chart based on 2 ticks |
| T3 | 3 | Chart based on 3 ticks |
| T4 | 4 | Chart based on 4 ticks |
| T5 | 5 | Chart based on 5 ticks |
| T6 | 6 | Chart based on 6 ticks |
| T7 | 7 | Chart based on 7 ticks |
| T8 | 8 | Chart based on 8 ticks |
| T9 | 9 | Chart based on 9 ticks |
| T10 | 10 | Chart based on 10 ticks |
| T15 | 15 | Chart based on 15 ticks |
| T20 | 20 | Chart based on 20 ticks |
| T25 | 25 | Chart based on 25 ticks |
| T30 | 30 | Chart based on 30 ticks |
| T40 | 40 | Chart based on 40 ticks |
| T50 | 50 | Chart based on 50 ticks |
| T60 | 60 | Chart based on 60 ticks |
| T80 | 80 | Chart based on 80 ticks |
| T90 | 90 | Chart based on 90 ticks |
| T100 | 100 | Chart based on 100 ticks |
| T150 | 150 | Chart based on 150 ticks |
| T200 | 200 | Chart based on 200 ticks |
| T250 | 250 | Chart based on 250 ticks |
| T300 | 300 | Chart based on 300 ticks |
| T500 | 500 | Chart based on 500 ticks |
| T750 | 750 | Chart based on 750 ticks |
| T1000 | 1000 | Chart based on 1000 ticks |
ProtoTimeframe¶
| Name | Value | Description |
|---|---|---|
| M1 | 1 | Chart timeframe 1 minute |
| M2 | 2 | Chart timeframe 2 minutes |
| M3 | 3 | Chart timeframe 3 minutes |
| M4 | 4 | Chart timeframe 4 minutes |
| M5 | 5 | Chart timeframe 5 minutes |
| M6 | 6 | Chart timeframe 6 minutes |
| M7 | 7 | Chart timeframe 7 minutes |
| M8 | 8 | Chart timeframe 8 minutes |
| M9 | 9 | Chart timeframe 9 minutes |
| M10 | 10 | Chart timeframe 10 minutes |
| M15 | 11 | Chart timeframe 15 minutes |
| M20 | 12 | Chart timeframe 20 minutes |
| M30 | 13 | Chart timeframe 30 minutes |
| M45 | 14 | Chart timeframe 45 minutes |
| H1 | 15 | Chart timeframe 1 hour |
| H2 | 16 | Chart timeframe 2 hours |
| H3 | 17 | Chart timeframe 3 hours |
| H4 | 18 | Chart timeframe 4 hours |
| H6 | 19 | Chart timeframe 6 hours |
| H8 | 20 | Chart timeframe 8 hours |
| H12 | 21 | Chart timeframe 12 hours |
| D1 | 22 | Chart timeframe 1 day |
| D2 | 23 | Chart timeframe 2 days |
| D3 | 24 | Chart timeframe 3 days |
| W1 | 25 | Chart timeframe 1 week |
| MN1 | 26 | Chart timeframe 1 month |
ProtoTimeInForce¶
| Name | Value | Description |
|---|---|---|
| GOOD_TILL_DATE | 1 | Order remains active until a specified date and time |
| GOOD_TILL_CANCEL | 2 | Order remains active until explicitly cancelled |
| IMMEDIATE_OR_CANCEL | 3 | Executes immediately, partially or completely, and cancels any unfilled portion |
| FILL_OR_KILL | 4 | Executes immediately and completely or not at all |
| MARKET_ON_OPEN | 5 | Executes at the market's opening price |
ProtoTotalMarginCalculationType¶
| Name | Value | Description |
|---|---|---|
| MAX | 0 | Takes the maximum margin requirement from all positions |
| SUM | 1 | Adds up the margin requirements from all positions |
| NET | 2 | Calculates margin based on net exposure across all positions |
ProtoTradeData¶
Represents a trade position related to specific order or position
| Field | Type | Label | Description |
|---|---|---|---|
| symbolId | int64 | Required | The unique identifier of the Symbol in specific server environment within cTrader platform |
| volume | int64 | Required | Volume in cents |
| tradeSide | ProtoTradeSide | Required | Buy, Sell |
| traderId | int64 | Optional | ID of the Trader |
| openTimestamp | int64 | Optional | UNIX timestamp in milliseconds when Position was opened or Order was created |
| closeTimestamp | int64 | Optional | UNIX timestamp in milliseconds when Position was closed |
| label | string | Optional | Text label specified during Order request. Used by cAlgo bots to identify its own orders. max length 100 |
| comment | string | Optional | Comment specified during Order request. max length 512 |
| channel | string | Optional | Channel specified during Order request. max length 100. For Open API client has prefix "OpenAPI_" |
| measurementUnits | string | Optional | Measurement units for Symbol |
| lotSize | int64 | Optional | Lot size of the Symbol (in cents) |
| spreadBetting | bool | Optional | TRUE for Spread Betting entities |
| stake | int64 | Optional | Stake for Spread Betting |
| desiredVWAP | double | Optional | Price desired by the client as an execution price. Used if checkTolerance = TRUE and for Book B |
| guaranteedStopLoss | bool | Optional | If TRUE then Position/Order Stop Loss is Guaranteed Stop Loss (GSL). Required for the Limited Risk accounts (ProtoTrader.isLimitedRisk=true). |
ProtoTrader¶
| Field | Type | Label | Description |
|---|---|---|---|
| traderId | int64 | Required | Unique identifier for the trader |
| login | int64 | Required | Login credential for the trader's account |
| groupId | int64 | Required | Reference to the trader group to which this trader belongs |
| balance | int64 | Required | Current account balance in cents |
| accountType | ProtoAccountType | Optional | Type of account determining position management behavior |
| name | string | Optional | First name of the trader |
| passwordHash | string | Optional | Hashed password for account security |
| description | string | Optional | Additional notes or description about the trader |
| status | string | Optional | Current status of the trader account |
| countryId | int64 | Optional | Reference to the country of residence |
| state | string | Optional | State or province of residence |
| city | string | Optional | City of residence |
| address | string | Optional | Street address |
| zipCode | string | Optional | Postal or ZIP code |
| phone | string | Optional | Contact phone number |
| phonePassword | string | Optional | Password used for phone verification |
| string | Optional | Contact email address | |
| documentId | string | Optional | SSN (IRD) |
| registrationTimestamp | int64 | Optional | Timestamp when the trader account was registered |
| lastConnectTimestamp | int64 | Optional | Timestamp of the last connection to the platform |
| online | bool | Optional | If TRUE, the trader is currently online and connected |
| utcLastUpdateTimestamp | int64 | Optional | Timestamp of the last update to this trader record |
| deleted | bool | Optional | if TRUE then account is deleted |
| balanceVersion | int64 | Optional | Version number for tracking balance changes |
| introducingBroker | bool | Optional | If TRUE, this trader account is an introducing broker |
| parentIntroducingBrokerIdIsNull | bool | Optional | If TRUE, this trader has no parent introducing broker |
| parentIntroducingBrokerId | int64 | Optional | ID of the parent introducing broker if applicable |
| introducingBrokerCommissionRate | int32 | Optional | Commission rate paid to this trader as an introducing broker |
| pocketCommissionRate | int32 | Optional | Commission rate paid to this trader's pocket account |
| pocketMarkupRate | int32 | Optional | Markup rate applied to this trader's pocket account |
| defaultIntroducingBrokerCommissionRate | int32 | Optional | Default commission rate for introducing brokers |
| defaultPocketCommissionRate | int32 | Optional | Default commission rate for pocket accounts |
| defaultPocketMarkupRate | int32 | Optional | Default markup rate for pocket accounts |
| defaultRebateRate | int32 | Optional | Default rebate rate for trading activity |
| defaultIbCommissionsType | ProtoCommissionType | Optional | Default commission type for introducing brokers |
| ibCommissionsType | ProtoCommissionType | Optional | Commission type used for this introducing broker |
| managerBonus | int64 | Optional | Bonus amount added by account manager in cents |
| ibBonus | int64 | Optional | Bonus amount added by introducing broker in cents |
| showPersonalData | bool | Optional | If TRUE, personal data is visible to broker management |
| splitRevenue | bool | Optional | If TRUE, revenue is split with parent introducing broker |
| rankIdIsNull | bool | Optional | If TRUE, this trader has no rank assigned |
| rankId | int32 | Optional | ID of the rank level assigned to this trader |
| hasRank | bool | Optional | If TRUE, this trader has a rank assigned |
| rank | RepeatedField<ProtoTraderRank> | Repeated | List of ranks available to this trader |
| lastName | string | Optional | Last name of the trader |
| defaultSplitRevenue | bool | Optional | Default setting for revenue splitting |
| accessRights | ProtoAccessRights | Optional | Level of account access permissions |
| sendOwnStatement | bool | Optional | If TRUE, statements are sent to the trader's email |
| depositAssetId | int64 | Optional | Required field. Refers to deposit CCY of the account |
| swapFree | bool | Optional | If TRUE then rolloverCommission is applied instead of swap |
| nonWithdrawableBonus | int64 | Optional | Current amount of Credit available for trader. Can be used for trading but cannot be withdrawn. |
| leverageInCents | uint32 | Optional | Account leverage multiplied by 100 (e.g. 500 = 5:1) |
| moveToIBGroup | bool | Optional | If TRUE, trader will be moved to IB group when becoming an IB |
| totalMarginCalculationType | ProtoTotalMarginCalculationType | Optional | Method used to calculate total margin requirement |
| brokerName | string | Optional | Name of the broker this trader account belongs to |
| maxLeverage | uint32 | Optional | Maximum allowed leverage for this account |
| freeTrades | bool | Optional | If TRUE, no commission is charged for trades |
| strategyProviderId | int64 | Optional | ID of the strategy provider if this is a copy trading account |
| version | int64 | Optional | Version number for tracking account changes |
| subAccountOf | int64 | Optional | Not null for sub-accounts. |
| maxNOP | uint32 | Optional | Value = 1 equal to 0.01% |
| disablePasswordLogin | bool | Optional | Primary used to disable FIX API login |
| isLimitedRisk | bool | Optional | If TRUE, account has limited risk features enabled |
| limitedRiskMarginCalculationStrategy | ProtoLimitedRiskMarginCalculationStrategy | Optional | Strategy used for calculating margin on limited risk accounts |
| moneyDigits | uint32 | Optional | Number of decimal places for monetary values |
| managementFee | int64 | Optional | Management fee for copy trading in cents |
| sendStatementToBroker | bool | Optional | Enables sending EOD reports to secondary email specified in report's settings |
| defaultIbCommissionSymbolCategory | RepeatedField<ProtoIbCommissionSymbolCategory> | Repeated | Will be copied into IB's clients upon linking |
| ibCommissionSymbolCategory | RepeatedField<ProtoIbCommissionSymbolCategory> | Repeated | Used to override IB commissions according to symbol categories |
| fairStopOut | bool | Optional | If TRUE - Position is fully closed on Stop Out regardless of ProtoGroup.fairStopOut, if FALSE - smart (partial closing) Stop Out is applied, if unspecified - Stop Out format is determined by ProtoGroup.fairStopOut |
| strategyProviderName | string | Optional | Name of the strategy provider if applicable |
| usedMargin | int64 | Optional | Used Margin is filled only in trader connection |
| stopOutStrategy | ProtoStopOutStrategy | Optional | The Stop Out strategy that is used for this Trader. This value overrides the value specified at the Group level. The Trader can change the value in the cTrader UI if allowTraderChangeSO is not FALSE at the Group level |
| accountLifetimeType | ProtoAccountLifetimeType | Optional | Account expiration policy: "UNLIMITED", "LIMITED_CREATION", "LIMITED_INACTIVITY", "LIMITED_CREATION_FREE" |
ProtoTraderRank¶
| Field | Type | Label | Description |
|---|---|---|---|
| id | int32 | Required | Unique identifier for the trader rank level |
| name | string | Required | Display name of the rank level |
| volume | int64 | Required | Trading volume threshold in USD cents required to achieve this rank |
| parentIbPercentage | int32 | Required | Percentage of commission shared with parent introducing broker at this rank |
| brokerPercentage | int32 | Required | Percentage of commission retained by the broker for traders at this rank |
ProtoTradeSide¶
| Name | Value | Description |
|---|---|---|
| BUY | 1 | Long position - trader profits when price increases |
| SELL | 2 | Short position - trader profits when price decreases |
ProtoTradingMode¶
| Name | Value | Description |
|---|---|---|
| ENABLED | 0 | Full Access. The symbol can be freely traded. |
| DISABLED_WITHOUT_PENDINGS_EXECUTION | 1 | Close Only. It is impossible to open new positions for this symbol. Any previously open positions can still be closed. |
| DISABLED_WITH_PENDINGS_EXECUTION | 2 | The symbol cannot be traded but any pending orders will still be executed. |
| CLOSE_ONLY_MODE | 3 | Fully Disallowed. The symbol cannot be traded; pending orders are automatically canceled. |
ProtoTrendbar¶
| Field | Type | Label | Description |
|---|---|---|---|
| volume | int64 | Required | Bar volume in ticks |
| period | ProtoTrendbarPeriod | Optional | Bar period. Default is set for handling .Net protobuf generator bug |
| low | int64 | Optional | Lowest price for the period. Specified in 1/100000 of unit of a price. 107716 means 1.07716, 47452000 means 474.52. |
| deltaOpen | uint64 | Optional | Delta between open and low price. Open = low + deltaOpen. Specified in 1/100000 of unit of a price. 107716 means 1.07716, 47452000 means 474.52. |
| deltaClose | uint64 | Optional | Delta between close and low price. Close = low + deltaClose. Specified in 1/100000 of unit of a price. 107716 means 1.07716, 47452000 means 474.52. |
| deltaHigh | uint64 | Optional | Delta between high and low price. High = low + deltaHigh. Specified in 1/100000 of unit of a price. 107716 means 1.07716, 47452000 means 474.52. |
| utcTimestampInMinutes | uint32 | Optional | UNIX timestamp of the bar, in minutes. Equal to the timestamp of the opening of the bar (e.g. if first tick for H1 came at 12:24:12, then utcTimestampInMinutes = 12:00:00 for respective date) |
| utcLastUpdateTimestamp | uint64 | Optional | UNIX timestamp of the last update time in milliseconds. Present only in live bars subscription. Absent for historical bars. |
ProtoTrendbarPeriod¶
| Name | Value | Description |
|---|---|---|
| M1 | 1 | 1 minute chart period |
| M2 | 2 | 2 minute chart period |
| M3 | 3 | 3 minute chart period |
| M4 | 4 | 4 minute chart period |
| M5 | 5 | 5 minute chart period |
| M10 | 6 | 10 minute chart period |
| M15 | 7 | 15 minute chart period |
| M30 | 8 | 30 minute chart period |
| H1 | 9 | 1 hour chart period |
| H4 | 10 | 4 hour chart period |
| H12 | 11 | 12 hour chart period |
| D1 | 12 | 1 day chart period |
| W1 | 13 | 1 week chart period |
| MN1 | 14 | 1 month chart period |
ProtoTrendbarType¶
| Name | Value | Description |
|---|---|---|
| REGULAR_OHLC | 0 | Regular trend bar type |
| HEIKIN_ASHI | 1 | Heikin-Ashi trend bar type |