{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vibekast-xyz/json-schema/vibekast-xyz-order-request-schema.json",
  "title": "OrderRequest",
  "description": "Give exactly one of quantiles or probs. An empty array or null counts as not given.",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vibekast-xyz-openapi.json#/components/schemas/OrderRequest",
  "type": "object",
  "properties": {
    "quantiles": {
      "description": "Your forecast as 7 BTC prices in USD at the 5th, 10th, 25th, 50th, 75th, 90th and 95th percentiles, e.g. [76000, 77500, 79500, 81000, 82500, 84500, 86000].",
      "anyOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NumberOrDecimal"
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "probs": {
      "description": "Alternative to quantiles: one non-negative weight per price range, in index order. Normalized for you.",
      "anyOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NumberOrDecimal"
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "budget": {
      "description": "tUSDC to spend, fee included, 1 to 10000.",
      "$ref": "#/$defs/NumberOrDecimal"
    },
    "wallet": {
      "description": "Your wallet. Lets the API check your balance and skip the approval if it's already granted.",
      "anyOf": [
        {
          "$ref": "#/$defs/Address"
        },
        {
          "type": "null"
        }
      ]
    },
    "slippageBps": {
      "description": "Price-move allowance in basis points, default 100.",
      "type": "integer",
      "minimum": 0,
      "maximum": 500
    }
  },
  "required": [
    "budget"
  ],
  "additionalProperties": false,
  "$defs": {
    "Address": {
      "type": "string",
      "pattern": "^0x[0-9a-fA-F]{40}$",
      "description": "0x-prefixed 20-byte address."
    },
    "NumberOrDecimal": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "pattern": "^-?\\d+(\\.\\d+)?$"
        }
      ],
      "description": "A number, or the same value as a decimal string."
    }
  }
}