### Get Command API Response Example Source: https://www.tradesync.com/developers/developers/get-command An example JSON response returned by the 'Get command' endpoint, illustrating the structure and typical data fields for a command object, including its ID, timestamps, account details, application, group, event, status, and various durations. ```JSON { "result": "success", "status": 200, "data": { "id": 914925107, "created_at": "2025-04-28T10:11:50Z", "updated_at": "2025-04-28T10:11:50Z", "account_id": 1241451, "application": "mt5", "group": "trade", "event": "position_close", "event_id": 1786890952, "copier_id": 1311250, "lead_id": 1242495, "command": "close_full", "status": "abandoned", "retry_rate": "millisecond", "result": "not_found", "mt_error": null, "by": "magic", "trade_id": 1213554740, "command_duration": null, "broker_duration": null, "total_duration": null } } ``` -------------------------------- ### Example Request for Create Webhook API Source: https://www.tradesync.com/developers/developers/create-webhook Provides a JSON example demonstrating how to create a webhook with 'none' authentication. ```JSON { "url":"http://test.com", "authentication":"none" } ``` -------------------------------- ### Sample HTTP GET Request to TradeSync Accounts Endpoint Source: https://www.tradesync.com/developers/developers/request-format This example demonstrates a complete HTTP GET request to the '/accounts' endpoint, including the Authorization header with placeholder credentials. It shows the typical structure for interacting with the TradeSync API. ```HTTP GET https://api.tradesync.com/accounts GET /accounts HTTP/1.1 Authorization: Basic SDsdWTnpzOUpiS0pRQ1pVdGY3V3Q6VVE4SzZXaWJmZVZtbDBRelpMaXA= Accept: */* Host: api.tradesync.com Accept-Encoding: gzip, deflate, br Connection: keep-alive ``` -------------------------------- ### JSON Request Example for Create Equity Monitor Source: https://www.tradesync.com/developers/developers/create-equity-monitor An illustrative JSON payload demonstrating the structure and typical values for creating an equity monitor via the API. This example shows how to specify the account, monitor type, trigger value, and desired action. ```json { "account_id": 1241453, "type": "protect_value", "value": 5001300, "action": "alert_disable_copiers_close_trades" } ``` -------------------------------- ### Sample HTTP GET Request with Basic Authentication Source: https://www.tradesync.com/developers/developers/authentication An example of an HTTP GET request to the '/account' endpoint, demonstrating how to include the Base64-encoded API key and secret in the 'Authorization' header for Basic authentication. The request specifies the host and content type. ```HTTP GET /account HTTP/1.0 Host: app.tradesync.com Content-Type: application/json Authorization: Basic SDdWTopzOUpiS0pRQ1pVdGY3V3Q6VVE4SzZXaWJmZVZtbDBRelpMaXO ``` -------------------------------- ### Tradesync Account API Response Example Source: https://www.tradesync.com/developers/developers/create-account Provides a sample JSON structure illustrating a successful Tradesync account API response with typical data values. ```JSON { "result": "success", "status": 200, "data": { "id": 1241433, "created_at": "2025-04-23T13:36:07Z", "updated_at": "2025-04-23T13:36:07Z", "restored_at": null, "type": "readonly", "application": "mt4", "account_name": "Test account 1", "account_number": 5449295, "password": "KSaaog", "broker_server_id": 119, "status": "allocating", "login_response": null, "modify_disabled": "no" } } ``` -------------------------------- ### TradeSync API Successful Response Example Source: https://www.tradesync.com/developers/developers/response-format Example of a successful API response from TradeSync, detailing the common attributes like result, status, meta (for pagination/count), and data, which contains the requested resource's details. ```JSON { "result": "success", "status": 200, "meta": { "count": 9, "limit": 1000, "order": "desc", "last_id": 1 }, "data": { "id": 1, "created_at": "2023-04-21T10:34:23Z", "updated_at": "2023-04-28T13:32:35Z", "restored_at": null, "account_name": "Test account", "account_number": 12345, "password": "122345", "broker_server_id": 119, "status": "connection_ok", "login_response": null, "last_ping": "2023-04-28T13:32:35Z", "broker": "Test broker", "client_name": "test user", "server": "Broker-Demo", "trade_mode": "demo", "leverage": 30, "is_demo": "no", "suffix": "", "equity_protect": "off", "equity_protect_value": null, "currency": "GBP", "balance": 100000.15, "credit": 0, "equity": 100064.39, "free_margin": 97491.73, "used_margin": 2572.66, "open_trades": 1, "pending_orders": 0, "open_trades_lots": 0.97, "pending_orders_lots": 0, "daily_profit": 0, "weekly_profit": 0.15, "monthly_profit": 0.15, "total_profit": 0.15 } } ``` -------------------------------- ### Example Request Body for Create Account API Source: https://www.tradesync.com/developers/developers/create-account This JSON object demonstrates a sample request body for the 'Create account' API endpoint, showing the required fields like account name, number, password, application, broker server ID, and account type. ```JSON { "account_name": "Test account 1", "account_number": 5449295, "password":"KSaaog", "application": "mt4", "broker_server_id": 119, "type": "readonly" } ``` -------------------------------- ### Trade Copier API Response Example Source: https://www.tradesync.com/developers/developers/create-trade-copier Example JSON response received after a successful trade copier operation. It includes the overall result and status, along with a data object containing the current configuration and status of the trade copier. ```json { "result": "success", "status": 200, "data": { "id": 1309158, "created_at": "2025-04-23T14:33:50Z", "updated_at": "2025-04-23T14:33:50Z", "lead_id": 1241453, "follower_id": 1241451, "risk_type": "risk_multiplier_by_balance", "risk_value": 1, "mode": "off", "reverse": "no", "force_min": "no", "max_lot": 50, "slippage": 100, "copy_pending": "no", "copy_sl": "no", "fixed_sl": null, "copy_tp": "no", "fixed_tp": null, "comment": null } } ``` -------------------------------- ### Example API Response for Equity Monitor Source: https://www.tradesync.com/developers/developers/create-equity-monitor Illustrates a successful JSON response structure for an equity monitor operation, including its ID, timestamps, account details, status, type, value, and action. This example shows a 'protect_value' type with an 'alert_disable_copiers_close_trades' action. ```json { "result": "success", "status": 200, "data": { "id": 64172, "created_at": "2025-04-23T14:52:31Z", "updated_at": "2025-04-23T14:52:31Z", "account_id": 1241453, "status": "active", "type": "protect_value", "value": 5001300, "action": "alert_disable_copiers_close_trades" } } ``` -------------------------------- ### TradeSync Equity Monitors API Endpoints Source: https://www.tradesync.com/developers/developers/get-equity-monitor Documentation for the TradeSync Equity Monitors API, including methods to manage and retrieve details about equity monitoring setups. ```APIDOC Equity Monitors API: GET /equity-monitors: Get all equity monitors GET /equity-monitors/{id}: Get a specific equity monitor by ID POST /equity-monitors: Create a new equity monitor PATCH /equity-monitors/{id}: Update an existing equity monitor ``` -------------------------------- ### JSON Request Example for Create Close Command Source: https://www.tradesync.com/developers/developers/create-close-command An example JSON payload demonstrating the structure and values required to create a close command via the API. ```JSON { "account_id":{account_id}, "command_id":915067825, "command":"close_full", "by": "magic", "trade_id":1213753146 } ``` -------------------------------- ### JavaScript Fetch API Example for Tradesync Authentication Source: https://www.tradesync.com/developers/developers/authentication A JavaScript example using the Fetch API to make a GET request to the Tradesync '/accounts/' endpoint. It demonstrates how to construct the 'Authorization' header by Base64 encoding the API key and secret using `btoa()` and handles both successful JSON responses and errors. ```JavaScript fetch("https://api.tradesync.com/accounts/",{ headers: { 'Authorization':'Basic ' + btoa('H7VNs9JbKJQCZUtf7Wt:UQ8K6WibfeVml0QzZLis') } }).then((response) => { if(response.ok){ return response.json(); } throw response; }).then((data) => { console.log(data); }).catch((error) => { console.log(error); }) } ``` -------------------------------- ### Trade Copier API Request Example Source: https://www.tradesync.com/developers/developers/create-trade-copier Example JSON payload for initiating a trade copier request. It specifies the lead and follower account IDs, the desired risk calculation type, and its corresponding value. ```json { "lead_id": 1241453, "follower_id": 1241451, "risk_type": "risk_multiplier_by_balance", "risk_value": 1 } ``` -------------------------------- ### JSON Response Example for Create Close Command Source: https://www.tradesync.com/developers/developers/create-close-command An example JSON response returned by the API after a successful 'Create Close Command' request, showing the resulting command details. ```JSON { "result": "success", "status": 200, "data": { "id": 915068854, "created_at": "2025-04-28T13:15:11Z", "updated_at": "2025-04-28T13:15:11Z", "account_id": 1242495, "application": "mt5", "group": "user", "event": null, "event_id": null, "copier_id": null, "lead_id": null, "command": "close_full", "status": "working", "retry_rate": "millisecond", "result": null, "mt_error": null, "by": "magic", "trade_id": 1213753146, "command_duration": null, "broker_duration": null, "total_duration": null } } ``` -------------------------------- ### Example API Response for Account Data Source: https://www.tradesync.com/developers/developers/get-all-accounts This JSON object illustrates the structure of a successful API response when fetching account data, including metadata and a list of individual account details such as financial metrics, status, and configuration. ```JSON { "result": "success", "status": 200, "meta": { "count": 2, "limit": 1000, "order": "desc", "last_id": 1241451 }, "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:34Z", "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": 20388.31, "free_margin": 5047.24, "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 }, { "id": 1241451, "created_at": "2025-04-23T14:12:47Z", "updated_at": "2025-04-25T11:27:02Z", "restored_at": "2025-04-25T11:26:21Z", "application": "mt4", "type": "full", "account_name": "Test account 2", "account_number": 5449289, "password": "BUfnpv", "broker_server_id": 119, "status": "connection_ok", "login_response": null, "modify_disabled": "no", "last_ping": "2025-04-25T14:13:02Z", "broker": "ActivTrades Plc", "client_name": "ben mcmullan", "server": "Activtrades-Demo", "trade_mode": "demo", "leverage": 1, "is_demo": "no", "suffix": "", "currency": "USD", "balance": 100000.74, "credit": 0, "equity": 100021.2, "free_margin": 95288.13, "used_margin": 4733.07, "open_trades": 6, "pending_orders": 0, "open_trades_lots": 0.06, "pending_orders_lots": 0, "daily_profit": 0, "weekly_profit": 0.74, "monthly_profit": 0.74, "total_profit": 0.74 } ] } ``` -------------------------------- ### Response Example: Successful Account Connection Update Source: https://www.tradesync.com/developers/developers/update-account-connection Provides an example of a successful JSON response after updating an account connection, including detailed account information such as ID, status, broker, and financial metrics. ```JSON { "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 } } ``` -------------------------------- ### Example Trade Event API Response Source: https://www.tradesync.com/developers/developers/get-all-trade-events A sample JSON object illustrating the structure of a successful response from the TradeSync API for trade events, including metadata and an array of individual trade event objects. ```JSON { "result": "success", "status": 200, "meta": { "count": 197, "limit": 1000, "order": "desc", "last_id": 3236 }, "data": [ { "id": 1786080051, "created_at": "2025-04-25T14:17:24Z", "updated_at": "2025-04-25T14:17:24Z", "account_id": 1242495, "group": "trade", "event": "position_open", "event_id": null, "trade_id": 1212851510, "ticket": 411142456, "type": "buy", "symbol": "USDJPY", "lots": 1, "open_time": "2025-04-25T11:59:24Z", "open_price": 143.62, "stop_loss": 0, "take_profit": 0, "close_time": null, "close_price": 143.801, "commission": 0, "swap": 0, "profit": 125.87, "balance": 20123.99, "credit": 0, "equity": 20358.76, "comment": "", "magic": 0, "digits": 3, "tick_value": 0.69540546, "tick_size": 0.001, "alt_tick_value": 0.6951585, "profit_calc_mode": "forex" }, { "id": 1786080050, "created_at": "2025-04-25T14:17:24Z", "updated_at": "2025-04-25T14:17:24Z", "account_id": 1242495, "group": "trade", "event": "position_open", "event_id": null, "trade_id": 1212851509, "ticket": 411142321, "type": "buy", "symbol": "GBPUSD", "lots": 1, "open_time": "2025-04-25T11:55:33Z", "open_price": 1.33009, "stop_loss": 0, "take_profit": 0, "close_time": null, "close_price": 1.33126, "commission": 0, "swap": 0, "profit": 117, "balance": 20123.99, "credit": 0, "equity": 20358.76, "comment": "", "magic": 0, "digits": 5, "tick_value": 1, "tick_size": 1.0e-5, "alt_tick_value": 1, "profit_calc_mode": "forex" }, .....more events..... ] } ``` -------------------------------- ### Example JSON Response for Trade Data Source: https://www.tradesync.com/developers/developers/get-all-trades Illustrates the structure of a successful API response when fetching trade data, including metadata and an array of individual trade objects with detailed properties like ID, timestamps, prices, and profit. ```json { "result": "success", "status": 200, "meta": { "count": 1000, "limit": 1000, "order": "desc", "last_id": 767898156 }, "data": [ { "id": 1212851507, "created_at": "2025-04-25T14:17:24Z", "updated_at": "2025-04-25T14:45:14Z", "state": "open", "account_id": 1242495, "ticket": 411112093, "type": "buy", "symbol": "EURUSD", "lots": 1, "open_time": "2025-04-24T17:38:22Z", "open_price": 1.13553, "stop_loss": 0, "take_profit": 0, "close_time": null, "close_price": 1.13726, "commission": 0, "swap": -7.1, "profit": 173, "comment": "", "magic": 0, "digits": 5, "tick_value": 1, "tick_size": 1.0e-5, "alt_tick_value": 1, "profit_calc_mode": "forex" }, { "id": 1212512280, "created_at": "2025-04-25T09:55:33Z", "updated_at": "2025-04-25T14:36:32Z", "state": "open", "account_id": 1241451, "ticket": 411142322, "type": "buy", "symbol": "GBPUSD", "lots": 0.01, "open_time": "2025-04-25T11:55:33Z", "open_price": 1.33009, "stop_loss": 0, "take_profit": 0, "close_time": null, "close_price": 1.3311, "commission": 0, "swap": 0, "profit": 1.01, "comment": "", "magic": 1212512279, "digits": 5, "tick_value": 1, "tick_size": 1.0e-5, "alt_tick_value": 1, "profit_calc_mode": "forex" }, .....more trades..... ] } ``` -------------------------------- ### Get All Copier Maps API Endpoint Source: https://www.tradesync.com/developers/developers/get-all-copier-maps Documents the GET API endpoint used to retrieve a list of individual copier symbols maps. It includes the endpoint path, a brief description of its purpose, and an example of the successful JSON response structure. ```APIDOC GET /copiers/{copier_id}/maps Description: Retrieve a list of individual copier symbols maps. ``` ```JSON { "result": "success", "status": 200, "meta": { "count": 2, "limit": 1000, "order": "desc", "last_id": 398430 }, "data": [ { "id": 398431, "created_at": "2025-04-25T15:01:25Z", "updated_at": "2025-04-25T15:01:25Z", "lead_symbol_id": 272379135, "follower_symbol_id": 272354436, "lead_symbol": "Ger40", "follower_symbol": "Ger40Jun25" }, { "id": 398430, "created_at": "2025-04-25T15:01:13Z", "updated_at": "2025-04-25T15:01:13Z", "lead_symbol_id": 272379197, "follower_symbol_id": 272354498, "lead_symbol": "UsaTec", "follower_symbol": "UsaTecJun25" } ] } ``` -------------------------------- ### Equity Monitors API Endpoints Source: https://www.tradesync.com/developers/developers/trades-introduction Lists API endpoints for managing equity monitors, including creation, retrieval, and updates. ```APIDOC Equity Monitors API: GET /developers/get-all-equity-monitors: Get all equity monitors. GET /developers/get-equity-monitor: Get a specific equity monitor. POST /developers/create-equity-monitor: Create a new equity monitor. PATCH /developers/update-equity-monitor: Update an existing equity monitor. ``` -------------------------------- ### API Documentation for Create Open Command Source: https://www.tradesync.com/developers/developers/create-open-command Comprehensive API documentation for the 'Create open command' endpoint, including its method, path, detailed description, request body parameters, and expected response structure. This endpoint allows users to initiate a trade on any account on the platform by specifying trade parameters. ```APIDOC Endpoint: POST /commands Description: Create open command allows you to make a open a trade on any account on the platform. To create a command you must target a full account with the desired parameters. Request Body Parameters: account_id: (required) The ID of the target account. command: "open" (required) Specifies the command type. type: "buy" or "sell" (required) The type of trade. symbol: (required) The trading symbol (e.g., "EURUSD"). open_price: (required) The desired open price. lots: (required) The volume of the trade. magic: (optional) A magic number for the trade. comment: (optional) A comment for the trade. Response Body Fields: result: "success" or "error" status: HTTP status code (e.g., 200) data: Object containing details of the created command. id: Unique ID of the command. created_at: Timestamp of creation. updated_at: Timestamp of last update. account_id: ID of the account. application: e.g., "mt5" group: e.g., "user" event: null event_id: null copier_id: null lead_id: null command: "open" status: "working", "completed", etc. retry_rate: e.g., "millisecond" result: null (initially), or final result. mt_error: null or error message from MT. symbol: Trading symbol. open_price: Open price. lots: Trade volume. type: Trade type. stop_loss: Stop loss price. take_profit: Take profit price. comment: Trade comment. magic: Magic number. command_duration: Duration of command processing. broker_duration: Duration at broker. total_duration: Total duration. ``` ```JSON { "account_id":{account_id}, "command":"open", "type":"buy", "symbol":"EURUSD", "open_price":1.13550, "lots":0.01, "magic": 123, "comment":"nonce" } ``` ```JSON { "result": "success", "status": 200, "data": { "id": 914926923, "created_at": "2025-04-28T10:16:41Z", "updated_at": "2025-04-28T10:16:41Z", "account_id": 1242495, "application": "mt5", "group": "user", "event": null, "event_id": null, "copier_id": null, "lead_id": null, "command": "open", "status": "working", "retry_rate": "millisecond", "result": null, "mt_error": null, "symbol": "EURUSD", "open_price": 1.1355, "lots": 0.01, "type": "buy", "stop_loss": 0, "take_profit": 0, "comment": "test", "magic": 123, "command_duration": null, "broker_duration": null, "total_duration": null } } ``` -------------------------------- ### Get Account Symbol API Endpoint Source: https://www.tradesync.com/developers/developers/get-account-symbol Documents the API endpoint for retrieving an individual account symbol. It specifies the HTTP GET method, the required path parameters, and provides an example of the successful JSON response structure. ```APIDOC Method: GET Endpoint: /accounts/{account_id}/symbols/{account_symbol_id} Description: Deletes an individual account symbol. Response: { "result": "success", "status": 200, "data": { "id": 272379201, "created_at": "2025-04-25T14:17:24Z", "updated_at": "2025-04-25T14:20:34Z", "symbol": "WheatMay25", "active": "no", "profit_calc_mode": "cfd", "base_currency": "USD", "profit_currency": "USD", "contract_size": 50, "tick_value": 12.5, "tick_size": 0.25, "min_lot": 0.01, "max_lot": 10, "lot_step": 0.01, "stop_level": 100 } } ``` -------------------------------- ### Get Individual Trade API Endpoint Source: https://www.tradesync.com/developers/developers/get-trade Documents the GET /trades/{trade_id} endpoint, which allows retrieval of details for a specific individual trade. The documentation includes the endpoint path, a brief description of its functionality, an example JSON response, and a table explaining the attributes returned in the response. ```APIDOC Method: GET Endpoint: /trades/{trade_id} Description: Return an individual trade. Response Example: { "result": "success", "status": 200, "data": { "id": 1212071730, "created_at": "2025-04-24T15:38:22Z", "updated_at": "2025-04-25T14:36:32Z", "state": "open", "account_id": 1241451, "ticket": 411112094, "type": "buy", "symbol": "EURUSD", "lots": 0.01, "open_time": "2025-04-24T17:38:22Z", "open_price": 1.13553, "stop_loss": 0, "take_profit": 0, "close_time": null, "close_price": 1.13706, "commission": 0, "swap": -0.07, "profit": 1.53, "comment": "", "magic": 1212071728, "digits": 5, "tick_value": 1, "tick_size": 1.0e-5, "alt_tick_value": 1, "profit_calc_mode": "forex" } } Attributes: - magic: single integer - The magic number corresponds to the master's trade_id for this copied trade. If this is the master it will be 0 ``` -------------------------------- ### TradeSync API: General Concepts Source: https://www.tradesync.com/developers/developers/get-all-equity-monitors Fundamental API documentation covering introduction, authentication methods, request and response formats, common response codes, pagination, and filtering. ```APIDOC Introduction Authentication Request format Response format Common response codes Pagination Filtering ``` -------------------------------- ### Example JSON Response for Get Disabled Symbols API Source: https://www.tradesync.com/developers/developers/get-disabled-symbols Provides a sample JSON response structure for a successful call to the GET /copiers/{copier_id}/disabled-symbols endpoint. The response includes a status, metadata about the results, and an array of disabled symbol objects, each with an ID, timestamps, and lead symbol details. ```JSON { "result": "success", "status": 200, "meta": { "count": 2, "limit": 1000, "order": "desc", "last_id": 34960030 }, "data": [ { "id": 34960031, "created_at": "2025-04-25T15:19:46Z", "updated_at": "2025-04-25T15:19:46Z", "lead_symbol_id": 272379185, "lead_symbol": "USDRUB" }, { "id": 34960030, "created_at": "2025-04-25T15:19:40Z", "updated_at": "2025-04-25T15:19:40Z", "lead_symbol_id": 272379070, "lead_symbol": "AUDCAD" } ] } ``` -------------------------------- ### TradeSync Equity Monitors API Endpoints Overview Source: https://www.tradesync.com/developers/developers/create-account Overview of API endpoints for managing equity monitors, including creation and updates. ```APIDOC Equity monitors introduction Get all equity monitors Get equity monitor Create equity monitor Update equity monitor ``` -------------------------------- ### Get Individual Broker API Endpoint Source: https://www.tradesync.com/developers/developers/get-broker Documentation for retrieving details of a single broker using its ID, including the HTTP method, endpoint path, and an example successful JSON response. ```APIDOC GET /brokers/{broker_id} Description: Returns an individual broker. Response: { "result": "success", "status": 200, "data": { "id": 1843, "created_at": "2025-04-24T17:23:36Z", "updated_at": "2025-04-24T17:23:36Z", "name": "GatesFX", "application": "mt5" } } ``` -------------------------------- ### TradeSync API Introduction Source: https://www.tradesync.com/developers/developers/introduction Provides an overview and introduction to the TradeSync API, outlining its purpose and capabilities. ```APIDOC Introduction to TradeSync API ``` -------------------------------- ### Get Account Event API Reference Source: https://www.tradesync.com/developers/developers/get-account-event Detailed API documentation for retrieving a single account event by its unique ID, including the endpoint, an example successful response, and a comprehensive list of possible event types and their descriptions. ```APIDOC Method: GET Endpoint: /events/accounts/{account_event_id} Description: Returns a individual account event. ``` ```json { "result": "success", "status": 200, "data": { "id": 1372921508, "created_at": "2025-04-25T14:17:24Z", "updated_at": "2025-04-25T14:17:24Z", "account_id": 1242495, "group": "account", "event": "connected", "event_id": null } } ``` ```APIDOC Attributes: Events: - Value: connected Description: The account has been connected - Value: not_connected Description: The account is not connected - Value: reconnected Description: The account has been reconnected - Value: out_of_sync Description: The account is out of sync - Value: in_sync Description: The account is in sync - Value: equity_alert Description: An alert that the account equity has hit a certain value - Value: equity_alert_disable_copiers Description: An equity alert that disables the copier at a certain equity - Value: equity_disable_copiers_close_trades Description: An equity alert that closes trades at a certain equity - Value: equity_alert_enabled_by_user Description: The equity alert has been enabled by the user - Value: equity_alert_modified_by_user Description: The equity alert has been modified by the user - Value: equity_alert_disabled_by_user Description: The equity alert has been disabled by the user ``` -------------------------------- ### TradeSync API General Information Source: https://www.tradesync.com/developers/developers/create-open-command Provides an overview of the TradeSync API, including authentication methods, request and response formats, common response codes, pagination, and filtering capabilities. ```APIDOC API Menu - Select Option Introduction Authentication Request format Response format Common response codes Pagination Filtering ``` -------------------------------- ### TradeSync API Endpoints Overview Source: https://www.tradesync.com/developers/developers/get-account This section provides an overview of the available API endpoints for managing trades, trade events, copiers, copier events, equity monitors, commands, command events, and webhooks within the TradeSync platform. It lists various GET, POST, PATCH, and DELETE operations for each resource. ```APIDOC trades: - GET /developers/trades-introduction - GET /developers/get-all-trades - GET /developers/get-trade trade events: - GET /developers/trade-events-introduction - GET /developers/get-all-trade-events - GET /developers/get-trade-event copiers: - GET /developers/copiers-introduction - GET /developers/get-all-trade-copiers - GET /developers/get-trade-copier - POST /developers/create-trade-copier - PATCH /developers/update-trade-copier - DELETE /developers/delete-trade-copier - DELETE /developers/delete-disabled-symbol - POST /developers/create-disabled-symbol - GET /developers/get-disabled-symbol - GET /developers/get-disabled-symbols - POST /developers/create-disabled-symbol-bulk - DELETE /developers/delete-disabled-symbol-bulk - GET /developers/get-all-copier-maps - POST /developers/create-copier-map - DELETE /developers/delete-copier-map copier events: - GET /developers/copier-events-introduction - GET /developers/get-all-copier-events - GET /developers/get-copier-event equity monitors: - GET /developers/equity-monitors-introduction - GET /developers/get-all-equity-monitors - GET /developers/get-equity-monitor - POST /developers/create-equity-monitor - PATCH /developers/update-equity-monitor commands: - GET /developers/commands-introduction - GET /developers/get-all-commands - GET /developers/get-command - POST /developers/create-open-command - POST /developers/create-modify-command - POST /developers/create-close-command - PATCH /developers/update-command command events: - GET /developers/command-events-introduction - GET /developers/get-all-command-events - GET /developers/get-command-event webhooks: - GET /developers/webhooks-introduction - GET /developers/get-all-webhooks - GET /developers/get-webhook - POST /developers/create-webhook - PATCH /developers/update-webhook - DELETE /developers/delete-webhook ``` -------------------------------- ### Get Broker Server API Endpoint Source: https://www.tradesync.com/developers/developers/get-broker-server Provides details for retrieving a specific broker server by its unique identifier. This includes the HTTP method, the endpoint path with a placeholder for the server ID, and an example of the successful JSON response structure. ```APIDOC GET /broker-servers/{broker_server_id} Description: Returns an individual broker server. ``` ```JSON { "result": "success", "status": 200, "data": { "id": 4971, "created_at": "2025-04-23T16:46:49Z", "updated_at": "2025-04-23T16:46:49Z", "broker_id": 272, "application": "mt5", "name": "VantageInternational-Live 7" } } ``` -------------------------------- ### Commands API Endpoints Source: https://www.tradesync.com/developers/developers/trades-introduction Lists API endpoints for managing trading commands, including creation of open, modify, and close commands, and retrieving/updating commands. ```APIDOC Commands API: GET /developers/get-all-commands: Get all commands. GET /developers/get-command: Get a specific command. POST /developers/create-open-command: Create an open command. POST /developers/create-modify-command: Create a modify command. POST /developers/create-close-command: Create a close command. PATCH /developers/update-command: Update an existing command. ``` -------------------------------- ### TradeSync Brokers API Endpoints Source: https://www.tradesync.com/developers/developers/create-open-command API documentation for retrieving information about integrated brokers and their servers supported by TradeSync. ```APIDOC Brokers introduction GET Get broker GET Get all brokers GET Get broker server GET Get all broker servers ``` -------------------------------- ### Initial API Request for Trade History (Ascending) Source: https://www.tradesync.com/developers/developers/pagination Makes the initial API call to retrieve trade history for a specific account in ascending order, without a last ID set, to get the first set of records. This is typically the starting point for fetching all data. ```APIDOC /trade?account_id=123&order=asc ``` -------------------------------- ### Brokers Introduction and API Context Source: https://www.tradesync.com/developers/developers/brokers-introduction Describes the concept of brokers and broker servers supported by the Tradesync platform, and their use case for managing trading accounts. It also lists related API endpoints for brokers. ```APIDOC Brokers Introduction: Description: Brokers describe all brokerages currently supported on the Tradesync platform. You require a trading account from one of our supported brokers. Broker servers describe all the available broker servers on the platform. Each broker server belongs to a broker. Use case: As an account manager you can manage multiple trading accounts from many different brokers. When adding a trading account to the platform, you will need to provide the broker_server_id of the broker server your trading account is using. This can be retrieved from broker servers. Related Endpoints: GET /developers/get-monthly-symbol-analysis GET /developers/get-broker ``` -------------------------------- ### TradeSync API Fundamentals Source: https://www.tradesync.com/developers/developers/create-account Overview of core concepts for interacting with the TradeSync API, including authentication, request/response formats, and common patterns. ```APIDOC Introduction Authentication Request format Response format Common response codes Pagination Filtering ``` -------------------------------- ### TradeSync Equity Monitors API Endpoints Source: https://www.tradesync.com/developers/developers/create-open-command Endpoints for managing equity monitors, allowing users to create, update, and retrieve their monitoring configurations. ```APIDOC Equity monitors introduction Get all equity monitors Get equity monitor Create equity monitor Update equity monitor ``` -------------------------------- ### Update Webhook Request Body Example Source: https://www.tradesync.com/developers/developers/update-webhook Example JSON payload for updating a webhook's URL and authentication type. Both 'url' and 'authentication' parameters are mandatory for the update operation. ```JSON { "url":"http://test123.com", "authentication":"none" } ``` -------------------------------- ### Command Events API Endpoints Source: https://www.tradesync.com/developers/developers/trades-introduction Lists API endpoints for retrieving all command events and specific command events. ```APIDOC Command Events API: GET /developers/get-all-command-events: Get all command events. GET /developers/get-command-event: Get a specific command event. ``` -------------------------------- ### TradeSync API Endpoint Index Source: https://www.tradesync.com/developers/developers/commands-introduction This snippet provides a structured overview of all available API categories and their respective endpoints within the TradeSync platform, including HTTP methods where specified. ```APIDOC API Documentation Index: General Topics: - Introduction - Authentication - Request format - Response format - Common response codes - Pagination - Filtering Accounts API: - Accounts introduction - GET Get all accounts - GET Get account - POST Create account - PATCH Update account - PATCH Update account connection - DELETE Delete account - GET Get account symbol - GET Get all account symbols - PATCH Update account symbols bulk - PATCH Update account symbol Account Events API: - Account events introduction - GET Get all account events - GET Get account event Analysis API: - Analysis introduction - GET Get all account analyses - GET Get account analysis - GET Get analysis by hour - GET Get analysis by day - GET Get daily analysis - GET Get monthly analysis - GET Get monthly symbol analysis Brokers API: - Brokers introduction - GET Get broker - GET Get all brokers - GET Get broker server - GET Get all broker servers Trades API: - Trades introduction - GET Get all trades - GET Get trade Trade Events API: - Trade events introduction - GET Get all trade events - GET Get trade event Copiers API: - Copiers introduction - GET Get all trade copiers - GET Get trade copier - POST Create trade copier - PATCH Update trade copier - DELETE Delete trade copier - DELETE Delete disabled symbol - POST Create disabled symbol - GET Get disabled symbol - GET Get disabled symbols - POST Create disabled symbol bulk - DELETE Delete disabled symbol bulk - GET Get all copier maps - POST Create copier map - DELETE Delete copier map Copier Events API: - Copier events introduction - GET Get all copier events - GET Get copier event Equity Monitors API: - Equity monitors introduction - GET Get all equity monitors - GET Get equity monitor - POST Create equity monitor - PATCH Update equity monitor Commands API: - Commands introduction - GET Get all commands - GET Get command - POST Create open command - POST Create modify command - POST Create close command - PATCH Update command Command Events API: - Command events introduction - GET Get all command events - GET Get command event Webhooks API: - Webhooks introduction - GET Get all webhooks - GET Get webhook - POST Create webhook - PATCH Update webhook - DELETE Delete webhook ``` -------------------------------- ### Get Command API Endpoint Source: https://www.tradesync.com/developers/developers/get-command Documents the HTTP GET endpoint for retrieving a single command by its ID. This endpoint allows users to fetch detailed information about a specific command, including its status, associated trade, and other metadata. ```APIDOC GET /commands/{command_id} Description: Returns an individual command. ``` -------------------------------- ### TradeSync API Failed Response Example Source: https://www.tradesync.com/developers/developers/response-format Example of a failed API response from TradeSync, including attributes like result, status, code, message, and an empty data array, indicating an error or resource not found. ```JSON { "result": "fail", "status": 404, "code": "not_found", "message": "The resource does not exist.", "data": [] } ``` -------------------------------- ### General API Documentation Topics Source: https://www.tradesync.com/developers/developers/get-all-command-events Provides an overview of fundamental API concepts and general documentation topics, including authentication, request and response formats, common response codes, pagination, and filtering. ```APIDOC Introduction Authentication Request format Response format Common response codes Pagination Filtering ``` -------------------------------- ### Get Copier Event API Endpoint Source: https://www.tradesync.com/developers/developers/get-copier-event Describes the GET endpoint for retrieving a single copier event by its unique identifier (event_id). This endpoint allows developers to fetch specific event details. ```APIDOC GET /events/copiers/{event_id} ``` -------------------------------- ### Get Account API Endpoint Details Source: https://www.tradesync.com/developers/developers/get-account Details for retrieving a single account by its ID. This GET request provides comprehensive information about a specific user account, including its status, financial details, and associated broker information. ```APIDOC Method: GET Endpoint: /accounts/{account_id} Description: Retrieves an individual account. Parameters: None listed. Response Example: { "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 } } ```