Skip to main content
POST
Place a market order

What this operation does

Requires a verified account, trading enabled, and a valid Idempotency-Key. The service returns 400 if the header is missing or its format is invalid. Persist the key and body before submitting; then save the MT5 ID and query its result.

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.

Optional SL and TP

sl and tp are absolute prices. Send either or both when opening; omitted or null values are not sent, and 0 specifies no level. Precision and distances are validated; invalid prices are not rounded. Buy protection is checked against Bid; sell protection against Ask. Modify orders or positions · MT5 volume units

Authorizations

Authorization
string
header
required

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

Headers

Idempotency-Key
string
required

Persisted key for this intent. Reuse the same key and body when retrying; use a new key for another trading intent, including a modification.

Required string length: 16 - 128
Pattern: ^[A-Za-z0-9._:-]{16,128}$
Example:

"550e8400-e29b-41d4-a716-446655440000"

Body

application/json
login
integer
required

Trading account login.

Example:

104205

symbol
string
required

MT5 symbol name.

Required string length: 1 - 32
Pattern: ^[A-Za-z0-9._() -]+$
Example:

"EURUSD"

volume
integer
required

Integer MT5 units: 10000 = 1 lot, independent of contract size. Must match the symbol minimum, maximum and step.

Example:

100

side
enum<string>
required

Order direction.

Available options:
buy,
sell
Example:

"buy"

sl
number | null

Optional absolute Stop Loss price. Omit or send null to skip; 0 specifies no SL.

Required range: x >= 0
tp
number | null

Optional absolute Take Profit price. Omit or send null to skip; 0 specifies no TP.

Required range: x >= 0
price
number | null
deprecated

Legacy explicit price; send together with digits or omit both for automatic pricing.

Required range: x > 0
digits
integer | null
deprecated

Legacy price decimals; omit with price to use the symbol configuration.

Required range: 0 <= x <= 10
comment
string
default:REST API

Order comment stored in MT5.

Maximum string length: 31

Response

Successful Response

The response is of type Response Market Order Api V1 Orders Market Post · object.