{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/paradex/json-schema/paradex-requests-algo-order-request-schema.json",
  "title": "requests.AlgoOrderRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/paradex-algos-api-openapi.yml#/components/schemas/requests.AlgoOrderRequest",
  "type": "object",
  "required": [
    "algo_type",
    "duration_seconds",
    "market",
    "side",
    "signature",
    "signature_timestamp",
    "size",
    "type"
  ],
  "properties": {
    "algo_type": {
      "description": "Algo type, required for algo orders creation",
      "type": "string"
    },
    "dime_discount": {
      "description": "If true, child-order fees are charged in DIME with the DIME discount applied; falls back to USDC if balance is insufficient",
      "type": "boolean"
    },
    "duration_seconds": {
      "description": "Duration in seconds for which the algo order will be running, required for algo orders creation",
      "type": "integer"
    },
    "frequency": {
      "description": "Interval in seconds between child orders (default: 30)",
      "type": "integer"
    },
    "market": {
      "description": "Market for which order is created",
      "type": "string"
    },
    "on_behalf_of_account": {
      "description": "ID corresponding to the configured isolated margin account. Only for isolated margin orders",
      "type": "string"
    },
    "recv_window": {
      "description": "Order will be created if it is received by API within RecvWindow milliseconds from signature timestamp, minimum is 10 milliseconds",
      "type": "integer"
    },
    "side": {
      "description": "Algo order side",
      "allOf": [
        {
          "$ref": "#/$defs/responses.OrderSide"
        }
      ]
    },
    "signature": {
      "description": "Order signature in as a string \"[r,s]\" signed by account's paradex private key",
      "type": "string"
    },
    "signature_timestamp": {
      "description": "Unix timestamp in milliseconds of order creation, used for signature verification",
      "type": "integer"
    },
    "size": {
      "description": "Size of the algo order",
      "type": "string"
    },
    "type": {
      "description": "Algo order type, only MARKET is supported",
      "allOf": [
        {
          "$ref": "#/$defs/responses.OrderType"
        }
      ]
    }
  },
  "$defs": {
    "responses.OrderSide": {
      "type": "string",
      "enum": [
        "BUY",
        "SELL"
      ],
      "x-enum-varnames": [
        "OrderSideBuy",
        "OrderSideSell"
      ]
    },
    "responses.OrderType": {
      "type": "string",
      "enum": [
        "MARKET",
        "LIMIT",
        "STOP_LIMIT",
        "STOP_MARKET",
        "TAKE_PROFIT_LIMIT",
        "TAKE_PROFIT_MARKET",
        "STOP_LOSS_MARKET",
        "STOP_LOSS_LIMIT"
      ],
      "x-enum-varnames": [
        "OrderTypeMarket",
        "OrderTypeLimit",
        "OrderTypeStopLimit",
        "OrderTypeStopMarket",
        "OrderTypeTakeProfitLimit",
        "OrderTypeTakeProfitMarket",
        "OrderTypeStopLossMarket",
        "OrderTypeStopLossLimit"
      ]
    }
  }
}