eToro · Schema

UnifiedOrderRequest

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

Social TradingCopy TradingInvestingMarket DataPortfolio ManagementFintechTradingStocksCryptocurrencyETFs

Properties

Name Type Description
action string The order action type. Possible values: open, close.
transaction string The transaction direction. Possible values: buy, sell, sellShort, buyToCover.
symbol string The asset ticker symbol. Required for open orders.
instrumentId integer The eToro instrument identifier. Required for open orders.
settlementType string The settlement type. Possible values: cfd, real, realFutures, marginTrade. Required for open orders.
orderType string The order execution type. Possible values: mkt (market), mit (market if touched).
triggerRate number The trigger rate for mit orders. Required for mit orders.
leverage integer The leverage multiplier to apply. Required for open orders.
amount number The monetary amount to invest in the order currency. Mutually exclusive with units and contracts.
orderCurrency string The currency for the order amount. Typically usd.
units number The number of units to trade. Mutually exclusive with amount and contracts.
contracts number The number of contracts to trade. Mutually exclusive with amount and units.
stopLossRate number The stop-loss rate at which the position will automatically close.
takeProfitRate number The take-profit rate at which the position will automatically close.
stopLossType string The stop-loss type. Possible values: fixed, trailing.
additionalMargin number Additional margin to allocate to the position.
positionIds array List of position IDs to close. Required for close orders.
View JSON Schema on GitHub

JSON Schema

UnifiedOrderRequest.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/etoro/refs/heads/main/json-schema/UnifiedOrderRequest.json",
  "title": "UnifiedOrderRequest",
  "type": "object",
  "description": "Request payload for creating an order to open or close a position.",
  "required": [
    "action",
    "transaction"
  ],
  "properties": {
    "action": {
      "type": "string",
      "description": "The order action type. Possible values: open, close.",
      "enum": [
        "open",
        "close"
      ],
      "example": "open"
    },
    "transaction": {
      "type": "string",
      "description": "The transaction direction. Possible values: buy, sell, sellShort, buyToCover.",
      "enum": [
        "buy",
        "sell",
        "sellShort",
        "buyToCover"
      ],
      "example": "buy"
    },
    "symbol": {
      "type": "string",
      "description": "The asset ticker symbol. Required for open orders.",
      "nullable": true,
      "example": "AAPL"
    },
    "instrumentId": {
      "type": "integer",
      "format": "int32",
      "description": "The eToro instrument identifier. Required for open orders.",
      "nullable": true,
      "example": 101
    },
    "settlementType": {
      "type": "string",
      "description": "The settlement type. Possible values: cfd, real, realFutures, marginTrade. Required for open orders.",
      "nullable": true,
      "enum": [
        "cfd",
        "real",
        "realFutures",
        "marginTrade"
      ],
      "example": "cfd"
    },
    "orderType": {
      "type": "string",
      "description": "The order execution type. Possible values: mkt (market), mit (market if touched).",
      "enum": [
        "mkt",
        "mit"
      ],
      "example": "mkt"
    },
    "triggerRate": {
      "type": "number",
      "format": "double",
      "nullable": true,
      "description": "The trigger rate for mit orders. Required for mit orders."
    },
    "leverage": {
      "type": "integer",
      "format": "int32",
      "description": "The leverage multiplier to apply. Required for open orders.",
      "nullable": true,
      "example": 2
    },
    "amount": {
      "type": "number",
      "format": "double",
      "nullable": true,
      "description": "The monetary amount to invest in the order currency. Mutually exclusive with units and contracts.",
      "example": 1000.0
    },
    "orderCurrency": {
      "type": "string",
      "description": "The currency for the order amount. Typically usd.",
      "nullable": true,
      "example": "usd"
    },
    "units": {
      "type": "number",
      "format": "double",
      "nullable": true,
      "description": "The number of units to trade. Mutually exclusive with amount and contracts."
    },
    "contracts": {
      "type": "number",
      "format": "double",
      "nullable": true,
      "description": "The number of contracts to trade. Mutually exclusive with amount and units."
    },
    "stopLossRate": {
      "type": "number",
      "format": "double",
      "nullable": true,
      "description": "The stop-loss rate at which the position will automatically close.",
      "example": 1.2
    },
    "takeProfitRate": {
      "type": "number",
      "format": "double",
      "nullable": true,
      "description": "The take-profit rate at which the position will automatically close.",
      "example": 1.5
    },
    "stopLossType": {
      "type": "string",
      "nullable": true,
      "description": "The stop-loss type. Possible values: fixed, trailing.",
      "enum": [
        "fixed",
        "trailing"
      ],
      "example": "fixed"
    },
    "additionalMargin": {
      "type": "number",
      "format": "double",
      "nullable": true,
      "description": "Additional margin to allocate to the position."
    },
    "positionIds": {
      "type": "array",
      "items": {
        "type": "integer",
        "format": "int64"
      },
      "nullable": true,
      "description": "List of position IDs to close. Required for close orders."
    }
  }
}