Theme switcher

Open Position

Header Parameters

Authorizationstring Required

Bearer token issued for your trading account.

Idempotency-Keystring

Optional UUID that makes a retry safe.

Body Parameters

symbolstring Required

Instrument to trade.

sidestring Required

BUY to open long, SELL to open short.

Enum values:
BUYSELL
volumenumber Required

Size in lots. Must lie between volumeMin and volumeMax and be a multiple of volumeStep for the instrument.

tpPricenumber | null

Take profit price, or null for none.

slPricenumber | null

Stop loss price, or null for none.

commentstring

Free-text note stored with the position.

Response

201
Object

Created

Response Attributes

positionIdstring

Identifier of the newly opened position.

400
Object

error://trader-api/trading-validation-failed, error://trader-api/idempotency-key-invalid

Response Attributes

pathstring Required

The request path with the actual identifiers filled in, without query parameters.

statusinteger Required

The HTTP status code, the same as the response status.

typestring Required

A stable identifier of the kind of error, in the form error://trader-api/{code}. Base your error handling on this field, not on title or detail.

Enum values:
error://trader-api/trading-validation-failederror://trader-api/idempotency-key-invalid
titlestring Required

A short, human-readable name of the error. Several types can share the same title.

detailstring Required

A description of this particular occurrence. The wording can change, so never parse it or base logic on it.

additionalInfoobject | null

Extra information as key-value pairs.

401
Object

error://trader-api/unauthorized

Response Attributes

pathstring Required

The request path with the actual identifiers filled in, without query parameters.

statusinteger Required

The HTTP status code, the same as the response status.

typestring Required

A stable identifier of the kind of error, in the form error://trader-api/{code}. Base your error handling on this field, not on title or detail.

Enum values:
error://trader-api/unauthorized
titlestring Required

A short, human-readable name of the error. Several types can share the same title.

detailstring Required

A description of this particular occurrence. The wording can change, so never parse it or base logic on it.

additionalInfoobject | null

Extra information as key-value pairs.

403
Object

error://trader-api/forbidden

Response Attributes

pathstring Required

The request path with the actual identifiers filled in, without query parameters.

statusinteger Required

The HTTP status code, the same as the response status.

typestring Required

A stable identifier of the kind of error, in the form error://trader-api/{code}. Base your error handling on this field, not on title or detail.

Enum values:
error://trader-api/forbidden
titlestring Required

A short, human-readable name of the error. Several types can share the same title.

detailstring Required

A description of this particular occurrence. The wording can change, so never parse it or base logic on it.

additionalInfoobject | null

Extra information as key-value pairs.

404
Object

error://trader-api/symbol-not-found

Response Attributes

pathstring Required

The request path with the actual identifiers filled in, without query parameters.

statusinteger Required

The HTTP status code, the same as the response status.

typestring Required

A stable identifier of the kind of error, in the form error://trader-api/{code}. Base your error handling on this field, not on title or detail.

Enum values:
error://trader-api/symbol-not-found
titlestring Required

A short, human-readable name of the error. Several types can share the same title.

detailstring Required

A description of this particular occurrence. The wording can change, so never parse it or base logic on it.

additionalInfoobject | null

Extra information as key-value pairs.

409
Object

error://trader-api/trading/not-enough-margin, error://trader-api/trading/session-closed, error://trader-api/trading/not-allowed-to-trade, error://trader-api/trading-operation-failed, error://trader-api/idempotency-request-in-progress

Response Attributes

pathstring Required

The request path with the actual identifiers filled in, without query parameters.

statusinteger Required

The HTTP status code, the same as the response status.

typestring Required

A stable identifier of the kind of error, in the form error://trader-api/{code}. Base your error handling on this field, not on title or detail.

Enum values:
error://trader-api/trading/not-enough-marginerror://trader-api/trading/session-closederror://trader-api/trading/not-allowed-to-tradeerror://trader-api/trading-operation-failederror://trader-api/idempotency-request-in-progress
titlestring Required

A short, human-readable name of the error. Several types can share the same title.

detailstring Required

A description of this particular occurrence. The wording can change, so never parse it or base logic on it.

additionalInfoobject | null

Extra information as key-value pairs.

422
Object

error://trader-api/idempotency-key-reused

Response Attributes

pathstring Required

The request path with the actual identifiers filled in, without query parameters.

statusinteger Required

The HTTP status code, the same as the response status.

typestring Required

A stable identifier of the kind of error, in the form error://trader-api/{code}. Base your error handling on this field, not on title or detail.

Enum values:
error://trader-api/idempotency-key-reused
titlestring Required

A short, human-readable name of the error. Several types can share the same title.

detailstring Required

A description of this particular occurrence. The wording can change, so never parse it or base logic on it.

additionalInfoobject | null

Extra information as key-value pairs.

503
Object

error://trader-api/idempotency-unavailable

Response Attributes

pathstring Required

The request path with the actual identifiers filled in, without query parameters.

statusinteger Required

The HTTP status code, the same as the response status.

typestring Required

A stable identifier of the kind of error, in the form error://trader-api/{code}. Base your error handling on this field, not on title or detail.

Enum values:
error://trader-api/idempotency-unavailable
titlestring Required

A short, human-readable name of the error. Several types can share the same title.

detailstring Required

A description of this particular occurrence. The wording can change, so never parse it or base logic on it.

additionalInfoobject | null

Extra information as key-value pairs.

Was this section helpful?

POST

/

Select
1

Response

Was this section helpful?