{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/etoro/refs/heads/main/json-schema/LeverageConfiguration.json",
  "title": "LeverageConfiguration",
  "type": "object",
  "description": "Leverage configuration for a specific settlement type and trade direction combination.",
  "properties": {
    "settlementType": {
      "type": "string",
      "description": "The settlement type this configuration applies to. Possible values: CFD, REAL, REAL_FUTURES, MARGIN_TRADE."
    },
    "direction": {
      "type": "string",
      "description": "The trade direction. Possible values: LONG, SHORT."
    },
    "leverageValues": {
      "type": "array",
      "items": {
        "type": "integer",
        "format": "int32"
      },
      "description": "Available leverage multipliers for this settlement type and direction."
    },
    "isPotential": {
      "type": "boolean",
      "description": "Additional user questionnaire may be required to allow the user to trade with this setup of settlement and leverages."
    },
    "minPositionAmount": {
      "type": "number",
      "format": "decimal",
      "description": "Minimum monetary collateral required to open a position under this leverage configuration."
    },
    "allowEditStopLoss": {
      "type": "boolean",
      "description": "Whether the stop-loss can be edited for positions under this configuration."
    },
    "minStopLossPercentage": {
      "type": "number",
      "format": "decimal",
      "description": "Minimum stop-loss percentage allowed from the allocated margin of the position."
    },
    "maxStopLossPercentage": {
      "type": "number",
      "format": "decimal",
      "description": "Maximum stop-loss percentage allowed from the allocated margin of the position."
    },
    "defaultStopLossPercentage": {
      "type": "number",
      "format": "decimal",
      "description": "Default stop-loss percentage applied when no explicit value is provided."
    },
    "allowEditTakeProfit": {
      "type": "boolean",
      "description": "Whether the take-profit can be edited."
    },
    "minTakeProfitPercentage": {
      "type": "number",
      "format": "decimal",
      "description": "Minimum take-profit percentage allowed from the allocated margin of the position."
    },
    "maxTakeProfitPercentage": {
      "type": "number",
      "format": "decimal",
      "description": "Maximum take-profit percentage allowed from the allocated margin of the position."
    },
    "defaultTakeProfitPercentage": {
      "type": "number",
      "format": "decimal",
      "description": "Default take-profit percentage applied when no explicit value is provided."
    },
    "allowStopLossTakeProfit": {
      "type": "boolean",
      "description": "Whether stop-loss and take-profit can be set on a position."
    }
  }
}