BlazePhoenix Quote API

The Quote API from BlazePhoenix — 4 operation(s) for quote.

Operations 5

GET /api/quote/prepare The eth_call to run on YOUR node (zero RPC here) #
POST /api/quote/prepare Up to 32 prepared calls as ONE JSON-RPC batch for your node #
POST /api/quote/decode Your node's eth_call answer → quote, Phoenix Check, verified calldata (pure) #
GET /api/quote Retired relay: answers 400 rpc_required with the prepared call inline — quotes… #
POST /api/quote/batch Retired relay (max 10): answers 400 rpc_required with the prepared calls — use… #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/blazephoenix-xyz:blazephoenix-xyz-quote-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

blazephoenix-xyz-quote-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: BlazePhoenix Integration API (your RPC) Quote API
  version: 2.0.0
  description: 'On-chain DEX-aggregator integration for Base, Ethereum, Optimism, Arbitrum and Robinhood Chain. Quotes run on YOUR RPC: this API performs no RPC for integrators. prepare → run the returned eth_call on your node → decode (pure) gives the quote, the Phoenix Check and, with `recipient`, verified unsigned Router calldata. /api/deployments publishes the versioned contract registry. No API key, no signup, open CORS. In-process instead: npm i @blazephoenix/sdk viem, or the local MCP server (npx -y @blazephoenix/mcp). Playground: https://blazephoenix.xyz/?tab=api'
  contact:
    email: contact@blazephoenix.xyz
    url: https://blazephoenix.xyz/?tab=api
