Skip to main content
POST
/
api
/
v1
/
trading
/
execution
/
market-open-orders
/
by-amount
Create a market order to open a position by specifying the amount of cash you would like to use in the trade.
curl --request POST \
  --url https://public-api.etoro.com/api/v1/trading/execution/market-open-orders/by-amount \
  --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 '
{
  "InstrumentID": 123,
  "IsBuy": true,
  "Leverage": 123,
  "Amount": 123,
  "StopLossRate": 123,
  "TakeProfitRate": 123,
  "IsTslEnabled": true,
  "IsNoStopLoss": true,
  "IsNoTakeProfit": true
}
'
{
  "orderForOpen": {
    "instrumentID": 100000,
    "amount": 150,
    "isBuy": true,
    "leverage": 1,
    "stopLossRate": 0,
    "takeProfitRate": 0,
    "isTslEnabled": false,
    "mirrorID": 0,
    "totalExternalCosts": 0,
    "orderID": 13902598,
    "orderType": 17,
    "statusID": 1,
    "CID": 7765437,
    "openDateTime": "2025-04-02T15:47:15.9370502Z",
    "lastUpdate": "2025-04-02T15:47:15.9370502Z"
  },
  "token": "066faaee-e1e9-49d2-a568-c6e1cc336ad8"
}

Headers

x-request-id
string<uuid>
required

A unique request identifier.

Example:

"cf33ebbc-4e66-49d7-a70e-c985cc922b6e"

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
InstrumentID
integer<int32>
required

The unique identifier of the financial instrument to trade.

IsBuy
boolean
required

True for a long position, false for a short position.

Leverage
integer<int32>
required

The leverage multiplier for the trade.

Amount
number<double>
required

The amount of money to invest in the trade.

StopLossRate
number<double> | null

The stop-loss trigger price at which the position will generate a Market Order to close (after it was opened). StopLoss trigger price must be worse than current price.

TakeProfitRate
number<double> | null

The take-profit trigger price at which the position will generate a Market Order to close (after it has opened). TakeProfit trigger price must be better than the current price.

IsTslEnabled
boolean | null

Indicates if a trailing stop loss (TSL) is enabled. This means that the stoploss rate indicated will get updated automatically whenever the asset price increases (for long positions) or decreases (for short position) effectively keeping the stoploss in a constant gap from the best price achieved so far.

IsNoStopLoss
boolean | null

True if no stop-loss is set for this order.

IsNoTakeProfit
boolean | null

True if no take-profit is set for this order.

Response

200 - application/json

Successfully opened a market order.

orderForOpen
object
token
string<uuid>

A unique confirmation token for the order.