Get event .

GET

Request

/events/{event_id}

Event Groups

Tradesync splits events into four categories that deliver different information based on what activity has occurred. These groups are:

  • Account Events: Account events show changes in the connectivity and equity status of a particular account.
  • Command Events: Command events occur when a command has been created and they show whether this command has been successful or if there have been any errors.
  • Copier Events: Copier events show when the settings on the copier have affected the creation of a trade command. For example when a symbol has been disabled on a copier, a trade with that symbol cannot be opened on the copying account. This creates a copier event to advise that the trade has been ignored.
  • Trade Events: Trade events show the different stages in the lifecycle of a trade from open to close for example 'position_close' and 'order_filled'.

Below are examples of responses for the four event groups.

Account Response

{
    "result": "success",
    "status": 200,
    "data": {
        "id": 6111,
        "created_at": "2021-03-22T09:45:02.000000Z",
        "updated_at": "2021-03-22T09:45:02.000000Z",
        "account_id": 66,
        "group": "account",
        "event": "not_connected",
        "event_id": null,
        "equity_value": null,
        "data": []
    }
}

Attributes

event

Value Description
connected The account has been connected
not_connected The account is not connected
reconnected The account has been reconnected
out_of_sync The account is out of sync
in_sync The account is in sync
equity_alert An alert that the account equity has hit a certain value
equity_alert_disable_copiers An equity alert that disables the copier at a certain equity
equity_disable_copiers_close_trades An equity alert that closes trades at a certain equity

Copier Response

{
    "result": "success",
    "status": 200,
    "data": {
        "id": 782,
        "created_at": "2021-06-02T11:02:43.000000Z",
        "updated_at": "2021-06-02T11:02:43.000000Z",
        "account_id": 16,
        "group": "copier",
        "event": "ignored_symbol_disabled",
        "event_id": 781,
        "copier_id": 9
    }
}

Attributes

event

Value Description
ignored_mode_off Ignored as the copier is off
ignored_mode_monitor Ignored as the copier is on monitor mode
ignored_symbol_disabled Ignored as the copier has disabled the symbol
ignored_copy_pending_off Ignored due to copy pending being off
ignored_copy_pending_on Ignored due to copy pending being on
ignored_copy_stop_loss_off Ignored as the stop loss is off
ignored_copy_take_profit_off Ignored as take profit is off
ignored_copy_stop_loss_fixed Ignored as the stop loss is fixed
ignored_copy_take_profit_fixed Ignored as the take profit is fixed
equity_alert_mode_off Ignored as the equity alert mode is off
copy_existing The copier has copied an existing trade
copier_mode_off The copier mode has been set to off
copier_mode_monitor The copier mode has been set to monitor

Command Response

{
    "result": "success",
    "status": 200,
    "data": {
        "id": 576,
        "created_at": "2021-06-01T11:41:34.000000Z",
        "updated_at": "2021-06-01T11:41:34.000000Z",
        "account_id": 16,
        "group": "command",
        "event": "success",
        "event_id": 234,
        "command_id": 164,
        "mt_error": 0,
        "retry_rate": "millisecond"
    }
}

Attributes

event

Value Description
success Command has been successful
mt_error MT error on the command
not_found Command not found
trade_closed Trade has been closed
cancelled_by_copier Command has been cancelled by the copier
cancelled_by_user Command has been cancelled by the user
abandoned Command abandoned
trade_exists The trade already exists
symbol_not_found The symbol has not been found
out_of_range The command is out of range
trade_not_allowed The trade is not allowed
open_volume_less_than_minimum The open volume of the trade is less than the minimum
close_volume_less_than_minimum The close volume of the trade is less than the minimum
no_valid_filling_mode No valid filling mode for the command
stop_loss_missing No stop loss
invalid_risk_configuration The risk configuration is invalid

Trade Response

{
    "result": "success",
    "status": 200,
    "data": {
        "id": 577,
        "created_at": "2021-06-01T11:41:34.000000Z",
        "updated_at": "2021-06-01T11:41:34.000000Z",
        "account_id": 16,
        "group": "trade",
        "event": "position_open",
        "event_id": 264,
        "trade_id": 3657,
        "ticket": 244611362,
        "type": "sell",
        "symbol": "USDCHF",
        "lots": 3.5,
        "open_time": "2021-06-01T14:41:34.000000Z",
        "open_price": 0.89861,
        "stop_loss": 0,
        "take_profit": 0,
        "close_time": null,
        "close_price": 0.89874,
        "commission": 0,
        "swap": 0,
        "profit": -50.63,
        "balance": 5003288.74,
        "credit": 0,
        "equity": 5003238.11,
        "comment": "3655",
        "magic": 3655,
        "digits": 5,
        "tick_value": 1.11283,
        "tick_size": 1.0e-5
    }
}

Attributes

event

Value Description
position_open Trade has been opened
position_close Trade has been closed
partial_close Trade has been partially closed
order_open Order opened
order_close Order closed
order_filled Order filled
order_price_modified Order price has been modified
stop_loss_modified The stop loss has been modified
take_profit_modified The take profit has been modified

Stay in the loop..

Sign up to our newsletter to keep up-to-date.