{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "symbol": {
      "type": "string",
      "title": "Coin",
      "description": "A supported symbol; arithmetic uses the price you enter.",
      "enum": [
        "BTC",
        "ETH",
        "USDT",
        "BNB",
        "SOL",
        "USDC",
        "XRP",
        "ADA",
        "DOGE",
        "TRX",
        "AVAX",
        "SHIB",
        "DOT",
        "LINK",
        "MATIC",
        "LTC",
        "BCH",
        "ATOM",
        "UNI",
        "NEAR",
        "APT",
        "ARB",
        "OP",
        "STX",
        "ICP",
        "INJ",
        "FIL",
        "HBAR",
        "IMX",
        "RUNE",
        "VET",
        "MKR",
        "GRT",
        "ALGO",
        "SAND",
        "EOS",
        "AAVE",
        "THETA",
        "AXS",
        "CRV",
        "MANA",
        "SUI",
        "FTM",
        "XLM",
        "APE",
        "CHZ",
        "FLOW",
        "EGLD",
        "DAI",
        "WBTC"
      ],
      "default": "BTC"
    },
    "mode": {
      "type": "string",
      "title": "Mode",
      "description": "Mode",
      "enum": [
        "profit-loss",
        "liquidation",
        "position-size",
        "staking",
        "apy"
      ],
      "default": "profit-loss"
    },
    "side": {
      "type": "string",
      "title": "Position direction",
      "description": "Position direction",
      "enum": [
        "long",
        "short"
      ],
      "default": "long"
    },
    "entryPrice": {
      "type": "number",
      "title": "Entry price in USD",
      "description": "Entry price in USD",
      "default": 50000,
      "minimum": 1e-9,
      "maximum": 1000000000
    },
    "exitPrice": {
      "type": "number",
      "title": "Exit price in USD",
      "description": "Exit price in USD",
      "default": 55000,
      "minimum": 0,
      "maximum": 1000000000
    },
    "quantity": {
      "type": "number",
      "title": "Coin quantity",
      "description": "Coin quantity",
      "default": 1,
      "minimum": 0,
      "maximum": 1000000000000
    },
    "entryFeePercent": {
      "type": "number",
      "title": "Entry fee (%)",
      "description": "Entry fee (%)",
      "default": 0.1,
      "minimum": 0,
      "maximum": 10
    },
    "exitFeePercent": {
      "type": "number",
      "title": "Exit or liquidation closing fee (%)",
      "description": "Exit or liquidation closing fee (%)",
      "default": 0.1,
      "minimum": 0,
      "maximum": 10
    },
    "fundingCost": {
      "type": "number",
      "title": "Net funding cost in USD",
      "description": "Positive is a payment; negative is a funding credit.",
      "default": 0,
      "minimum": -1000000000,
      "maximum": 1000000000
    },
    "margin": {
      "type": "number",
      "title": "Isolated margin in USD",
      "description": "Isolated margin in USD",
      "default": 1000,
      "minimum": 0,
      "maximum": 1000000000000
    },
    "leverage": {
      "type": "number",
      "title": "Leverage multiple",
      "description": "Leverage multiple",
      "default": 10,
      "minimum": 1,
      "maximum": 100
    },
    "maintenanceMarginPercent": {
      "type": "number",
      "title": "Maintenance margin (%)",
      "description": "Maintenance margin (%)",
      "default": 0.5,
      "minimum": 0,
      "maximum": 50
    },
    "accountEquity": {
      "type": "number",
      "title": "Account equity in USD",
      "description": "Account equity in USD",
      "default": 10000,
      "minimum": 0,
      "maximum": 1000000000000
    },
    "riskPercent": {
      "type": "number",
      "title": "Risk budget (%)",
      "description": "Risk budget (%)",
      "default": 1,
      "minimum": 0.001,
      "maximum": 100
    },
    "stopPrice": {
      "type": "number",
      "title": "Stop price in USD",
      "description": "Stop price in USD",
      "default": 45000,
      "minimum": 1e-9,
      "maximum": 1000000000
    },
    "principal": {
      "type": "number",
      "title": "Coins staked",
      "description": "Coins staked",
      "default": 100,
      "minimum": 0,
      "maximum": 1000000000000
    },
    "annualRate": {
      "type": "number",
      "title": "Annual rate (%)",
      "description": "Annual rate (%)",
      "default": 5,
      "minimum": -99,
      "maximum": 1000
    },
    "rateKind": {
      "type": "string",
      "title": "Annual rate type",
      "description": "Annual rate type",
      "enum": [
        "apr",
        "apy"
      ],
      "default": "apr"
    },
    "compoundingPeriods": {
      "type": "integer",
      "title": "Compounds per year",
      "description": "Compounds per year",
      "default": 12,
      "minimum": 1,
      "maximum": 365
    },
    "months": {
      "type": "integer",
      "title": "Staking duration in months",
      "description": "Staking duration in months",
      "default": 12,
      "minimum": 1,
      "maximum": 600
    },
    "stakingFeePercent": {
      "type": "number",
      "title": "Fee on positive staking rewards (%)",
      "description": "Fee on positive staking rewards (%)",
      "default": 0,
      "minimum": 0,
      "maximum": 100
    }
  },
  "required": [
    "symbol",
    "mode",
    "side",
    "entryPrice",
    "exitPrice",
    "quantity",
    "entryFeePercent",
    "exitFeePercent",
    "fundingCost",
    "margin",
    "leverage",
    "maintenanceMarginPercent",
    "accountEquity",
    "riskPercent",
    "stopPrice",
    "principal",
    "annualRate",
    "rateKind",
    "compoundingPeriods",
    "months",
    "stakingFeePercent"
  ]
}