Open position
POST/v1/trading/accounts/:account_id/positions
Opens a new position using immediate market execution.
This method represents the client intent to open exposure. The resulting transaction may include an order, deal, position and account_state. On position open, account_state may change because used margin is recalculated; if opening commission is charged, balance changes as well.
Runtime restrictions:
- unavailable if trade_mode is trading_disabled
- unavailable if account_status is close_only
Instrument-specific request validation:
- resolve validation inputs from
GET /v1/configuration/accounts/{account_id}/instruments/{instrument}/conditions volumemust satisfyvolume_min,volume_max, andvolume_step- request price fields (
price,stop_loss_price,take_profit_price) must use at mostpoint_digitsfractional digits - the implied minimum price increment is
10^-point_digits
The method returns ACK response. Final transaction result is delivered through Server Events.
Consistency and recovery notes:
- Closed positions and final-state orders are retained for 1 month (subject to clarification).
- If
operation_idis not received in the REST ACK response, or is not received in Server events subscription, or an unknownoperation_idis received, the client should restart Server events subscription and reconcile state using snapshots of currently open positions and pending orders.
Synchronous REST errors are returned before the ACK response and cover request shape, authentication, authorization, account lookup, rate limiting, and temporary service availability.
Asynchronous final operation errors are delivered through transaction_event and operation status.
Possible public final error codes include:
ACCOUNT_DISABLEDACCOUNT_CLOSE_ONLYREQUEST_INVALIDREQUEST_INVALID_PRICEMARKET_INSTRUMENT_NOT_FOUNDMARKET_TRADE_DISABLEDMARKET_CLOSE_ONLYMARKET_SESSION_CLOSEDMARKET_NO_QUOTESTRADING_RULE_VOLUME_TOO_SMALLTRADING_RULE_VOLUME_TOO_LARGETRADING_RULE_INVALID_VOLUME_STEPTRADING_RULE_INVALID_PRICE_LEVELSTRADING_RULE_INSUFFICIENT_MARGINTRADING_RULE_MARGIN_LEVEL_TOO_LOWTRADING_RULE_OPERATION_RESTRICTEDTRADING_RULE_TOO_MANY_OPEN_POSITIONSEXECUTION_REQUOTEEXECUTION_REJECTEDSYSTEM_RATE_LIMITSYSTEM_TEMPORARY_UNAVAILABLE
Request
Responses
- 202
- 400
- 401
- 403
- 404
- 429
- 500
- 503
ACK
Bad Request.
Possible public error codes include:
REQUEST_INVALIDREQUEST_INVALID_PARAMETERSREQUEST_INVALID_PRICEREQUEST_INVALID_TIMEFRAMEREQUEST_INVALID_TIME_RANGEREQUEST_INVALID_COUNTREQUEST_INVALID_LIMITREQUEST_INVALID_CURSORREQUEST_INVALID_PRICE_TYPEREQUEST_INVALID_FILTER_COMBINATIONREQUEST_UNSUPPORTED_MEDIA_TYPE
Authentication failed.
Possible public error codes include:
AUTH_INVALID_API_KEYAUTH_INVALID_SIGNATURE
Operation is not permitted for the authenticated API key, account, source IP, or operation scope.
Possible public error codes include:
AUTH_PERMISSION_DENIEDACCOUNT_DISABLEDACCOUNT_CLOSE_ONLY
Account not found
Public API endpoint quota exceeded.
REQUEST_RATE_LIMIT is non-retryable automatically. Clients should use
GET /v1/configuration/accounts/{account_id}/limits and local request accounting
to calculate remaining quota before sending more requests.
Internal Server Error
The server encountered an unexpected condition that prevented it from fulfilling the request.
Service temporarily unavailable.
Possible public error codes include:
SYSTEM_TEMPORARY_UNAVAILABLEMARKET_NO_QUOTES