Tradesync
Browse API reference
API reference

Create account

POSThttps://api.tradesync.com/accounts

Create a connected trading account.

Last updated

Request examples

Platform example application
MetaTrader 4 mt4
MetaTrader 5 mt5
cTrader ctrader
DXtrade dxtrade
Match-Trader matchtrader
TradeLocker tradelocker

MetaTrader 4

This example creates a read-only account, which uses the direct integration.

{
    "account_name": "MT4 Read-Only Example",
    "account_number": 6123457,
    "password": "your-password",
    "application": "mt4",
    "broker_server_id": 119,
    "type": "readonly"
}

MetaTrader 5

This example uses the defaults of full for the account type and terminal for the integration.

{
    "application": "mt5",
    "account_name": "MT5 Example",
    "account_number": 7123458,
    "password": "your-password",
    "broker_server_id": 205
}

cTrader

The public API defaults to manual OAuth.

{
    "application": "ctrader",
    "account_name": "cTrader Example",
    "account_number": 823456,
    "account_id": 90234567,
    "client_id": "your-client-id",
    "client_secret": "your-client-secret",
    "access_token": "your-access-token",
    "server_type": "demo"
}

DXtrade

{
    "application": "dxtrade",
    "account_name": "DXtrade Example",
    "account_code": "DX12345",
    "username": "your-username",
    "password": "your-password",
    "server_address": "https://broker.example.com"
}

Match-Trader

{
    "application": "matchtrader",
    "account_name": "Match-Trader Example",
    "account_number": 934567,
    "access_token": "your-access-token"
}

TradeLocker

Use the id from the TradeLocker accounts list as account_number. The account type defaults to readonly.

{
    "application": "tradelocker",
    "account_name": "TradeLocker Example",
    "account_number": 123456,
    "email": "trader@example.com",
    "password": "your-password",
    "server_name": "YourBroker",
    "server_type": "demo"
}

Request body

account_nameType: stringRequired: Yes
Account reference nameAccepted values / limits: 4 to 30 characters; letters, digits, hyphens, underscores, and whitespaceDefault: —
applicationType: stringRequired: Yes
Trading platformAccepted values / limits: See the platform tableDefault: —
typeType: stringRequired: No
Account typeAccepted values / limits: readonly for TradeLocker, readonly or full for other platformsDefault: readonly for TradeLocker; full otherwise
integrationType: stringRequired: No
Connection integration. Applied only to full MT4/MT5 accounts; other accounts use direct.Accepted values / limits: terminal, directDefault: terminal for full MT4/MT5 accounts; direct otherwise
follower_onlyType: stringRequired: No
Restrict a full account to being a follower. Ignored for readonly accounts.Accepted values / limits: yes, noDefault: no
account_numberType: integerRequired: Conditional
Required for MT4, MT5, cTrader, Match-Trader, and TradeLocker. For TradeLocker, use id from the TradeLocker accounts list.Accepted values / limits: 1 to 9999999999999999999Default: —
passwordType: stringRequired: Conditional
Required for MT4, MT5, DXtrade, and TradeLocker. For read-only MT4 and MT5 accounts, use either the trading password or the investor password.Accepted values / limits: —Default: —
broker_server_idType: integerRequired: Conditional
Required for MT4 and MT5 and must identify a broker server for the selected platform. Other platforms ignore IDs in the accepted range. See Broker servers.Accepted values / limits: 1 to 9999999Default: —
account_codeType: stringRequired: Conditional
Required for DXtradeAccepted values / limits: —Default: —
usernameType: stringRequired: Conditional
Required for DXtradeAccepted values / limits: —Default: —
server_addressType: stringRequired: Conditional
Required for DXtrade. Supply the address used to connect to the account.Accepted values / limits: Up to 255 charactersDefault: —
emailType: stringRequired: Conditional
Required for TradeLockerAccepted values / limits: Valid email address, up to 255 charactersDefault: —
server_nameType: stringRequired: Conditional
Required for TradeLocker. Supply the account's server name along with its server_type.Accepted values / limits: Up to 255 charactersDefault: —
oauthType: stringRequired: No
OAuth mode for cTrader. The public API uses manual OAuth.Accepted values / limits: manualDefault: manual for cTrader
client_idType: stringRequired: Conditional
Required for cTraderAccepted values / limits: —Default: —
client_secretType: stringRequired: Conditional
Required for cTraderAccepted values / limits: —Default: —
account_idType: integerRequired: Conditional
cTrader platform account ID; required for cTrader. This is not a Tradesync account ID.Accepted values / limits: —Default: —
access_tokenType: stringRequired: Conditional
Required for cTrader and Match-TraderAccepted values / limits: —Default: —
server_typeType: stringRequired: Conditional
Required for cTrader and TradeLockerAccepted values / limits: demo, liveDefault: —
suffixType: string or nullRequired: No
Preferred symbol suffix for copying FX tradesAccepted values / limits: No whitespaceDefault: Not set
proxy_server_idType: integerRequired: No
Active proxy-server ID belonging to the user. Omit this field when no proxy is required.Accepted values / limits: —Default: Not set

Account types

Value Description
readonly Read account data and analysis without using the account for copiers or trading commands
full Enable trading and automation operations, subject to connection and platform support

Response example

This is the response to the MetaTrader 4 example. The new Tradesync account ID is in data.id. The example shows status as allocating while connection setup runs asynchronously.

See response field definitions for field types and conditional fields.

{
    "result": "success",
    "status": 200,
    "data": {
        "id": 1241433,
        "created_at": "2025-04-23T13:36:07Z",
        "updated_at": "2025-04-23T13:36:07Z",
        "restored_at": null,
        "application": "mt4",
        "type": "readonly",
        "account_name": "MT4 Read-Only Example",
        "account_identifier": 6123457,
        "account_number": 6123457,
        "password": "your-password",
        "broker_server_id": 119,
        "integration": "direct",
        "status": "allocating",
        "login_response": null,
        "modify_disabled": "no",
        "proxy_server_id": null,
        "follower_only": "no"
    }
}

Errors

Code HTTP status Condition
broker_server_id_invalid 422 The broker server does not exist for the selected MT4/MT5 application.
ctrader_managed_oauth_not_allowed 422 The request uses managed OAuth for a cTrader account. Public API requests use manual OAuth for cTrader.
too_many_accounts 422 The user has no remaining allowance for the requested account type.
proxy_server_not_found 422 The supplied proxy-server ID does not belong to the user or does not exist.
proxy_server_not_active 422 The supplied proxy server is not active.

See also common response codes.