Tradesync
Browse API reference
API reference

Get account

GEThttps://api.tradesync.com/accounts/{account_id}

Return an individual account.

Last updated

Path parameters

account_idType: integer
Tradesync account ID belonging to the authenticated user

Response example

Example for MT4 accounts. Fields vary with the application and whether the account has connected. The id field is the Tradesync account ID; account_identifier identifies the account on the connected trading platform.

{
    "result": "success",
    "status": 200,
    "data": {
        "id": 1241453,
        "created_at": "2025-04-23T14:15:50Z",
        "updated_at": "2025-04-25T11:27:17Z",
        "restored_at": "2025-04-25T11:26:35Z",
        "application": "mt4",
        "type": "full",
        "account_name": "Test account 1",
        "account_number": 5449295,
        "password": "KSaaog",
        "broker_server_id": 119,
        "status": "connection_ok",
        "login_response": null,
        "modify_disabled": "no",
        "last_ping": "2025-04-25T14:12:04Z",
        "broker": "ActivTrades Plc",
        "client_name": "ben mcmullan",
        "server": "Activtrades-Demo",
        "trade_mode": "demo",
        "leverage": 30,
        "is_demo": "no",
        "suffix": "",
        "currency": "USD",
        "balance": 20123.99,
        "credit": 0,
        "equity": 20379.59,
        "free_margin": 5038.52,
        "used_margin": 15341.07,
        "open_trades": 4,
        "pending_orders": 0,
        "open_trades_lots": 4,
        "pending_orders_lots": 0,
        "daily_profit": -5.61,
        "weekly_profit": 123.99,
        "monthly_profit": 123.99,
        "total_profit": 123.99,
        "account_identifier": 5449295,
        "integration": "terminal",
        "proxy_server_id": null,
        "follower_only": "no",
        "broker_offset": 0
    }
}

Response fields

Create, get, and update responses use this account shape; list responses contain an array of account objects. A conditionally included field is omitted when its condition does not apply.

Field Type Description
id integer Resource ID
created_at string Creation timestamp in UTC
updated_at string Update timestamp in UTC
restored_at string or null Restoration timestamp in UTC; null when no completed restoration is reported
application string Trading platform
type string readonly or full. TradeLocker accounts return readonly.
account_name string Account reference name
account_identifier integer or string Platform account identifier; a string account code for DXtrade and an account number for other applications
status string Current connection state
login_response string or null Connection feedback; null when no response is recorded
modify_disabled string yes or no
proxy_server_id integer or null Proxy-server ID; null when no proxy is assigned
follower_only string yes or no

Platform fields

Field Type Description
account_number integer Included for MT4, MT5, cTrader, Match-Trader, and TradeLocker
password string Included for MT4, MT5, DXtrade, and TradeLocker
broker_server_id integer Included for MT4 and MT5
integration string Included for MT4 and MT5; terminal or direct
oauth string Included for cTrader. manual indicates a connection using supplied credentials. managed indicates an account linked through the web application.
account_id integer Included for cTrader with manual OAuth; the cTrader platform account ID
client_id string Included for cTrader with manual OAuth
client_secret string Included for cTrader with manual OAuth
access_token string Included for Match-Trader and cTrader with manual OAuth
server_type string Included for TradeLocker and cTrader with manual OAuth. Returns demo or live.
account_code string Included for DXtrade
username string Included for DXtrade
server_address string Included for DXtrade
email string Included for TradeLocker
server_name string Included for TradeLocker

Connection fields

These fields are included only after the account has connected at least once. They remain present if the connection is subsequently lost:

last_ping, broker, broker_offset, client_name, server, trade_mode, leverage, is_demo, suffix, currency, balance, credit, equity, free_margin, used_margin, open_trades, pending_orders, open_trades_lots, pending_orders_lots, daily_profit, weekly_profit, monthly_profit, and total_profit.

Field Type Description
last_ping string or null Last connection update timestamp in UTC; null when unavailable
trade_mode string or null demo, contest, or real; null when unavailable
suffix string or null Configured or detected symbol suffix; can be cleared to null

Account status

status reports the current connection state. Suspension, maintenance, restoration, and setup or login stages take precedence over the age of the last report. For this endpoint and the account list, Tradesync uses the cached last_ping when available and falls back to the stored value.

Value Description
suspended Account suspended
maintenance Account undergoing maintenance
restoring Deleted account being restored
allocating Account awaiting server allocation
installing Account connection being installed
attempt_connection Connection being attempted
attempt_success Login attempt succeeded
attempt_failed Login attempt failed; inspect login_response
no_ping No connection update has been recorded
connection_ok Last connection update was at most one minute ago
connection_slow Last connection update was more than one minute and at most ten minutes ago
connection_lost Last connection update was more than ten minutes ago

See Connection health and restrictions for examples of how to interpret report age. Use Account Events to look up past connection changes.

Login response

The login_response field reports account login feedback. Use status for the current connection state.

Value Description
null No login response recorded; inspect status for connection state
login_success Login attempt succeeded
invalid_account Account credentials were rejected
no_connection Could not connect to the trading server
investor_mode MT4/MT5 account uses an investor password; trading is unavailable
no_info No login feedback is available