Infrared API (1.0.0)

Download OpenAPI specification:

Token swap routing and execution API

Quote

Quote operations for token swaps

Create a quote for token swap

Computes optimal routing for a token swap and returns a quote with estimated outputs, costs, and routing details. The quote is stored server-side and a quote_id is returned for use with the Execute endpoint.

Quotes expire after approximately 10-15 seconds due to rapidly changing market conditions.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
required
Array of objects (InputToken) [ 1 .. 6 ] items

Input tokens and amounts to swap

required
Array of objects (OutputToken) [ 1 .. 6 ] items

Desired output tokens and ratios. Ratios must sum to 10000 BPS (100%).

taker
required
string^0x[a-fA-F0-9]{40}$

Address holding input tokens with allowances set. This address will execute the transaction.

recipient
string^0x[a-fA-F0-9]{40}$

Address to receive output tokens. Defaults to taker if not specified.

slippage_tolerance_bps
integer [ 0 .. 5000 ]
Default: 100

Maximum acceptable slippage in basis points (0-5000). 100 = 1%.

max_hops
integer [ 1 .. 10 ]
Default: 4

Maximum number of intermediate swaps allowed.

exclude_protocols
Array of strings

Protocol identifiers to exclude from routing.

exclude_pools
Array of strings[ items^0x[a-fA-F0-9]{40}$ ]

Pool addresses to exclude from routing.

simulate
boolean
Default: true

Whether to run full causal simulation. Disabling returns faster but less accurate quotes.

Responses

Request samples

Content type
application/json
Example
{
  • "inputs": [
    ],
  • "outputs": [
    ],
  • "taker": "0x742d35Cc6634C0532925a3b844Bc9e7595f8b3c4"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Health

Health check endpoints

Health check

Returns service health status

Responses

Response samples

Content type
application/json
{
  • "status": "ok",
  • "version": "1.0.0"
}

Readiness check

Returns whether service is ready to accept traffic

Responses

Response samples

Content type
application/json
{
  • "status": "ready"
}