API reference
Update account connection
PATCH
https://api.tradesync.com/accounts/{account_id}/connectionQueue a reconnect after applying any supplied connection settings.
Last updated
Path parameters
- account_idType: integer
- Tradesync account ID belonging to the authenticated user
Request body
All fields are optional. Omitted fields are unchanged.
- passwordType: string
- MT4, MT5, DXtrade, or TradeLocker account passwordAccepted values / limits: —
- broker_server_idType: integer
- For MT4 and MT5, the ID must identify a broker server for the account's platform. Other platforms ignore IDs in the accepted range.Accepted values / limits: 1 to 9999999
- client_idType: string
- cTrader client IDAccepted values / limits: —
- client_secretType: string
- cTrader client secretAccepted values / limits: —
- access_tokenType: string
- cTrader or Match-Trader access tokenAccepted values / limits: —
- proxy_server_idType: integer or null
- Available for every platform. Use an active proxy-server ID belonging to the user, or pass
nullto remove the proxy.Accepted values / limits: —
DXtrade's server_address and TradeLocker's server_name and server_type are set at account creation. Check the account status for the connection outcome.
Response example
See response field definitions for field types and conditional fields.
Example for MT4 accounts. Fields vary with the application and whether the account has connected.
{
"result": "success",
"status": 200,
"data": {
"id": 1241453,
"created_at": "2025-04-23T14:15:50Z",
"updated_at": "2025-04-25T14:15:50Z",
"restored_at": "2025-04-25T11:26:35Z",
"application": "mt4",
"type": "full",
"account_name": "Test account 3",
"account_number": 5449295,
"password": "password12345",
"broker_server_id": 43,
"status": "attempt_connection",
"login_response": null,
"modify_disabled": "no",
"last_ping": "2025-04-25T14:14:30Z",
"broker": "ActivTrades Plc",
"client_name": "ben mcmullan",
"server": "Activtrades-Demo",
"trade_mode": "demo",
"leverage": 30,
"is_demo": "no",
"suffix": "s",
"currency": "USD",
"balance": 0,
"credit": 0,
"equity": 0,
"free_margin": 0,
"used_margin": 0,
"open_trades": 0,
"pending_orders": 0,
"open_trades_lots": 0,
"pending_orders_lots": 0,
"daily_profit": 0,
"weekly_profit": 0,
"monthly_profit": 0,
"total_profit": 0,
"account_identifier": 5449295,
"integration": "terminal",
"proxy_server_id": null,
"follower_only": "no",
"broker_offset": 0
}
}
Errors
| Code | HTTP status | Condition |
|---|---|---|
| account_maintenance | 422 | The account is in maintenance. |
| account_suspended | 422 | The account is suspended. |
| account_restoring | 422 | The account is being restored. |
| server_processing_request | 422 | A previous account setup or connection update is still being processed. |
| broker_server_id_invalid | 422 | The broker server does not exist for the account's MT4 or MT5 platform. |
| proxy_server_not_found | 422 | The proxy server does not exist or does not belong to the user. |
| proxy_server_not_active | 422 | The proxy server is not active. |
See also common response codes.