Skip to main content
POST
Create an order

Authorizations

x-api-key
string
header
default:lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663
required

API key of the application. Only valid together with the x-user-key header — the pair is an alternative to OAuth bearer authentication, never sent alongside it. The pair is granted the same permissions the operation's OAuth scopes describe.

Demo credential for trying the API from these docs: lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663

x-user-key
string
header
default:eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_
required

User-specific authentication key. Only valid together with the x-api-key header — the pair is an alternative to OAuth bearer authentication, never sent alongside it.

Demo credential for trying the API from these docs: eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_

Headers

x-request-id
string<uuid>
required

A unique request identifier.

Example:

"11208a5d-31b6-4e84-8005-520a8b3324c6"

Body

application/json

Request payload for creating an order to open or close a position.

action
enum<string>
required

The order action whether to open or close a position. Currently only open is supported in this endpoint.

Available options:
open,
close
Example:

"open"

transaction
enum<string>
required

The transaction direction: buy opens a long position, sell closes a long position, sellShort opens a short position, and buyToCover closes a short position. Currently only buy and sellShort are supported; sell and buyToCover are rejected and will be enabled in a future release alongside the close action.

Available options:
buy,
sell,
sellShort,
buyToCover
Example:

"buy"

symbol
string | null

The asset ticker symbol. For open orders provide exactly one of symbol or instrumentId - providing both is rejected.

Example:

"AAPL"

instrumentId
integer<int32> | null

The eToro instrument identifier. For open orders provide exactly one of symbol or instrumentId - providing both is rejected.

Example:

101

settlementType
enum<string> | null

The settlement type. Possible values: cfd, real, realFutures, marginTrade. Conditional: this parameter must NOT be set for MIT orders; the platform resolves the settlement type from the instrument, direction and leverage of the order. For other order types, the settlement type must be set to an eligible settlement type. A mismatch is rejected during execution after the order has already been accepted with an order id. The valid values differ per instrument, direction and leverage - call POST /api/v2/trading/info/demo/eligibility and read leverageConfigs[].settlementType for the relevant combinations of direction, leverage and settlementType before supplying them; that configuration changes rarely, so one call can be cached and reused for the whole session. real - the real instrument held in full value. realFutures - the real future contract, which is a derivative of an underlying instrument. Each future contract usually maintains a different number of underlying instrument units than 1. The number of units held in a single future contract is called the multiplier, which can be bigger, lower, or equal to 1. marginTrade - the real instrument held with only a portion of its value called margin (leveraged asset). cfd - contract for difference, which is a derivative following the underlying instrument.

Available options:
cfd,
real,
realFutures,
marginTrade
orderType
enum<string>

The order execution type. Possible values: mkt (market), mit (market if touched), limitIOC. mkt - a market order that executes at the available market price. mit - a market-if-touched order that waits until the triggerRate or better is published in the market feed and then executes at the market price at that time. limitIOC - an immediate limit order that executes now at the limitRate or better if such a rate is available at the market, or gets cancelled immediately if no such rate is available now. mit is not supported when settlementType is realFutures.

Available options:
mkt,
mit,
limitIOC
Example:

"mkt"

triggerRate
number<double> | null

The trigger rate for mit orders. Required for mit orders, and must be greater than zero. Must not be provided for mkt or limitIOC orders - supplying it is rejected.

leverage
integer<int32> | null

The leverage multiplier to apply. Optional - defaults to 1 (no leverage) when omitted, and must be 1 or greater. Any value greater than 1 requires stopLossRate.

Example:

2

amount
number<double> | null

The monetary amount to invest in the order currency. Mutually exclusive with units and contracts. Must be greater than 0.

Example:

1000

orderCurrency
string | null

The currency for the order amount. Typically usd. Only USD is currently supported.

Example:

"usd"

units
number<double> | null

The number of units to trade. Mutually exclusive with amount and contracts. Must be greater than 0.

contracts
number<double> | null

The number of contracts to trade, used for real futures instead of units. Mutually exclusive with amount and units. Only accepted when settlementType is realFutures, and must be a whole number greater than 0.

stopLossRate
number<double> | null

The stop-loss rate at which the position will automatically close. Required when leverage is greater than 1, when transaction is sellShort, when settlementType is realFutures, or when stopLossType is trailing. Optional otherwise, and must be 0 or greater.

Example:

1.2

takeProfitRate
number<double> | null

The take-profit rate at which the position will automatically close. Must be 0 or greater.

Example:

1.5

stopLossType
enum<string> | null

The stop-loss type. Possible values: fixed, trailing. The default is fixed. fixed - the stop-loss rate does not change. trailing - the stop-loss rate moves up whenever the instrument rate goes up such that the stop loss is triggered from the same distance from the last peak rate as the distance of the stop-loss rate from the rate at the open. Setting trailing requires stopLossRate.

Available options:
fixed,
trailing
Example:

"fixed"

additionalMargin
number<double> | null

Additional funds in the order currency added to the invested amount (margin), if the desire is for the stop-loss rate to be set lower than normally permitted. Only accepted when settlementType is realFutures - supplying it for any other settlement type is rejected. Must be greater than 0.

limitRate
number<double> | null

LimitRate should be set for LimitIOC orders only, where it is required and must be greater than zero; supplying it for any other order type is rejected. it is the client submitted price which will be routed to the exchange for execution. Please note that a client submitted price cannot exceed a 10% deviation from current market price otherwise it will be rejected on pre trade

Example:

1.5

positionIds
integer<int64>[] | null

List of position IDs to close. Reserved for the close action, which is not supported yet - supplying any value is currently rejected.

Response

Order submitted successfully. Returns the created order details.

Response payload after successfully submitting an order.

token
string<uuid>

A tracking token for the order request, used for correlation and debugging.

Example:

"066faaee-e1e9-49d2-a568-c6e1cc336ad8"

orderId
integer<int64>

The unique identifier of the created order.

Example:

13902598

referenceId
string<uuid>

The client reference identifier for the order, matching the X-Request-Id header if provided.

Example:

"1c94300c-90aa-4303-9d00-dec376d74efb"