API reference
Get command event
GET
https://api.tradesync.com/events/commands/{command_event_id}Return an individual command event. The command_id field identifies its command; error contains a platform-specific error number when present.
Last updated
Path parameters
- command_event_idType: integer
- Command event id returned by the corresponding list endpoint
Response example
{
"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,
"retry_rate": "millisecond",
"error": null
}
}
Response fields
| Field | Type | Description |
|---|---|---|
| id | integer | Resource ID |
| created_at | string | Creation timestamp in UTC |
| updated_at | string | Update timestamp in UTC |
| account_id | integer | Tradesync account ID |
| group | string | command |
| event | string | Execution event name; see Event below |
| event_id | integer or null | Related event ID when recorded; otherwise null |
| command_id | integer | Command ID |
| error | integer or null | Positive platform error number; null when none is recorded |
| retry_rate | string or null | Retry rate when recorded; otherwise null |
The updated_at value is currently emitted with the same timestamp as created_at.
Event
| Value | Description |
|---|---|
| success | Command executed successfully |
| application_error | The connected platform returned an error; inspect error |
| not_found | Target trade was not found |
| trade_closed | Target trade is already closed |
| cancelled_by_copier | Cancelled by the copier |
| cancelled_by_user | Cancelled by the user |
| abandoned | Execution was abandoned |
| no_connection | Account connection is unavailable |
| trade_exists | Target trade already exists |
| symbol_not_found | Instrument could not be matched |
| out_of_range | Requested opening price is outside slippage limits |
| trade_not_allowed | Trading is not permitted |
| open_volume_less_than_minimum | Opening volume is below the permitted minimum |
| close_volume_less_than_minimum | Closing volume is below the permitted minimum |
| no_valid_filling_mode | No supported filling mode was available |
| stop_loss_missing | Required stop loss is missing |
| invalid_risk_configuration | Risk configuration cannot be used |
| insufficient_tick_data | Required instrument tick data is unavailable |
| no_prices | Execution cannot proceed because required symbol prices are unavailable |