# WhiteLabelStartAutotrade

Create a customer approval request for AutoTrading on the authenticated White Label site. This call does not activate trading. Give ApprovalUrl to the customer to open in their own browser; C2 requires customer presence, verify identity enrollment when needed, and electronic agreements before activation. ApprovalUrl must open as a top-level page, not an iframe. Poll GetAutotradeApprovalStatus. Repeated requests may return an existing approval; changed settings are not applied while approval is processing or AutoTrading is already on. To change an active setup, stop it and request a new customer approval. Never submit AccountUserName or AccountPassword: these fields are rejected on the White Label lane. Legacy StartAutotrade is unavailable to White Label callers. Non-paginated endpoint.

Endpoint: POST /Autotrade/WhiteLabelStartAutotrade
Version: v4
Security: 

## Request fields (application/json):

  - `Account` (string,null)
    The Autotrade account

  - `PersonId` (integer,null)
    The C2 PersonID

  - `BrokerId` (integer,null)
    The BrokerId

  - `StrategyId` (integer,null)
    The StrategyId

  - `ScalingPercentage` (integer)
    The Autotrade Scaling factor. e.g. Enter 105 for 105%

  - `FuturesEnabled` (boolean)
    (optional) TRUE to enable the Futures asset class when autotrading this strategy. Default is FALSE

  - `MaxFutures` (integer,null)
    (optional) Set a maximum number of contracts to hold in a position for this strategy

  - `ForexEnabled` (boolean)
    (optional) TRUE to enable autotrading Forex for this strategy. Default is FALSE

  - `MaxForex` (integer,null)
    (optional) Set a maximum number of units (each unit on C2 is 1000 currency units) to hold in a position for this strategy

  - `StocksEnabled` (boolean)
    (optional) TRUE to enable autotrading Stocks for this strategy. Default is FALSE

  - `MaxStocksDollars` (integer,null)
    (optional) Set a maximum number of dollars to hold in a position for this strategy (no decimals)

  - `OptionsEnabled` (boolean)
    (optional) TRUE to enable autotrading Options for this strategy. Default is FALSE

  - `ShortOptionsEnabled` (boolean)
    (optional) TRUE to enable the shorting of Options when autotrading this strategy. Default is FALSE

  - `MaxOptions` (integer,null)
    (optional) Set a maximum number of contracts to hold in a position for this strategy

  - `DoNotJoinCurrentSystemPositions` (boolean,null)
    (optional) TRUE to prevent joining currently open positions in the strategy. Only applies to new Autotrade setups: this setting must not be set when modifing an existing Autotrade setup.

  - `AutoStopLoss` (integer,null)
    (optional) Dollar value of the automated stop loss which will rest in addition to the strategy stop loss orders

  - `AccountUserName` (string,null)
    (optional) The Brokerage account username. Only needed for specific Brokers, please enquire with support at help@collective2.com

  - `AccountPassword` (string,null)
    (optional) The Brokerage account password. Only needed for specific Brokers, please enquire with support at help@collective2.com

## Response 200 fields (application/json):

  - `Results` (array,null)
    Result array

  - `Results.RequestId` (string,null)
    The RequestId returned by GetAutotradeApprovalStatus (an opaque UUID)

  - `Results.Status` (string,null)
    PendingCustomer | Processing | PendingBroker | Completed | Failed | Expired | Superseded

  - `Results.ApprovalUrl` (string,null)
    The customer approval page on your site's domain. Open it in front of your customer; present only while PendingCustomer.

  - `Results.StatusUrl` (string,null)
    Convenience URL of the matching GetAutotradeApprovalStatus poll.

  - `Results.ExpiresUtc` (string,null)
    UTC expiry of the approval link.

  - `Results.IsEnrollmentRequired` (boolean,null)
    True when the customer should expect the ~2-minute first-time identity ceremony; false means a single confirmation tap. Advisory: the approval page always decides live.

  - `Results.IsAlreadyRunning` (boolean,null)
    True when this (customer, strategy, account) was already actively autotrading: Status is Completed, no ApprovalUrl, and the submitted settings were NOT applied (changing settings is StopAutotrade then StartAutotrade — a fresh customer approval).

  - `Results.PersonId` (integer,null)
    The C2 PersonId

  - `Results.StrategyId` (integer,null)
    The Strategy ID

  - `ResponseStatus` (object)

  - `ResponseStatus.ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `ResponseStatus.Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `ResponseStatus.Errors` (array,null)

  - `ResponseStatus.Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `ResponseStatus.Errors.FieldName` (string,null)
    The affected parameter.

  - `ResponseStatus.Errors.Message` (string,null)
    More details about the ErrorCode.

## Response 400 fields (application/json):

  - `ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `Errors` (array,null)

  - `Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `Errors.FieldName` (string,null)
    The affected parameter.

  - `Errors.Message` (string,null)
    More details about the ErrorCode.

## Response 401 fields (application/json):

  - `ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `Errors` (array,null)

  - `Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `Errors.FieldName` (string,null)
    The affected parameter.

  - `Errors.Message` (string,null)
    More details about the ErrorCode.

## Response 403 fields (application/json):

  - `ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `Errors` (array,null)

  - `Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `Errors.FieldName` (string,null)
    The affected parameter.

  - `Errors.Message` (string,null)
    More details about the ErrorCode.

## Response 406 fields (application/json):

  - `ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `Errors` (array,null)

  - `Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `Errors.FieldName` (string,null)
    The affected parameter.

  - `Errors.Message` (string,null)
    More details about the ErrorCode.

## Response 409 fields (application/json):

  - `ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `Errors` (array,null)

  - `Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `Errors.FieldName` (string,null)
    The affected parameter.

  - `Errors.Message` (string,null)
    More details about the ErrorCode.

## Response 429 fields (application/json):

  - `ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `Errors` (array,null)

  - `Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `Errors.FieldName` (string,null)
    The affected parameter.

  - `Errors.Message` (string,null)
    More details about the ErrorCode.

## Response 500 fields (application/json):

  - `ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `Errors` (array,null)

  - `Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `Errors.FieldName` (string,null)
    The affected parameter.

  - `Errors.Message` (string,null)
    More details about the ErrorCode.

## Response 503 fields (application/json):

  - `ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `Errors` (array,null)

  - `Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `Errors.FieldName` (string,null)
    The affected parameter.

  - `Errors.Message` (string,null)
    More details about the ErrorCode.


