Skip to main content
POST
/
api
/
v2
/
trading
/
execution
/
demo
/
orders
Create an order
curl --request POST \
  --url https://public-api.etoro.com/api/v2/trading/execution/demo/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-request-id: <x-request-id>' \
  --header 'x-user-key: <x-user-key>' \
  --data '
{
  "action": "open",
  "transaction": "buy",
  "symbol": null,
  "instrumentId": 101,
  "settlementType": "cfd",
  "orderType": "mkt",
  "triggerRate": null,
  "leverage": 2,
  "amount": 1000,
  "orderCurrency": "usd",
  "units": null,
  "contracts": null,
  "stopLossRate": 1.2,
  "takeProfitRate": 1.5,
  "stopLossType": "fixed",
  "additionalMargin": null,
  "positionIds": null
}
'
{
  "token": "066faaee-e1e9-49d2-a568-c6e1cc336ad8",
  "orderId": 13902598,
  "referenceId": "1c94300c-90aa-4303-9d00-dec376d74efb"
}

Authorizations

Authorization
string
header
required

eToro OAuth2. Each operation lists the scopes that grant access as separate security requirements (OpenAPI OR semantics): the caller's token only needs ONE of them — you do NOT need all of them. The same scopes back the x-api-key/x-user-key credential pair.

Headers

x-request-id
string<uuid>
required

A unique request identifier.

Example:

"52558681-8251-4c6e-859d-94d2f1958b7f"

x-api-key
string<password>
required

API key for authentication.

Example:

"lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663"

x-user-key
string<password>
required

User-specific authentication key.

Example:

"eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_"

Body

application/json

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

action
enum<string>
required

The order action type. Possible values: open, close.

Available options:
open,
close
Example:

"open"

transaction
enum<string>
required

The transaction direction. Possible values: buy, sell, sellShort, buyToCover.

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. Required for open orders.

Available options:
cfd,
real,
realFutures,
marginTrade
Example:

"cfd"

orderType
enum<string>

The order execution type. Possible values: mkt (market), mit (market if touched).

Available options:
mkt,
mit
Example:

"mkt"

triggerRate
number<double> | null

The trigger rate for mit orders. Required for mit orders.

leverage
integer<int32> | null

The leverage multiplier to apply. Required for open orders.

Example:

2

amount
number<double> | null

The monetary amount to invest in the order currency. Mutually exclusive with units and contracts.

Example:

1000

orderCurrency
string | null

The currency for the order amount. Typically usd.

Example:

"usd"

units
number<double> | null

The number of units to trade. Mutually exclusive with amount and contracts.

contracts
number<double> | null

The number of contracts to trade. Mutually exclusive with amount and units.

stopLossRate
number<double> | null

The stop-loss rate at which the position will automatically close.

Example:

1.2

takeProfitRate
number<double> | null

The take-profit rate at which the position will automatically close.

Example:

1.5

stopLossType
enum<string> | null

The stop-loss type. Possible values: fixed, trailing.

Available options:
fixed,
trailing
Example:

"fixed"

additionalMargin
number<double> | null

Additional margin to allocate to the position.

positionIds
integer<int64>[] | null

List of position IDs to close. Required for close orders.

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"