servers:
- url: https://blazephoenix.xyz
tags:
- name: Quote
paths:
  /api/quote/prepare:
    get:
      operationId: prepareQuote
      summary: The eth_call to run on YOUR node (zero RPC here)
      parameters:
      - name: chain
        in: query
        required: true
        description: 'chain id or name: 8453/base · 1/eth · 10/optimism · 42161/arbitrum · 4663/robinhood'
        schema:
          type: string
      - name: in
        in: query
        required: true
        description: 'input token: 0x-address or ETH/WETH/USDC/BZPX (anything else by address — the API never guesses a token)'
        schema:
          type: string
      - name: out
        in: query
        required: true
        description: 'output token: 0x-address or ETH/WETH/USDC/BZPX'
        schema:
          type: string
      - name: amountIn
        in: query
        required: true
        description: input amount in the token’s base units (integer, wei-style)
        schema:
          type: string
          pattern: ^[0-9]{1,77}$
      - name: recipient
        in: query
        required: false
        description: 0x-address — response then includes ready-to-send tx calldata
        schema:
          type: string
      - name: slippageBps
        in: query
        required: false
        description: 0–5000 (default 50); how far under the quoted net output userMinOut may sit — lower is refused (min_implausible)
        schema:
          type: integer
          minimum: 0
          maximum: 5000
      - name: userMinOut
        in: query
        required: false
        description: minimum output (base units) from a price you trust — required for tx; the tx enforces exactly this value; at most 2^256-1
        schema:
          type: string
          pattern: ^[0-9]{1,78}$
      - name: version
        in: query
        required: false
        description: 'protocol version: latest (default) | 1 | 2 | 2.0.0 — see /api/deployments'
        schema:
          type: string
      - name: deadlineSec
        in: query
        required: false
        description: tx deadline horizon in seconds, 10–3600 (default 120)
        schema:
          type: integer
          minimum: 10
          maximum: 3600
      - name: exact
        in: query
        required: false
        description: 'exact=1 → previewPlanExact: every leg dry-run on its pool in this block (slower). No tokens move from a holder, so a token that blocks or taxes its own transfer still quotes. With recipient + userMinOut it also returns tx: exact mode applies a safety margin, so userMinOut must sit at or under exactOut less 50 bps (min_above_exact)'
        schema:
          type: string
          enum:
          - '1'
      responses:
        '200':
          description: prepared call + request to echo to decode
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                    - true
                  mode:
                    type: string
                    enum:
                    - prepare
                  protocolVersion:
                    type: string
                  call:
                    type: object
                    description: '{ to: Quoter, data, function, signature }'
                  rpcRequest:
                    type: object
                    description: ready JSON-RPC eth_call body for your node
                  curl:
                    type: string
                  request:
                    type: object
                    description: echo verbatim to /api/quote/decode
        '400':
          description: invalid parameter (bad_*) or version not deployed (not_deployed)
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                    - false
                  code:
                    type: string
                    description: stable machine code (bad_*, not_deployed, no_route, decode_failed, result_mismatch, pool_unverified, rpc_required…)
                  error:
                    type: string
                required:
                - ok
                - code
                - error
      tags:
      - Quote
    post:
      operationId: prepareQuoteBatch
      summary: Up to 32 prepared calls as ONE JSON-RPC batch for your node
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                requests:
                  type: array
                  maxItems: 32
                  items:
                    type: object
                    additionalProperties:
                      type:
                      - string
                      - number
                      - boolean
                      description: a number must be a safe integer (≤ 2^53−1); send amounts as decimal strings
              required:
              - requests
      responses:
        '200':
          description: '{ rpcBatch, items } — ids in rpcBatch are item indexes'
          content:
            application/json: {}
        '400':
          description: invalid envelope
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                    - false
                  code:
                    type: string
                    description: stable machine code (bad_*, not_deployed, no_route, decode_failed, result_mismatch, pool_unverified, rpc_required…)
                  error:
                    type: string
                required:
                - ok
                - code
                - error
      tags:
      - Quote
  /api/quote/decode:
    post:
      operationId: decodeQuote
      summary: Your node's eth_call answer → quote, Phoenix Check, verified calldata (pure)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                request:
                  type: object
                  description: the `request` from /api/quote/prepare, verbatim
                result:
                  type: string
                  description: 0x hex result from your node
                items:
                  type: array
                  maxItems: 32
                  description: 'or many: [{ request, result }]'
      responses:
        '200':
          description: decoded quote
          content:
            application/json:
              schema:
                type: object
                description: A quote decoded from YOUR node's eth_call answer (Quoter.previewPlan / previewAndEncode). Numeric fields travel as decimal strings.
                properties:
                  ok:
                    type: boolean
                    enum:
                    - true
                  mode:
                    type: string
                    enum:
                    - preview
                    - exact
                  chainId:
                    type: integer
                  protocolVersion:
                    type: string
                    description: deployment version that answered (1.0.0 | 2.0.0)
                  tokenIn:
                    type: string
                  tokenOut:
                    type: string
                  amountIn:
                    type: string
                  amountOut:
                    type: string
                    description: net output after the protocol fee — compare THIS across venues
                  grossAmountOut:
                    type: string
                    description: output before the protocol fee (same as quote.grossOut); amountOut + quote.protocolFee. Absent on a 2.x exact multi-hop quote, where the fee is taken on the anchor hop's input (quote.feeTakenOn) and every figure is already net
                  quote:
                    type: object
                    properties:
                      grossOut:
                        type: string
                      protocolFee:
                        type: string
                      netOut:
                        type: string
                      ironFloor:
                        type: string
                      effectiveMinOut:
                        type: string
                      impactBps:
                        type: integer
                        maximum: 10000
                      estGas:
                        type: string
                      hops:
                        type: integer
                      legs:
                        type: integer
                      canExecute:
                        type: boolean
                      hasSurplus:
                        type: boolean
                      feeBps:
                        type: integer
                  route:
                    type: object
                    description: full executable route struct — pass verbatim to Router.swapExactIn
                  checks:
                    type: object
                    description: 'Phoenix Check — deterministic quote invariants for agents and answer engines. Fails closed (verdict: blocked | danger | caution | ok).'
                    properties:
                      verdict:
                        type: string
                        enum:
                        - blocked
                        - danger
                        - caution
                        - ok
                      priceImpact:
                        type: object
                        properties:
                          bps:
                            type: integer
                          verdict:
                            type: string
                            enum:
                            - blocked
                            - danger
                            - caution
                            - ok
                          hardLineBps:
                            type: integer
                            description: 2000 = 20%, the bad-fill line
                      ironFloor:
                        type: object
                        properties:
                          enforcedOnChain:
                            type: boolean
                          armed:
                            type: boolean
                          ironFloor:
                            type: string
                          effectiveMinOut:
                            type: string
                      crossCheck:
                        type: object
                        properties:
                          basis:
                            type: string
                          reproducible:
                            type: boolean
                  tx:
                    type: object
                    description: 'present when `recipient` was prepared: unsigned, ready for sendTransaction. On 2.x the bytes are the Quoter''s own (previewAndEncode), verified field by field.'
                    properties:
                      to:
                        type: string
                        description: the Router of this version (re-resolved from the registry, never from the request)
                      data:
                        type: string
                      value:
                        type: string
                        description: '"0", or amountIn for swapExactInNative (2.x native ETH input)'
                  minOut:
                    type: string
                    description: 'minimum encoded in tx: exactly the caller''s userMinOut'
                  entry:
                    type: string
                    enum:
                    - swapExactIn
                    - swapExactInNative
                  encodedBy:
                    type: string
                    enum:
                    - quoter
                    - site
                  approval:
                    type: object
                    description: 'ERC-20 input: approve the Router for tokenIn before sending tx'
                  txError:
                    type: object
                    description: why no tx was emitted (not_executable, calldata_mismatch, wrap_required, deadline_passed, min_required, min_implausible, min_above_exact — decode is pure, so a tx needs userMinOut set by the caller)
                  exact:
                    type: object
                    description: 'mode exact only: what the pool dry-run measures (`tested`) and what it does not (`notTested`)'
                    properties:
                      tested:
                        type: string
                      notTested:
                        type: string
                  wrapRequired:
                    type: boolean
                    description: in=ETH on a 1.x Router — wrap to WETH before swapping
                  unwrapAfter:
                    type: boolean
                    description: out=ETH — the Router delivers WETH
                  meta:
                    type: object
                    properties:
                      decodedBy:
                        type: string
                      rpc:
                        type: string
                        enum:
                        - yours
                      version:
                        type: string
                required:
                - ok
                - mode
                - chainId
                - tokenIn
                - tokenOut
                - amountIn
                - amountOut
                - route
        '400':
          description: invalid request/result
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                    - false
                  code:
                    type: string
                    description: stable machine code (bad_*, not_deployed, no_route, decode_failed, result_mismatch, pool_unverified, rpc_required…)
                  error:
                    type: string
                required:
                - ok
                - code
                - error
        '422':
          description: empty result (no_route), not a Quoter answer (decode_failed), not the Quoter answer to this request (result_mismatch), or a pool the deployed factories would not give (pool_unverified)
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                    - false
                  code:
                    type: string
                    description: stable machine code (bad_*, not_deployed, no_route, decode_failed, result_mismatch, pool_unverified, rpc_required…)
                  error:
                    type: string
                required:
                - ok
                - code
                - error
      tags:
      - Quote
  /api/quote:
    get:
      operationId: getQuote
      deprecated: true
      summary: 'Retired relay: answers 400 rpc_required with the prepared call inline — quotes…'
      parameters:
      - name: chain
        in: query
        required: true
        description: 'chain id or name: 8453/base · 1/eth · 10/optimism · 42161/arbitrum · 4663/robinhood'
        schema:
          type: string
      - name: in
        in: query
        required: true
        description: 'input token: 0x-address or ETH/WETH/USDC/BZPX (anything else by address — the API never guesses a token)'
        schema:
          type: string
      - name: out
        in: query
        required: true
        description: 'output token: 0x-address or ETH/WETH/USDC/BZPX'
        schema:
          type: string
      - name: amountIn
        in: query
        required: true
        description: input amount in the token’s base units (integer, wei-style)
        schema:
          type: string
          pattern: ^[0-9]{1,77}$
      - name: recipient
        in: query
        required: false
        description: 0x-address — response then includes ready-to-send tx calldata
        schema:
          type: string
      - name: slippageBps
        in: query
        required: false
        description: 0–5000 (default 50); how far under the quoted net output userMinOut may sit — lower is refused (min_implausible)
        schema:
          type: integer
          minimum: 0
          maximum: 5000
      - name: userMinOut
        in: query
        required: false
        description: minimum output (base units) from a price you trust — required for tx; the tx enforces exactly this value; at most 2^256-1
        schema:
          type: string
          pattern: ^[0-9]{1,78}$
      - name: version
        in: query
        required: false
        description: 'protocol version: latest (default) | 1 | 2 | 2.0.0 — see /api/deployments'
        schema:
          type: string
      - name: deadlineSec
        in: query
        required: false
        description: tx deadline horizon in seconds, 10–3600 (default 120)
        schema:
          type: integer
          minimum: 10
          maximum: 3600
      - name: exact
        in: query
        required: false
        description: 'exact=1 → previewPlanExact: every leg dry-run on its pool in this block (slower). No tokens move from a holder, so a token that blocks or taxes its own transfer still quotes. With recipient + userMinOut it also returns tx: exact mode applies a safety margin, so userMinOut must sit at or under exactOut less 50 bps (min_above_exact)'
        schema:
          type: string
          enum:
          - '1'
      responses:
        '400':
          description: rpc_required (+ prepared) or a bad_* parameter
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                    - false
                  code:
                    type: string
                    description: stable machine code (bad_*, not_deployed, no_route, decode_failed, result_mismatch, pool_unverified, rpc_required…)
                  error:
                    type: string
                required:
                - ok
                - code
                - error
      tags:
      - Quote
  /api/quote/batch:
    post:
      operationId: getQuoteBatch
      deprecated: true
      summary: 'Retired relay (max 10): answers 400 rpc_required with the prepared calls — use…'
      responses:
        '400':
          description: rpc_required (+ prepared)
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                    - false
                  code:
                    type: string
                    description: stable machine code (bad_*, not_deployed, no_route, decode_failed, result_mismatch, pool_unverified, rpc_required…)
                  error:
                    type: string
                required:
                - ok
                - code
                - error
      tags:
      - Quote