Skip to main content
GET
Get a trade request result

Persistent collection and repeat queries

The API collects MT5 events in background batches on the same physical connection that submitted the request. Client GETs read the saved result from the database; they do not consume MT5 events. Submission returns its ID without waiting for execution. There can be a short delay before the collector saves the result.
  • 200: saved final result, including rejection or partial execution. Check MT5 codes.
  • 202: {"status":"pending","request_id":1586,"result":null}. Wait at least the Retry-After interval (currently one second), then repeat only this GET.
  • 409 with TRADE_RESULT_UNAVAILABLE: no final result was retained. An optional result contains the last public snapshot. Reconcile positions/orders; never automatically resubmit the order.
  • 409 with TRADE_RESULT_AMBIGUOUS: MT5 reused an ID across sessions for this token. Reconcile instead of guessing the operation.
A saved final result remains queryable after restart while the token and account verification remain valid. Results consumed before this feature was deployed are not recoverable through this cache. A crash between consuming and persisting an event can still lose it; unavailable does not mean the trade failed.

What this operation does

Use the ID from answer.id or answer.ID, not a position ticket. Only the token that submitted the request can query it, with an active account verification. HTTP 200 does not imply successful execution.

Complete workflow

See the step-by-step guide and errors and their handling. Playground values are examples. Replace the account, symbol, volume, and price with valid data for your integration.

Reduced response

The response uses an explicit allowlist of public fields. It preserves retcode and answer; ID-grouped events retain their structure only for the requested ID. Flat results and event lists are also supported. Missing fields are omitted; no status or value is invented. The result event allows ID, Retcode, DealID, OrderID, Volume, and Price. Flat results also allow ResultRetcode, ResultDeal, ResultOrder, ResultVolume, and ResultPrice. The answer event allows IDClient, Symbol, Type, TypeFill, Volume, PriceOrder, Position, and those five Result* fields. Account logins, Manager login, IP, comments, gateway data, extended volumes, ApiData, and unknown fields are excluded. Volume in the answer event is the requested volume; ResultVolume is the reported executed volume. Request, order, and deal IDs are not position tickets. Query positions to reconcile execution.

Authorizations

Authorization
string
header
required

Send the provider-issued token in the Authorization header using Bearer authentication.

Path Parameters

request_id
integer
required

Response

Successful Response

retcode
string
required
answer
Answer · object
required