{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/anygas-xyz/json-schema/anygas-xyz-route-request-schema.json",
  "title": "RouteRequest",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/anygas-xyz-openapi.json#/components/schemas/RouteRequest",
  "type": "object",
  "required": [
    "fromChain",
    "toChain",
    "amount"
  ],
  "properties": {
    "fromChain": {
      "description": "Source node: EVM chain id or one of \"solana\"/\"stellar\"/\"bitcoin\".",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "integer"
        }
      ]
    },
    "toChain": {
      "description": "Destination node.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "integer"
        }
      ]
    },
    "amount": {
      "type": "string",
      "description": "Source-token smallest units."
    },
    "fromToken": {
      "type": "string",
      "description": "Symbol or address; omit for native."
    },
    "toToken": {
      "type": "string",
      "description": "Symbol or address; omit for native."
    },
    "toAddress": {
      "type": "string",
      "description": "Recipient; defaults to fromAddress."
    },
    "fromAddress": {
      "type": "string",
      "description": "Quote origin; anonymous default used if omitted."
    },
    "slippage": {
      "type": "number",
      "description": "Fraction, e.g. 0.005."
    },
    "token": {
      "type": "string",
      "description": "Shorthand: sets BOTH fromToken and toToken (e.g. \"USDC\"). Accepted on POST bodies and as a GET query parameter. Explicit fromToken/toToken win when present."
    }
  }
}