Place Your First Trade
Send a minimal trading request and process the asynchronous ACK, event, and status flow.
Important: trading is asynchronous
Mutating trading methods return an ACK first. ACK means the request was accepted for processing. The final result is delivered through server events as a transaction_event and can also be read from operation status.
Prerequisites
- Use an Exness API key, not an Info API key.
- Use a non-empty idempotency key for mutating requests.
- Check account state, instrument state, trading sessions, volume limits, and margin before sending the request.
- Subscribe to transaction events or poll operation status for final result.
Minimal trading flow
- 1Read account and instrument configuration.
- 2Subscribe to transaction events.
- 3Send the open-position request with a non-empty idempotency key.
- 4Store
operation_idandclient_request_idfrom the ACK. - 5Wait for
transaction_eventor poll operation status. - 6Update local state only after final result.
Example
curl -X POST "https://api.exness.com/v1/trading/accounts/123456/positions" \
-H "Content-Type: application/json" \
-H "EXN-API-KEY: exnsk_your_public_api_key" \
-H "EXN-IDEMPOTENCY-KEY: order-2026-06-22-0001" \
-H "EXN-TIMESTAMP: 1773656070123" \
-H "EXN-SIGN-VERSION: 1" \
-H "EXN-DATA: <base64url_encoded_payload>" \
-H "EXN-SIGN: <base64url_encoded_signature>" \
-d '{
"instrument": "EURUSD",
"side": "buy",
"volume": "0.10"
}'
{
"operation_id": "789",
"client_request_id": "order-2026-06-22-0001",
"status": "pending"
}
Use API Reference for exact request schema
Field names and enum values must match the approved YAML.
Common errors
| Code | error_message | Client action |
|---|---|---|
| 4001 | MARKET_TRADE_DISABLED | Check account and instrument trade mode before retrying. |
| 4002 | MARKET_CLOSE_ONLY | Only close positions or cancel orders. |
| 5000 | TRADING_RULE_INVALID_VOLUME | Check volume_min, volume_max, and volume_step. |
| 5005 | TRADING_RULE_NO_MONEY | Reduce volume or close exposure. |
| 6000 | EXECUTION_MARKET_CLOSED | Retry only when the market is open. |
| 6001 | EXECUTION_PRICE_OFF | Wait for a fresh tick and retry only if still intended. |