{
  "openapi": "3.1.0",
  "info": {
    "title": "Moose Spot Trading API",
    "version": "1.0.0",
    "description": "Exact-input spot swaps on Monad (chain 143), including native MON. Quotes and transaction preparation require no wallet address, login, API key or account deployment. This API has three public endpoints: configuration, supported tokens and quotes.\n\n## Trading flow\nRead /v1/config and /v1/tokens. For ERC-20 input, approve the shared spender returned by configuration (the existing MooseAggregator proxy). Request a fresh quote with tokenIn, tokenOut, amountIn and slippageBps. Native MON input requires no approval. Sign the returned transaction locally with your own nonce and broadcast through your RPC. The API does not relay transactions or return account data. Read the receipt through your RPC. Funds remain in your wallet between swaps; output goes to the transaction sender. Contract callers must accept native output when requesting MON.\n\nThe same signed quote is usable by any funded caller until its deadline and block anchor expire. Preserve all trade fields and the embedded signature. Simulation executes the full-size swap at a canonical block, including funding and fees, without querying a customer's balance, allowance or address. It cannot guarantee balances, allowance, receiver behavior or the execution price after state changes.\n\n## Conventions and limits\nPOST requires Content-Type: application/json and exactly one object. Unknown fields (including owner, from and recipient) and trailing JSON are rejected. Quote bodies are limited to 65,536 bytes. Amounts are decimal strings in base units; formatted amounts are display only. Native MON is address zero. Responses use lowercase addresses and hashes; transaction value, gas and gasPrice use hexadecimal RPC quantities. Gas is a conservative limit, not consumed gas; Monad charges the gas limit. The signed quote deadline is 20 seconds after the simulation block timestamp; the request processing timeout is 30 seconds. Responses are no-store. Unknown routes/methods may return plain-text 404/405.\n\nPer-IP edge limits are 10 requests/second with burst 20 and at most 20 concurrent requests. Shared regional limits are 40 requests/second with burst 40 and at most 64 concurrent requests across all API clients and hostnames. At most four quotes execute concurrently across regions. HTTP 429 indicates throttling; respect Retry-After when present. Handled errors use {error:{code,message,retryable}}. Use the code rather than matching message text. A retryable quote error permits a later quote attempt, not blind resubmission of a signed transaction.\n\n## Fees\nOutput is net of the protocol fee. Let G be gross output, B the signed route baseline at actual committed inputs, m the minimum, c surplusFeeCapBps and f surplusFeeBps. When G exceeds B and m, fee=min(floor(min(G-B,floor(B*c/10000))*f/10000),G-m), otherwise zero. Configuration publishes fee rates and collector. Fees settle in the output token (wrapped MON for native output). The quote reports the simulated fee; DirectSwapExecuted in the transaction receipt reports the actual fee. The signed minimum is based on simulated net output.\n\nNo Perps, balances, positions, stop triggers, user history or receipt endpoint is provided."
  },
  "servers": [
    {
      "url": "https://api.moose.trade",
      "description": "Monad mainnet, chain ID 143."
    }
  ],
  "tags": [
    {
      "name": "Discovery",
      "description": "Network, contract and supported-token metadata."
    },
    {
      "name": "Quotes",
      "description": "Fully simulated exact-input quotes, independent of customer identity."
    }
  ],
  "paths": {
    "/v1/config": {
      "get": {
        "operationId": "config",
        "summary": "Public deployment, quote signer and immutable fee policy",
        "responses": {
          "200": {
            "description": "Successful response; Cache-Control: no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Config"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoStore"
              }
            }
          }
        },
        "tags": [
          "Discovery"
        ],
        "description": "Returns chain and contract identities, runtime code hashes, the public quote signer, and the surplus-fee policy. Contract addresses and fee configuration apply to the returned transaction data. Discovery metadata does not guarantee current quote availability."
      }
    },
    "/v1/tokens": {
      "get": {
        "operationId": "tokens",
        "summary": "Browse and search the website token catalog, including native MON",
        "responses": {
          "200": {
            "description": "Successful response; Cache-Control: no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tokens"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoStore"
              }
            }
          }
        },
        "tags": [
          "Discovery"
        ],
        "description": "Shares the website catalog, including standard tokens and discovered tokens such as xStocks. A catalog entry does not guarantee an executable route. Use q for a symbol, name or exact contract address. Follow nextCursor to browse further pages. Pages list the most recently updated catalog entries first; read the reviewed token set with tier=premium. Native MON is included on the first matching page; an API-specific whitelist is not used.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Text contained in the symbol or name, compared without case, or one complete contract address.",
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          },
          {
            "name": "tier",
            "in": "query",
            "description": "premium selects the reviewed token set. catalog selects the other tokens discovered from chain activity. Omit it for both.",
            "schema": {
              "type": "string",
              "enum": [
                "premium",
                "catalog"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum catalog entries per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 250
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "nextCursor from the previous page of the same q and tier.",
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          }
        ]
      }
    },
    "/v1/quote": {
      "post": {
        "operationId": "quote",
        "summary": "Simulate exact input without any customer address, balance or approval",
        "responses": {
          "200": {
            "description": "Successful response; Cache-Control: no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteResponse"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoStore"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/QuoteNotFound"
          },
          "422": {
            "$ref": "#/components/responses/QuoteRejected"
          },
          "429": {
            "$ref": "#/components/responses/Busy"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              },
              "examples": {
                "nativeInput": {
                  "summary": "Quote 1 MON with 0.5% slippage",
                  "description": "Illustrative output address only; replace it with a supported token from GET /v1/tokens.",
                  "value": {
                    "tokenIn": "0x0000000000000000000000000000000000000000",
                    "tokenOut": "0x1111111111111111111111111111111111111111",
                    "amountIn": "1000000000000000000",
                    "slippageBps": 50
                  }
                }
              }
            }
          },
          "description": "One JSON object, at most 65,536 bytes. All four fields are required; no owner or session identity is accepted."
        },
        "tags": [
          "Quotes"
        ],
        "description": "Accepts only tokenIn, tokenOut, amountIn and slippageBps. Both addresses must be listed and differ after native-MON normalization. amountIn must be between 20 and 2^256 - 1 base units and within available route capacity. Every successful quote is verified by full-swap simulation, including its fee and signed minimum output. No customer address, balance or approval is required. The response includes complete routes and a quote signature already encoded in transaction.data. Supply a nonce and sign the transaction locally. State may change before mining; the signed floor, deadline and execution anchor remain authoritative. The nominal deadline is simulation-block time plus 20 seconds, so remaining validity is shorter on receipt."
      }
    }
  },
  "components": {
    "schemas": {
      "Address": {
        "type": "string",
        "pattern": "^0x[0-9a-f]{40}$",
        "description": "Canonical lowercase 20-byte response address. Native MON uses the zero address."
      },
      "Hash": {
        "type": "string",
        "pattern": "^0x[0-9a-f]{64}$",
        "description": "Canonical lowercase 32-byte hash."
      },
      "Amount": {
        "type": "string",
        "pattern": "^(0|[1-9][0-9]*)$",
        "description": "Unsigned decimal integer string in the associated token's base units. No sign, leading zeroes, decimal point or exponent."
      },
      "HexBytes": {
        "type": "string",
        "pattern": "^0x([0-9a-f]{2})*$",
        "description": "Lowercase hexadecimal byte string with an even number of digits after 0x."
      },
      "Contract": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "codeHash": {
            "$ref": "#/components/schemas/Hash"
          }
        },
        "required": [
          "address",
          "codeHash"
        ],
        "description": "Configured contract address and keccak256 hash of its deployed runtime bytecode."
      },
      "Token": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "symbol": {
            "type": "string"
          },
          "decimals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 255
          }
        },
        "required": [
          "address",
          "symbol",
          "decimals"
        ],
        "description": "Token identity and display precision. Amounts use base units; decimals is display metadata."
      },
      "Anchor": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "blockNumber": {
            "type": "integer",
            "minimum": 0
          },
          "blockHash": {
            "$ref": "#/components/schemas/Hash"
          },
          "headTimeUnixMs": {
            "type": "integer",
            "minimum": 0,
            "description": "Timestamp of this block in Unix milliseconds, not the API response time."
          }
        },
        "required": [
          "blockNumber",
          "blockHash",
          "headTimeUnixMs"
        ],
        "description": "Canonical block used to simulate the quote. Distinct from the execution anchor in trade."
      },
      "Curve": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "inputScale": {
            "$ref": "#/components/schemas/Amount"
          },
          "outputScale": {
            "$ref": "#/components/schemas/Amount"
          },
          "r0Wad": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*|-[1-9][0-9]*)$"
          },
          "r1Wad": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*|-[1-9][0-9]*)$"
          },
          "r2Wad": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*|-[1-9][0-9]*)$"
          },
          "maxInput": {
            "$ref": "#/components/schemas/Amount"
          }
        },
        "required": [
          "inputScale",
          "outputScale",
          "r0Wad",
          "r1Wad",
          "r2Wad",
          "maxInput"
        ],
        "description": "Signed pricing curve parameters. Preserve these values verbatim; callers do not need to evaluate them to execute a quote."
      },
      "Pool": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "dex": {
            "$ref": "#/components/schemas/Address",
            "description": "Execution adapter contract address."
          },
          "pool": {
            "$ref": "#/components/schemas/Address"
          },
          "inputTarget": {
            "$ref": "#/components/schemas/Address",
            "description": "Address that receives this pool execution's input; preserve verbatim."
          },
          "codeHash": {
            "$ref": "#/components/schemas/Hash",
            "description": "Expected runtime code hash of the adapter at dex."
          },
          "data": {
            "$ref": "#/components/schemas/HexBytes",
            "description": "Opaque adapter-specific execution data; preserve verbatim."
          },
          "curve": {
            "$ref": "#/components/schemas/Curve"
          }
        },
        "required": [
          "dex",
          "pool",
          "inputTarget",
          "codeHash",
          "data",
          "curve"
        ]
      },
      "Hop": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tokenIn": {
            "$ref": "#/components/schemas/Address"
          },
          "tokenOut": {
            "$ref": "#/components/schemas/Address"
          },
          "pools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Pool"
            }
          }
        },
        "required": [
          "tokenIn",
          "tokenOut",
          "pools"
        ],
        "description": "One token pair and its candidate pools. Native MON is normalized to wrapped MON inside routes."
      },
      "Route": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "hops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Hop"
            }
          },
          "curve": {
            "$ref": "#/components/schemas/Curve"
          }
        },
        "required": [
          "hops",
          "curve"
        ],
        "description": "One ordered sequence of hops and its original signed aggregate curve."
      },
      "QuoteRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tokenIn": {
            "type": "string",
            "pattern": "^0[xX][0-9a-fA-F]{40}$",
            "description": "20-byte token address; checksum casing is accepted. Native MON is the zero address."
          },
          "tokenOut": {
            "type": "string",
            "pattern": "^0[xX][0-9a-fA-F]{40}$",
            "description": "20-byte token address; checksum casing is accepted. Native MON is the zero address."
          },
          "amountIn": {
            "type": "string",
            "pattern": "^([2-9][0-9]|[1-9][0-9]{2,77})$",
            "description": "Exact input in base units: minimum 20, maximum 2^256 - 1 (115792089237316195423570985008687907853269984665640564039457584007913129639935). The amount must also fit available route capacity."
          },
          "slippageBps": {
            "type": "integer",
            "minimum": 0,
            "maximum": 5000,
            "description": "Maximum output slippage in basis points: 50 means 0.5%. Required even when zero; maximum 5000 (50%)."
          }
        },
        "required": [
          "tokenIn",
          "tokenOut",
          "amountIn",
          "slippageBps"
        ],
        "examples": [
          {
            "tokenIn": "0x0000000000000000000000000000000000000000",
            "tokenOut": "0x1111111111111111111111111111111111111111",
            "amountIn": "1000000000000000000",
            "slippageBps": 50
          }
        ]
      },
      "Trade": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tokenIn": {
            "$ref": "#/components/schemas/Address"
          },
          "tokenOut": {
            "$ref": "#/components/schemas/Address"
          },
          "amountIn": {
            "$ref": "#/components/schemas/Amount"
          },
          "minAmountOut": {
            "$ref": "#/components/schemas/Amount"
          },
          "quoteId": {
            "$ref": "#/components/schemas/Hash"
          },
          "deadline": {
            "type": "integer",
            "minimum": 0,
            "description": "Execution deadline in Unix seconds; normally simulation-block timestamp plus 20 seconds. This is not a fresh 20-second window from API receipt."
          },
          "blockNumber": {
            "type": "integer",
            "minimum": 0,
            "description": "Previous-block execution anchor, checked on chain; distinct from simulationBlock.blockNumber."
          },
          "blockHash": {
            "$ref": "#/components/schemas/Hash"
          },
          "executionGas": {
            "type": "integer",
            "minimum": 500000,
            "maximum": 20000000,
            "description": "Signed execution gas budget. Preserve this field; it is distinct from the outer transaction.gas limit."
          },
          "routes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Route"
            }
          },
          "xStocks": {
            "type": "array",
            "maxItems": 34,
            "items": {
              "$ref": "#/components/schemas/Address"
            },
            "description": "Factory-verified xStock classification bound into the signature. Preserve exactly."
          }
        },
        "required": [
          "tokenIn",
          "tokenOut",
          "amountIn",
          "minAmountOut",
          "quoteId",
          "deadline",
          "blockNumber",
          "blockHash",
          "executionGas",
          "routes",
          "xStocks"
        ],
        "description": "Complete signed contract tuple. Preserve all fields and nested route data; modifying them invalidates the quote signature."
      },
      "Observed": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "routeInputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Amount"
            }
          },
          "routeOutputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Amount"
            }
          },
          "poolInputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Amount"
            }
          },
          "poolOutputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Amount"
            }
          }
        },
        "required": [
          "routeInputs",
          "routeOutputs",
          "poolInputs",
          "poolOutputs"
        ],
        "description": "Gross executed route and pool amounts before the protocol fee. Route arrays follow trade.routes order; pool arrays flatten routes, then hops, then pools in order. Unused entries are zero. Each pool amount uses its hop's input/output token base units."
      },
      "Transaction": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "chainId": {
            "const": 143,
            "type": "integer"
          },
          "to": {
            "$ref": "#/components/schemas/Address"
          },
          "data": {
            "$ref": "#/components/schemas/HexBytes"
          },
          "value": {
            "type": "string",
            "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
            "description": "Native value in wei as an RPC hex quantity: amountIn for native MON input, otherwise zero."
          },
          "gas": {
            "type": "string",
            "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
            "description": "Conservative outer transaction gas limit as an RPC hex quantity, not measured gas usage. Preserve the supplied budget."
          },
          "gasPrice": {
            "type": "string",
            "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
            "description": "RPC-suggested gas price in wei as a hex quantity. The caller may choose different fees or an EIP-1559 transaction."
          }
        },
        "required": [
          "chainId",
          "to",
          "data",
          "value",
          "gas",
          "gasPrice"
        ],
        "description": "Unsigned direct-wallet transaction. to is the shared aggregator proxy. data includes the complete Trade and backend signature. Supply a nonce and sign locally; broadcast and read receipts through your own RPC."
      },
      "QuoteAmounts": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tokenIn": {
            "$ref": "#/components/schemas/Token"
          },
          "tokenOut": {
            "$ref": "#/components/schemas/Token"
          },
          "amountIn": {
            "$ref": "#/components/schemas/Amount"
          },
          "amountOut": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)$",
            "description": "Simulated net output received after the protocol fee."
          },
          "minAmountOut": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)$",
            "description": "Signed net-output floor: max(1, floor(simulated net output * (10000 - slippageBps) / 10000)). The full quote, including this minimum, is verified by simulation."
          },
          "amountInFormatted": {
            "type": "string",
            "description": "Human-readable amount using the associated token decimals. Use the base-unit string for transaction logic."
          },
          "amountOutFormatted": {
            "type": "string",
            "description": "Human-readable amount using the associated token decimals. Use the base-unit string for transaction logic."
          },
          "minAmountOutFormatted": {
            "type": "string",
            "description": "Human-readable amount using the associated token decimals. Use the base-unit string for transaction logic."
          },
          "protocolFee": {
            "$ref": "#/components/schemas/Amount",
            "description": "Simulated fee in the route output token; WMON when the requested output is native MON."
          },
          "slippageBps": {
            "type": "integer",
            "minimum": 0,
            "maximum": 5000
          }
        },
        "required": [
          "tokenIn",
          "tokenOut",
          "amountIn",
          "amountOut",
          "minAmountOut",
          "amountInFormatted",
          "amountOutFormatted",
          "minAmountOutFormatted",
          "protocolFee",
          "slippageBps"
        ]
      },
      "QuoteResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "quote": {
            "$ref": "#/components/schemas/QuoteAmounts"
          },
          "trade": {
            "$ref": "#/components/schemas/Trade"
          },
          "transaction": {
            "$ref": "#/components/schemas/Transaction"
          },
          "materialId": {
            "$ref": "#/components/schemas/Hash",
            "description": "Opaque quote-data identifier for correlation and support."
          },
          "routesHash": {
            "$ref": "#/components/schemas/Hash",
            "description": "Canonical hash of the complete routes. Clients can submit transaction.data directly without reconstructing the routes."
          },
          "simulationBlock": {
            "$ref": "#/components/schemas/Anchor"
          },
          "observed": {
            "$ref": "#/components/schemas/Observed"
          },
          "signature": {
            "type": "string",
            "pattern": "^0x[0-9a-f]{130}$",
            "description": "65-byte EIP-191 quote signature, reusable across accounts until expiry and already included in transaction.data."
          },
          "spender": {
            "$ref": "#/components/schemas/Address",
            "description": "Shared ERC-20 approval address for every caller. Equal to aggregator.address and transaction.to. Native MON needs no approval."
          }
        },
        "required": [
          "signature",
          "quote",
          "trade",
          "transaction",
          "materialId",
          "routesHash",
          "simulationBlock",
          "observed",
          "spender"
        ]
      },
      "Config": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "chainId": {
            "const": 143,
            "type": "integer"
          },
          "wrappedNative": {
            "$ref": "#/components/schemas/Contract"
          },
          "quoteHelper": {
            "$ref": "#/components/schemas/Contract"
          },
          "nativeToken": {
            "const": "0x0000000000000000000000000000000000000000",
            "type": "string"
          },
          "maxTransactionGas": {
            "const": 30000000,
            "type": "integer"
          },
          "signerRegistry": {
            "$ref": "#/components/schemas/Contract"
          },
          "quoteSigner": {
            "$ref": "#/components/schemas/Address"
          },
          "feeCollector": {
            "$ref": "#/components/schemas/Address"
          },
          "surplusFeeBps": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000,
            "description": "Share of eligible positive surplus collected as a fee, in basis points. This is not a flat percentage of input or total output."
          },
          "surplusFeeCapBps": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000,
            "description": "Caps eligible surplus at this percentage of the signed baseline before applying surplusFeeBps. See the surplus-fee formula in this document."
          },
          "aggregator": {
            "$ref": "#/components/schemas/Contract"
          },
          "aggregatorImplementation": {
            "$ref": "#/components/schemas/Contract"
          },
          "directSwapPolicy": {
            "$ref": "#/components/schemas/Contract"
          },
          "spender": {
            "$ref": "#/components/schemas/Address",
            "description": "Shared ERC-20 approval address for every caller. Equal to aggregator.address and transaction.to. Native MON needs no approval."
          }
        },
        "required": [
          "chainId",
          "wrappedNative",
          "quoteHelper",
          "nativeToken",
          "maxTransactionGas",
          "signerRegistry",
          "quoteSigner",
          "feeCollector",
          "surplusFeeBps",
          "surplusFeeCapBps",
          "aggregator",
          "aggregatorImplementation",
          "directSwapPolicy",
          "spender"
        ]
      },
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "invalid_request",
                  "unsupported_token",
                  "no_route",
                  "pair_unavailable",
                  "source_unavailable",
                  "invalid_material",
                  "stale_material",
                  "amount_too_large",
                  "funding_unavailable",
                  "simulation_failed",
                  "chain_unavailable",
                  "signing_unavailable",
                  "busy"
                ],
                "description": "Machine-readable error code; use this instead of matching the message."
              },
              "message": {
                "type": "string",
                "description": "Human-readable explanation; clients must not parse its wording."
              },
              "retryable": {
                "type": "boolean",
                "description": "Whether a later quote attempt may succeed. Honor Retry-After when present."
              }
            },
            "required": [
              "code",
              "message",
              "retryable"
            ]
          }
        },
        "required": [
          "error"
        ],
        "examples": [
          {
            "error": {
              "code": "busy",
              "message": "Request concurrency is exhausted; retry shortly.",
              "retryable": true
            }
          }
        ]
      },
      "Tokens": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogToken"
            },
            "maxItems": 501
          },
          "nextCursor": {
            "type": "string"
          }
        },
        "required": [
          "tokens"
        ]
      },
      "CatalogToken": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "address",
          "tier",
          "validated",
          "routeStatus"
        ],
        "properties": {
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "symbol": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "decimals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 255
          },
          "tier": {
            "type": "string",
            "enum": [
              "premium",
              "catalog"
            ]
          },
          "validated": {
            "type": "boolean"
          },
          "routeStatus": {
            "type": "string"
          }
        }
      }
    },
    "headers": {
      "NoStore": {
        "description": "API JSON responses must not be cached.",
        "schema": {
          "type": "string",
          "const": "no-store"
        }
      },
      "RetryAfter": {
        "description": "Minimum retry delay in seconds when request capacity is exhausted.",
        "schema": {
          "type": "string",
          "const": "1"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid JSON, unknown fields or invalid quote values.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "QuoteNotFound": {
        "description": "unsupported_token or no_route: valid supported token metadata or an executable route could not be found for the pair.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "QuoteRejected": {
        "description": "pair_unavailable, invalid_material, stale_material, amount_too_large, funding_unavailable or simulation_failed: the pair is unavailable, quote data is invalid or expired, the amount exceeds route capacity, simulation capacity is unavailable, or the full swap cannot be verified. Inspect error.retryable.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Busy": {
        "description": "busy: request capacity is exhausted. Wait at least Retry-After seconds before retrying.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "busy",
                "message": "Request concurrency is exhausted; retry shortly.",
                "retryable": true
              }
            }
          }
        }
      },
      "Unavailable": {
        "description": "Source, chain deployment or signing authority is temporarily unavailable.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}
