Get Gateway Executions¶
Lists MT5 gateway execution journal records. Unresolved records are returned by default.
GET /gateways/executions
Authorization¶
Requires SESSION_ADMIN and the super_admin permission.
Send the administrator JWT in the Authorization header:
Authorization: <ADMIN_JWT>
Request parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
unresolved_only |
boolean | No | Defaults to true. Set false to include recent terminal records. |
gateway_id |
int | No | Positive gateway ID filter. |
offset |
int | No | Non-negative offset; defaults to 0. |
limit |
int | No | Page size from 1 to 500; defaults to 100. |
unresolved_only=false queries at most the most recent 500 journal records;
gateway filtering and pagination apply to that bounded set. count reports
the number of matching rows before pagination.
Response Parameters¶
| Field | Type | Description |
|---|---|---|
rows |
object[] | Journal records; fields are listed below. |
count |
int | Matching record count before pagination. |
Each row includes execution_id (string), gateway_id (int), login (int),
order (int), symbol and provider_symbol (strings), operation (int: 1
OPEN, 2 CLOSE, 3 PARTIAL_CLOSE), volume, before_volume, and
before_closed_volume (int), correlation_id (uint64), state and code
(strings), request_json (string), provider_order, provider_uuid,
provider_source, provider_deal, and provider_request_order (strings),
provider_volume (int), price (number), created_at and updated_at
(Unix-seconds int64), resolved_by (int), and resolution_note (string).
For OPEN records, before_volume equals the requested position volume. A
GATEWAY_TIMEOUT record can retain provider identifiers received in an
intermediate ACCEPTED or PENDING reply.
Request example¶
GET /gateways/executions?unresolved_only=true&gateway_id=12&offset=0&limit=100
Response¶
The rows items contain the same complete execution-record fields documented
in Gateway Execution Reconciliation.
{
"rows": [
{
"execution_id": "0123456789abcdef0123456789abcdef",
"gateway_id": 12,
"login": 2000001,
"order": 900100,
"symbol": "EURUSD",
"provider_symbol": "EURUSD.a",
"operation": 1,
"volume": 10000,
"before_volume": 10000,
"before_closed_volume": 0,
"correlation_id": 778812,
"state": "UNCERTAIN",
"code": "GATEWAY_TIMEOUT",
"request_json": "{\"operation\":1,\"login\":2000001,\"order\":900100,\"open_time\":1794500000,\"source_symbol\":\"EURUSD\",\"target_symbol\":\"EURUSD.a\",\"cmd\":0,\"volume\":10000,\"lots\":100,\"price\":1.0845,\"sl\":0,\"tp\":0,\"parent_order\":0,\"gw_source\":\"\",\"gw_uuid\":\"\",\"gw_order\":\"\",\"gw_volume\":0,\"timeout_ms\":5000,\"trade_context\":\"{\\\"commission\\\":0,\\\"storage\\\":0,\\\"magic\\\":0,\\\"reason\\\":3,\\\"comment\\\":\\\"\\\",\\\"expiration\\\":0,\\\"close_time\\\":0}\"}",
"provider_order": "",
"provider_uuid": "",
"provider_source": "MT5",
"provider_deal": "",
"provider_request_order": "mt5-request-98765",
"provider_volume": 0,
"price": 0,
"created_at": 1794500000,
"updated_at": 1794500005,
"resolved_by": 0,
"resolution_note": ""
}
],
"count": 1
}
Errors¶
| HTTP | Error | Description |
|---|---|---|
| 400 | INVALID_DATA |
Query parameter has the wrong type or is outside its allowed range. |
| 401 | PERMISSION_DENIED |
Missing or invalid administrator session. |
| 403 | PERMISSION_DENIED |
Session lacks super_admin. |
| 503 | EXECUTION_JOURNAL_UNAVAILABLE |
Execution journal is not ready; the handler returns this error without a message. |