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.

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 opening or closing order.

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

MT5 volume units: 100 = 0.01 lots; 10000 = 1 lot.

Example:

100

side
enum<string>
required

Order direction.

Available options:
buy,
sell
Example:

"buy"

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.