v1

latestOpenAPI 3.0.12026-07-26171200932.8 KB
Deprecated

Places a Market-if-touched order (similar to Limit order) to open a position when a threshold price is reached.

Deprecated: This endpoint is no longer present in the current eToro Public API Swagger. Prefer the current replacement endpoints where available.

A Market-if-touched order is an order to open a new long or short position when a specific price or better appears in the Market. The price threshold is used to trigger a Market Order. This endpoint allows traders to set up Market-if-touched orders with parameters like leverage, stop-loss, and take-profit settings.

post/api/v1/trading/execution/demo/limit-orders

Headers

x-request-idstring uuid required
Example:26fab899-92be-42c8-9d60-ca63bc08cd14

A unique request identifier.

x-api-keystring password required
Example:lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663

API key for authentication.

x-user-keystring password required
Example:eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_

User-specific authentication key.

Request body

InstrumentIDinteger

The unique identifier of the financial instrument.

IsBuyboolean

Indicates whether the order will open a long (true) or short (false) position.

Leverageinteger

The leverage ratio for the order.

Amountnumber double nullable

The amount of the trade in the account currency [USD]. Required if AmountInUnits is not provided.

AmountInUnitsnumber double nullable

The number of units of the asset. Required if Amount is not provided. For most assets this can be a fractional number. Note that for Future Contracts this number should indicate the number of underlying units, and not the number of contracts, according to the formula: AmountInUnits = contract multiplier * number of contracts.

StopLossRatenumber double

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.

TakeProfitRatenumber double

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.

Ratenumber double

The trigger price at which a Market order to open the position will be sent for execution. The trigger price must be better than the current price. This means that the trigger price must be lower than current price for Long positions, and higher than current price for Short positions.

IsTslEnabledboolean nullable

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.

IsDiscountedboolean nullable

SHOULD NOT BE EXTERNALZIED

IsNoStopLossboolean nullable

Indicates if stop-loss is disabled.

IsNoTakeProfitboolean nullable

Indicates if take-profit is disabled.

CIDinteger

SHOULD NOT BE EXTERNALIZED.

Response

Market-if-touched order successfully placed. The response includes a confirmation token.

tokenstring uuid required

A confirmation token indicating the order creation.