OpenAny
Get API keyAPI Key
APICrypto & DeFi

uniswap logo
Uniswap Swap Calldata Preparation API

Get Uniswap Swap Calldata Preparation data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Uniswap, pass parameters such as quote, and retrieve structured data including structured JSON records, identifiers, and response metadata for market reference and account inspection, and integration reference, ready for production pipelines and AI agent automation.

Selected price
$0 / callPublished pricing
Sellers / APIs
1 / 2
Requests · 30d
0Selected implementation · last 30 days
Success rate · 30d
—No requests in this period
USE THIS API

Uniswap Swap Calldata Preparation API

Prepare your request, then continue with your agent.

Selected price

$0 / call

Provider
API
Pricing
Connect your agent
On this page

Overview

Overview
Uniswap Swap Calldata Preparation API

Uniswap Create swap EIP 7702 calldata API

Create swap EIP 7702 calldata with the Uniswap API. Provide quote in body. Read the response using the field paths below, preserving identifiers and the declared value types when mapping results.

Quick Facts

Fact Value
Access OpenAny REST
Authentication OpenAny API key in the Authorization header
Core inputs body: body
Selected implementation uniswap · Uniswap Create swap EIP 7702 calldata
Billing Follow the selected implementation pricing, billing unit, quantity and charge rules

What You Can Build

  • Market reference and account inspection: Keep market, asset and account identities distinct when interpreting records.
  • Integration reference: Use the selected request format and keep source identifiers with the returned result.

Documented Response Fields

Field Meaning
gasEstimates Returned gas estimates field
gasFee Returned gas fee field
requestId Request identifier
swap.data Business payload
swap.chainId Chain identifier
swap.from Returned from field
swap.gasLimit Returned gas limit field
swap.maxFeePerGas Returned max fee per gas field

Quick Start

  1. Set OPENANY_API_KEY to your OpenAny API key.
  2. Review the JSON body and supported fields shown in the request template.
  3. Check the HTTP response and business result before reading optional fields.
bash
curl \
  'https://api.openany.si/v1/agent-apis/uniswap/v1/swap_7702' \
  -X POST \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "quote": {
    "chainId": 1,
    "gasFee": "537917653750000",
    "gasFeeQuote": "537917653750000",
    "gasUseEstimate": "250000",
    "input": {
      "amount": "1",
      "maximumAmount": "1",
      "token": "0x0000000000000000000000000000000000000000"
    },
    "maxFeePerGas": "2151670615",
    "maxPriorityFeePerGas": "150000000",
    "output": {
      "amount": "1",
      "minimumAmount": "1",
      "recipient": "0x1111111111111111111111111111111111111111",
      "token": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
    },
    "priceDifference": 0,
    "swapper": "0x1111111111111111111111111111111111111111",
    "tradeType": "EXACT_INPUT"
  },
  "simulateTransaction": false,
  "smartContractDelegationAddress": "0x000000005c84F8Fd50b21CAC312528A64437030e"
}'

Request and Response Examples

The response is a published documentation reference; its values may be historical. The request is an independent calling template. Use current returned identifiers and optional fields for your target resource.

Published Uniswap Create swap EIP 7702 calldata API implementation contract.

Pricing and Billing

The pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service's public availability does not determine OpenAny billing.

Frequently Asked Questions

View FAQ

Related APIs

Playground

Run sends a real API request. Charges follow the published API contract.

Request parameters
body*object

body

Complete public Uniswap request body. Internal fields are prohibited. Source-only annotations are kept in the raw OpenAPI snapshot.
The version of the Universal Router to use for the swap journey. *MUST* be consistent throughout the API calls.
Enable native ETH input support for UniswapX via ERC20-ETH (EIP-7914). When set to true and `tokenIn` is the native currency address (e.g. `0x0000000000000000000000000000000000000000`), the API may return UniswapX routes that spend native ETH for supported wallets.
Optional attribution hint for AI-agent traffic; send it if an AI agent built or operates your integration. The value is a JSON object with up to three fields: `decision_origin` (required, exactly `autonomous` or `human_mediated`, case-sensitive), `integration_name` (optional string naming your integration, e.g. `my-trading-bot`), and `version` (optional string identifying your integration's version). Any other key is dropped, never rejected. The raw value must be at most 1024 bytes of printable US-ASCII (`0x20`-`0x7E`), so send non-ASCII text as JSON `\u` escapes; `integration_name` and `version` are each limited to 256 UTF-16 code units and may not contain control characters, U+2028, U+2029, or U+FFFD. Send the header once: repeated header lines are joined with `, ` and the joined string is what gets parsed, so two complete objects fail as invalid JSON while a single object split across two lines still parses. The header is analytics-only and never affects the request: omitting it, sending it, or sending a value that fails these rules never changes the response status, body, or swap behavior. A value that fails to parse is dropped and reported by the `x-agent-info-status` response header. Never put a user ID, wallet address, email, session token, or API key in these fields.

Sample response

Run a request to see the actual response. Published samples are in Examples.

Response result

Sellers

SellerPricingRequests · 30dPerformanceAccess
Uniswap Create swap EIP 5792 calldata · POST · View API reference
$0 / call—Select to load statistics
—successP50—
Current
Uniswap Create swap EIP 7702 calldata · POST · View API reference
$0 / call0
—successP50—
Selected implementation traffic · 11/3/2026 – 12/3/2026 (UTC)
Selected pricing · uniswapUSD / call
Unit price
$0

Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 6. Price update time: not supplied.

calls

Total $0

API

Method
POST
Endpoint
https://api.openany.si/v1/agent-apis/uniswap/v1/swap_7702
Content type
application/json
Authentication
Authorization: Bearer $OPENANY_API_KEY
View request and response examples

Input parameters

Fields in this listing; additional options and input encoding can vary by provider.

ParameterLocationTypeRequiredDescription
quoteJSON request bodybodyobjectYes
Nested fields and variants

object

Nested fields and variants
body.quote.aggregatedOutputs array · Optional

Parent object: body.quote

Nested fields and variants

body.quote.aggregatedOutputs[] · Array item · object

Nested fields and variants
body.quote.aggregatedOutputs[].amount string · Optional

Parent object: body.quote.aggregatedOutputs[]

pattern: ^[0-9]+$

body.quote.aggregatedOutputs[].bps number · Optional

Parent object: body.quote.aggregatedOutputs[]

body.quote.aggregatedOutputs[].fee string · Optional

Parent object: body.quote.aggregatedOutputs[]

enum: "INTEGRATOR"

body.quote.aggregatedOutputs[].minAmount string · Optional

Parent object: body.quote.aggregatedOutputs[]

body.quote.aggregatedOutputs[].recipient string · Optional

Parent object: body.quote.aggregatedOutputs[]

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.aggregatedOutputs[].token string · Optional

Parent object: body.quote.aggregatedOutputs[]

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.blockNumber string · Optional

Parent object: body.quote

body.quote.chainId number · Required

Parent object: body.quote

enum: 1, 10, 56, 130, 137, 143, 196, 324, 480, 1868, 4217, 4326, 4663, 5042, 8453, 10143, 42161, 42220, 43114, 57073, 59144, 81457, 7777777, 1301, 84532, 11155111

body.quote.gasFee string · Optional

Parent object: body.quote

body.quote.gasFeeQuote string · Optional

Parent object: body.quote

body.quote.gasFeeUSD string · Optional

Parent object: body.quote

body.quote.gasPrice string · Optional

Parent object: body.quote

body.quote.gasUseEstimate string · Optional

Parent object: body.quote

body.quote.input object · Required

Parent object: body.quote

Nested fields and variants
body.quote.input.amount string · Required

Parent object: body.quote.input

pattern: ^[0-9]+$

body.quote.input.maximumAmount string · Optional

Parent object: body.quote.input

pattern: ^[0-9]+$

body.quote.input.token string · Required

Parent object: body.quote.input

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.maxFeePerGas string · Optional

Parent object: body.quote

body.quote.maxPriorityFeePerGas string · Optional

Parent object: body.quote

body.quote.output object · Required

Parent object: body.quote

Nested fields and variants
body.quote.output.amount string · Required

Parent object: body.quote.output

pattern: ^[0-9]+$

body.quote.output.minimumAmount string · Optional

Parent object: body.quote.output

pattern: ^[0-9]+$

body.quote.output.recipient string · Optional

Parent object: body.quote.output

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.output.token string · Required

Parent object: body.quote.output

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.priceDifference number · Optional

Parent object: body.quote

body.quote.priceImpact number · Optional

Parent object: body.quote

body.quote.quoteId string · Optional

Parent object: body.quote

body.quote.route array · Optional

Parent object: body.quote

Nested fields and variants

body.quote.route[] · Array item · array

Nested fields and variants

body.quote.route[][] · Array item · object

Nested fields and variants

object

Nested fields and variants
body.quote.route[][].address string · Optional

Parent object: body.quote.route[][]

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.route[][].amountIn string · Optional

Parent object: body.quote.route[][]

pattern: ^[0-9]+$

body.quote.route[][].amountOut string · Optional

Parent object: body.quote.route[][]

pattern: ^[0-9]+$

body.quote.route[][].reserve0 object · Optional

Parent object: body.quote.route[][]

Nested fields and variants
body.quote.route[][].reserve0.quotient string · Optional

Parent object: body.quote.route[][].reserve0

body.quote.route[][].reserve0.token object · Optional

Parent object: body.quote.route[][].reserve0

Nested fields and variants
body.quote.route[][].reserve0.token.address string · Optional

Parent object: body.quote.route[][].reserve0.token

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.route[][].reserve0.token.buyFeeBps string · Optional

Parent object: body.quote.route[][].reserve0.token

body.quote.route[][].reserve0.token.chainId number · Optional

Parent object: body.quote.route[][].reserve0.token

enum: 1, 10, 56, 130, 137, 143, 196, 324, 480, 1868, 4217, 4326, 4663, 5042, 8453, 10143, 42161, 42220, 43114, 57073, 59144, 81457, 7777777, 1301, 84532, 11155111

body.quote.route[][].reserve0.token.decimals string · Optional

Parent object: body.quote.route[][].reserve0.token

body.quote.route[][].reserve0.token.sellFeeBps string · Optional

Parent object: body.quote.route[][].reserve0.token

body.quote.route[][].reserve0.token.symbol string · Optional

Parent object: body.quote.route[][].reserve0.token

body.quote.route[][].reserve1 object · Optional

Parent object: body.quote.route[][]

Nested fields and variants
body.quote.route[][].reserve1.quotient string · Optional

Parent object: body.quote.route[][].reserve1

body.quote.route[][].reserve1.token object · Optional

Parent object: body.quote.route[][].reserve1

Nested fields and variants
body.quote.route[][].reserve1.token.address string · Optional

Parent object: body.quote.route[][].reserve1.token

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.route[][].reserve1.token.buyFeeBps string · Optional

Parent object: body.quote.route[][].reserve1.token

body.quote.route[][].reserve1.token.chainId number · Optional

Parent object: body.quote.route[][].reserve1.token

enum: 1, 10, 56, 130, 137, 143, 196, 324, 480, 1868, 4217, 4326, 4663, 5042, 8453, 10143, 42161, 42220, 43114, 57073, 59144, 81457, 7777777, 1301, 84532, 11155111

body.quote.route[][].reserve1.token.decimals string · Optional

Parent object: body.quote.route[][].reserve1.token

body.quote.route[][].reserve1.token.sellFeeBps string · Optional

Parent object: body.quote.route[][].reserve1.token

body.quote.route[][].reserve1.token.symbol string · Optional

Parent object: body.quote.route[][].reserve1.token

body.quote.route[][].tokenIn object · Optional

Parent object: body.quote.route[][]

Nested fields and variants
body.quote.route[][].tokenIn.address string · Optional

Parent object: body.quote.route[][].tokenIn

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.route[][].tokenIn.buyFeeBps string · Optional

Parent object: body.quote.route[][].tokenIn

body.quote.route[][].tokenIn.chainId number · Optional

Parent object: body.quote.route[][].tokenIn

enum: 1, 10, 56, 130, 137, 143, 196, 324, 480, 1868, 4217, 4326, 4663, 5042, 8453, 10143, 42161, 42220, 43114, 57073, 59144, 81457, 7777777, 1301, 84532, 11155111

body.quote.route[][].tokenIn.decimals string · Optional

Parent object: body.quote.route[][].tokenIn

body.quote.route[][].tokenIn.sellFeeBps string · Optional

Parent object: body.quote.route[][].tokenIn

body.quote.route[][].tokenIn.symbol string · Optional

Parent object: body.quote.route[][].tokenIn

body.quote.route[][].tokenOut object · Optional

Parent object: body.quote.route[][]

Nested fields and variants
body.quote.route[][].tokenOut.address string · Optional

Parent object: body.quote.route[][].tokenOut

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.route[][].tokenOut.buyFeeBps string · Optional

Parent object: body.quote.route[][].tokenOut

body.quote.route[][].tokenOut.chainId number · Optional

Parent object: body.quote.route[][].tokenOut

enum: 1, 10, 56, 130, 137, 143, 196, 324, 480, 1868, 4217, 4326, 4663, 5042, 8453, 10143, 42161, 42220, 43114, 57073, 59144, 81457, 7777777, 1301, 84532, 11155111

body.quote.route[][].tokenOut.decimals string · Optional

Parent object: body.quote.route[][].tokenOut

body.quote.route[][].tokenOut.sellFeeBps string · Optional

Parent object: body.quote.route[][].tokenOut

body.quote.route[][].tokenOut.symbol string · Optional

Parent object: body.quote.route[][].tokenOut

body.quote.route[][].type string · Optional

Parent object: body.quote.route[][]

object

Nested fields and variants
body.quote.route[][].address string · Optional

Parent object: body.quote.route[][]

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.route[][].amountIn string · Optional

Parent object: body.quote.route[][]

pattern: ^[0-9]+$

body.quote.route[][].amountOut string · Optional

Parent object: body.quote.route[][]

pattern: ^[0-9]+$

body.quote.route[][].fee string · Optional

Parent object: body.quote.route[][]

body.quote.route[][].liquidity string · Optional

Parent object: body.quote.route[][]

body.quote.route[][].sqrtRatioX96 string · Optional

Parent object: body.quote.route[][]

body.quote.route[][].tickCurrent string · Optional

Parent object: body.quote.route[][]

body.quote.route[][].tokenIn object · Optional

Parent object: body.quote.route[][]

Nested fields and variants
body.quote.route[][].tokenIn.address string · Optional

Parent object: body.quote.route[][].tokenIn

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.route[][].tokenIn.buyFeeBps string · Optional

Parent object: body.quote.route[][].tokenIn

body.quote.route[][].tokenIn.chainId number · Optional

Parent object: body.quote.route[][].tokenIn

enum: 1, 10, 56, 130, 137, 143, 196, 324, 480, 1868, 4217, 4326, 4663, 5042, 8453, 10143, 42161, 42220, 43114, 57073, 59144, 81457, 7777777, 1301, 84532, 11155111

body.quote.route[][].tokenIn.decimals string · Optional

Parent object: body.quote.route[][].tokenIn

body.quote.route[][].tokenIn.sellFeeBps string · Optional

Parent object: body.quote.route[][].tokenIn

body.quote.route[][].tokenIn.symbol string · Optional

Parent object: body.quote.route[][].tokenIn

body.quote.route[][].tokenOut object · Optional

Parent object: body.quote.route[][]

Nested fields and variants
body.quote.route[][].tokenOut.address string · Optional

Parent object: body.quote.route[][].tokenOut

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.route[][].tokenOut.buyFeeBps string · Optional

Parent object: body.quote.route[][].tokenOut

body.quote.route[][].tokenOut.chainId number · Optional

Parent object: body.quote.route[][].tokenOut

enum: 1, 10, 56, 130, 137, 143, 196, 324, 480, 1868, 4217, 4326, 4663, 5042, 8453, 10143, 42161, 42220, 43114, 57073, 59144, 81457, 7777777, 1301, 84532, 11155111

body.quote.route[][].tokenOut.decimals string · Optional

Parent object: body.quote.route[][].tokenOut

body.quote.route[][].tokenOut.sellFeeBps string · Optional

Parent object: body.quote.route[][].tokenOut

body.quote.route[][].tokenOut.symbol string · Optional

Parent object: body.quote.route[][].tokenOut

body.quote.route[][].type string · Optional

Parent object: body.quote.route[][]

object

Nested fields and variants
body.quote.route[][].address string · Required

Parent object: body.quote.route[][]

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.route[][].amountIn string · Optional

Parent object: body.quote.route[][]

pattern: ^[0-9]+$

body.quote.route[][].amountOut string · Optional

Parent object: body.quote.route[][]

pattern: ^[0-9]+$

body.quote.route[][].fee string · Required

Parent object: body.quote.route[][]

body.quote.route[][].hooks string · Required

Parent object: body.quote.route[][]

body.quote.route[][].liquidity string · Required

Parent object: body.quote.route[][]

body.quote.route[][].sqrtRatioX96 string · Required

Parent object: body.quote.route[][]

body.quote.route[][].tickCurrent string · Required

Parent object: body.quote.route[][]

body.quote.route[][].tickSpacing number · Required

Parent object: body.quote.route[][]

body.quote.route[][].tokenIn object · Required

Parent object: body.quote.route[][]

Nested fields and variants
body.quote.route[][].tokenIn.address string · Optional

Parent object: body.quote.route[][].tokenIn

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.route[][].tokenIn.buyFeeBps string · Optional

Parent object: body.quote.route[][].tokenIn

body.quote.route[][].tokenIn.chainId number · Optional

Parent object: body.quote.route[][].tokenIn

enum: 1, 10, 56, 130, 137, 143, 196, 324, 480, 1868, 4217, 4326, 4663, 5042, 8453, 10143, 42161, 42220, 43114, 57073, 59144, 81457, 7777777, 1301, 84532, 11155111

body.quote.route[][].tokenIn.decimals string · Optional

Parent object: body.quote.route[][].tokenIn

body.quote.route[][].tokenIn.sellFeeBps string · Optional

Parent object: body.quote.route[][].tokenIn

body.quote.route[][].tokenIn.symbol string · Optional

Parent object: body.quote.route[][].tokenIn

body.quote.route[][].tokenOut object · Required

Parent object: body.quote.route[][]

Nested fields and variants
body.quote.route[][].tokenOut.address string · Optional

Parent object: body.quote.route[][].tokenOut

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.route[][].tokenOut.buyFeeBps string · Optional

Parent object: body.quote.route[][].tokenOut

body.quote.route[][].tokenOut.chainId number · Optional

Parent object: body.quote.route[][].tokenOut

enum: 1, 10, 56, 130, 137, 143, 196, 324, 480, 1868, 4217, 4326, 4663, 5042, 8453, 10143, 42161, 42220, 43114, 57073, 59144, 81457, 7777777, 1301, 84532, 11155111

body.quote.route[][].tokenOut.decimals string · Optional

Parent object: body.quote.route[][].tokenOut

body.quote.route[][].tokenOut.sellFeeBps string · Optional

Parent object: body.quote.route[][].tokenOut

body.quote.route[][].tokenOut.symbol string · Optional

Parent object: body.quote.route[][].tokenOut

body.quote.route[][].type string · Required

Parent object: body.quote.route[][]

body.quote.routeCandidates array · Optional

Parent object: body.quote

Nested fields and variants

body.quote.routeCandidates[] · Array item · object

Nested fields and variants
body.quote.routeCandidates[].quoteAmount string · Required

Parent object: body.quote.routeCandidates[]

body.quote.routeCandidates[].quoteGasAdjusted string · Optional

Parent object: body.quote.routeCandidates[]

body.quote.routeCandidates[].routeString string · Required

Parent object: body.quote.routeCandidates[]

body.quote.routeString string · Optional

Parent object: body.quote

body.quote.slippage number · Optional

Parent object: body.quote

minimum: 0 · maximum: 100 · pattern: ^[0-9]{0,3}\.?[0-9]{0,2}$

body.quote.swapSteps array · Optional

Parent object: body.quote

body.quote.swapper string · Required

Parent object: body.quote

pattern: ^0x[0-9a-fA-F]{40}$

body.quote.tradeType string · Required

Parent object: body.quote

enum: "EXACT_INPUT", "EXACT_OUTPUT"

body.quote.txFailureReasons array · Optional

Parent object: body.quote

Nested fields and variants

body.quote.txFailureReasons[] · Array item · string

object

Nested fields and variants
body.quote.chainId number · Required

Parent object: body.quote

enum: 1, 10, 56, 130, 137, 143, 196, 324, 480, 1868, 4217, 4326, 4663, 5042, 8453, 10143, 42161, 42220, 43114, 57073, 59144, 81457, 7777777, 1301, 84532, 11155111

body.quote.gasFee string · Optional

Parent object: body.quote

body.quote.gasFeeQuote string · Optional

Parent object: body.quote

body.quote.gasFeeUSD string · Optional

Parent object: body.quote

body.quote.gasPrice string · Optional

Parent object: body.quote

body.quote.gasUseEstimate string · Optional

Parent object: body.quote

body.quote.input object · Required

Parent object: body.quote

Nested fields and variants
body.quote.input.amount string · Required

Parent object: body.quote.input

pattern: ^[0-9]+$

body.quote.input.maximumAmount string · Optional

Parent object: body.quote.input

pattern: ^[0-9]+$

body.quote.input.token string · Required

Parent object: body.quote.input

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.maxFeePerGas string · Optional

Parent object: body.quote

body.quote.maxPriorityFeePerGas string · Optional

Parent object: body.quote

body.quote.output object · Required

Parent object: body.quote

Nested fields and variants
body.quote.output.amount string · Required

Parent object: body.quote.output

pattern: ^[0-9]+$

body.quote.output.minimumAmount string · Optional

Parent object: body.quote.output

pattern: ^[0-9]+$

body.quote.output.recipient string · Optional

Parent object: body.quote.output

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.output.token string · Required

Parent object: body.quote.output

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.priceDifference number · Optional

Parent object: body.quote

body.quote.swapper string · Required

Parent object: body.quote

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.tradeType string · Required

Parent object: body.quote

enum: "EXACT_INPUT", "EXACT_OUTPUT"

object

Nested fields and variants
body.quote.chainId number · Required

Parent object: body.quote

enum: 1, 10, 56, 130, 137, 143, 196, 324, 480, 1868, 4217, 4326, 4663, 5042, 8453, 10143, 42161, 42220, 43114, 57073, 59144, 81457, 7777777, 1301, 84532, 11155111

body.quote.destinationChainId number · Optional

Parent object: body.quote

enum: 1, 10, 56, 130, 137, 143, 196, 324, 480, 1868, 4217, 4326, 4663, 5042, 8453, 10143, 42161, 42220, 43114, 57073, 59144, 81457, 7777777, 1301, 84532, 11155111

body.quote.estimatedFillTimeMs number · Optional

Parent object: body.quote

body.quote.exclusiveRelayer string · Optional

Parent object: body.quote

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.exclusivityDeadline number · Optional

Parent object: body.quote

body.quote.fillDeadline number · Optional

Parent object: body.quote

body.quote.gasFee string · Optional

Parent object: body.quote

body.quote.gasFeeUSD string · Optional

Parent object: body.quote

body.quote.gasPrice string · Optional

Parent object: body.quote

body.quote.gasUseEstimate string · Optional

Parent object: body.quote

body.quote.input object · Required

Parent object: body.quote

Nested fields and variants
body.quote.input.amount string · Required

Parent object: body.quote.input

pattern: ^[0-9]+$

body.quote.input.maximumAmount string · Optional

Parent object: body.quote.input

pattern: ^[0-9]+$

body.quote.input.token string · Required

Parent object: body.quote.input

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.maxFeePerGas string · Optional

Parent object: body.quote

body.quote.maxPriorityFeePerGas string · Optional

Parent object: body.quote

body.quote.output object · Required

Parent object: body.quote

Nested fields and variants
body.quote.output.amount string · Required

Parent object: body.quote.output

pattern: ^[0-9]+$

body.quote.output.minimumAmount string · Optional

Parent object: body.quote.output

pattern: ^[0-9]+$

body.quote.output.recipient string · Optional

Parent object: body.quote.output

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.output.token string · Required

Parent object: body.quote.output

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.priceDifference number · Optional

Parent object: body.quote

body.quote.quoteId string · Optional

Parent object: body.quote

body.quote.quoteTimestamp number · Optional

Parent object: body.quote

body.quote.swapper string · Required

Parent object: body.quote

pattern: ^(0x)?[0-9a-fA-F]{40}$

body.quote.tradeType string · Required

Parent object: body.quote

enum: "EXACT_INPUT", "EXACT_OUTPUT"

x-universal-router-versionRequest headersheadersstringNo

The version of the Universal Router to use for the swap journey. *MUST* be consistent throughout the API calls.

enum: "2.0", "2.1.1", "2.1.2", "2.2.0"

x-erc20eth-enabledRequest headersheadersbooleanNo

Enable native ETH input support for UniswapX via ERC20-ETH (EIP-7914). When set to true and `tokenIn` is the native currency address (e.g. `0x0000000000000000000000000000000000000000`), the API may return UniswapX routes that spend native ETH for supported wallets.

x-agent-infoRequest headersheadersstringNo

Optional attribution hint for AI-agent traffic; send it if an AI agent built or operates your integration. The value is a JSON object with up to three fields: `decision_origin` (required, exactly `autonomous` or `human_mediated`, case-sensitive), `integration_name` (optional string naming your integration, e.g. `my-trading-bot`), and `version` (optional string identifying your integration's version). Any other key is dropped, never rejected. The raw value must be at most 1024 bytes of printable US-ASCII (`0x20`-`0x7E`), so send non-ASCII text as JSON `\u` escapes; `integration_name` and `version` are each limited to 256 UTF-16 code units and may not contain control characters, U+2028, U+2029, or U+FFFD. Send the header once: repeated header lines are joined with `, ` and the joined string is what gets parsed, so two complete objects fail as invalid JSON while a single object split across two lines still parses. The header is analytics-only and never affects the request: omitting it, sending it, or sending a value that fails these rules never changes the response status, body, or swap behavior. A value that fails to parse is dropped and reported by the `x-agent-info-status` response header. Never put a user ID, wallet address, email, session token, or API key in these fields.

maxLength: 1024

deadlineJSON request bodybodynumberNo
includeGasInfoJSON request bodybodybooleanNo
permitDataJSON request bodybodyobject | nullNo
Nested fields and variants
body.permitData.domain object · Optional

Parent object: body.permitData

body.permitData.types object · Optional

Parent object: body.permitData

body.permitData.values object · Optional

Parent object: body.permitData

simulateTransactionJSON request bodybodybooleanNo
smartContractDelegationAddressJSON request bodybodystringNo

pattern: ^0x[0-9a-fA-F]{40}$

urgencyJSON request bodybodystring | objectNo
Nested fields and variants

object

Nested fields and variants
body.urgency.level string · Required

Parent object: body.urgency

enum: "normal", "fast", "urgent"

body.urgency.overrides object · Optional

Parent object: body.urgency

Nested fields and variants
body.urgency.overrides.gasLimit string · Optional

Parent object: body.urgency.overrides

body.urgency.overrides.maxFeePerGas string · Optional

Parent object: body.urgency.overrides

body.urgency.overrides.maxPriorityFeePerGas string · Optional

Parent object: body.urgency.overrides

Required markers inside a nested object or variant apply when that object or variant is used.

Response structure

Inferred from examples
  • gasEstimatesunknown[]
  • gasFeestring
  • requestIdstring
  • swapobject
    • chainIdinteger
    • datastring
    • fromstring
    • gasLimitstring
    • maxFeePerGasstring
    • maxPriorityFeePerGasstring
    • tostring
    • valuestring

Agent integration

Copy the resource contract without sharing an API key.

Download MDView API Markdown

Error handling

StatusNext step
400Check the offering and request fields.
401 / 403Verify your credentials and access permissions.
402Inspect the selected access mode and returned payment requirements.
429Respect the returned rate limit and retry guidance.
5xxInspect the error and usage record before retrying a paid operation.

Examples

Recorded success 2026-10-30 (historical)

Published documentation example. Verify the actual response after an approved call.

  1. Prepare your environment

    Use a terminal with cURL installed.

    Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.

    Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.

    Terminal · macOS / Linux
    printf 'OpenAny API key: '
    read -r -s OPENANY_API_KEY
    export OPENANY_API_KEY
    printf '\n'
  2. Run the request

    Paste the complete command below into your terminal.

    Values to replace before running 4

    Review these request fields before running. Keep the published provider and request method unchanged.

    x-universal-router-version
    The version of the Universal Router to use for the swap journey. *MUST* be consistent throughout the API calls.
    x-erc20eth-enabled
    Enable native ETH input support for UniswapX via ERC20-ETH (EIP-7914). When set to true and `tokenIn` is the native currency address (e.g. `0x0000000000000000000000000000000000000000`), the API may return UniswapX routes that spend native ETH for supported wallets.
    x-agent-info
    Optional attribution hint for AI-agent traffic; send it if an AI agent built or operates your integration. The value is a JSON object with up to three fields: `decision_origin` (required, exactly `autonomous` or `human_mediated`, case-sensitive), `integration_name` (optional string naming your integration, e.g. `my-trading-bot`), and `version` (optional string identifying your integration's version). Any other key is dropped, never rejected. The raw value must be at most 1024 bytes of printable US-ASCII (`0x20`-`0x7E`), so send non-ASCII text as JSON `\u` escapes; `integration_name` and `version` are each limited to 256 UTF-16 code units and may not contain control characters, U+2028, U+2029, or U+FFFD. Send the header once: repeated header lines are joined with `, ` and the joined string is what gets parsed, so two complete objects fail as invalid JSON while a single object split across two lines still parses. The header is analytics-only and never affects the request: omitting it, sending it, or sending a value that fails these rules never changes the response status, body, or swap behavior. A value that fails to parse is dropped and reported by the `x-agent-info-status` response header. Never put a user ID, wallet address, email, session token, or API key in these fields.
    body
    Complete public Uniswap request body. Internal fields are prohibited. Source-only annotations are kept in the raw OpenAPI snapshot.
    Terminal · cURL
    curl \
      'https://api.openany.si/v1/agent-apis/uniswap/v1/swap_7702' \
      -X POST \
      -H "Authorization: Bearer $OPENANY_API_KEY" \
      -H 'Content-Type: application/json' \
      --data-raw '{
      "quote": {
        "chainId": 1,
        "gasFee": "537917653750000",
        "gasFeeQuote": "537917653750000",
        "gasUseEstimate": "250000",
        "input": {
          "amount": "1",
          "maximumAmount": "1",
          "token": "0x0000000000000000000000000000000000000000"
        },
        "maxFeePerGas": "2151670615",
        "maxPriorityFeePerGas": "150000000",
        "output": {
          "amount": "1",
          "minimumAmount": "1",
          "recipient": "0x1111111111111111111111111111111111111111",
          "token": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
        },
        "priceDifference": 0,
        "swapper": "0x1111111111111111111111111111111111111111",
        "tradeType": "EXACT_INPUT"
      },
      "simulateTransaction": false,
      "smartContractDelegationAddress": "0x000000005c84F8Fd50b21CAC312528A64437030e"
    }'
  3. Check the response

    Sample response · Documented HTTP 200

    Sample response
    {
      "gasEstimates": [],
      "gasFee": "537917653750000",
      "requestId": "cc7563f6-fce4-47a3-9879-3e1ef741f573",
      "swap": {
        "chainId": 1,
        "data": "0x99e1d01600000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000ed0e30db0756e69780000aa54552d000000000000000000000000000000000000",
        "from": "0x1111111111111111111111111111111111111111",
        "gasLimit": "250000",
        "maxFeePerGas": "2151670615",
        "maxPriorityFeePerGas": "150000000",
        "to": "0x1111111111111111111111111111111111111111",
        "value": "0x1"
      }
    }

Common questions

Which inputs identify this request?

Provide quote in body (documented JSON type). Keep identifiers and URLs in the formats documented for this implementation.

Which values can I use for x-universal-router-version?

The selected schema accepts 2.0, 2.1.1, 2.1.2, 2.2.0. Keep the documented string type and exact spelling for this input.

How should I structure the JSON body?

Send the body according to its root JSON schema. Do not add a second body wrapper around the documented properties, and preserve the declared types of nested values.

How should I map the returned fields?

Use the documented response paths with their returned types. Keep null, empty collections, false and zero distinct, and retain the identifiers needed to match results to the request.

Which API key should I use?

Use your OpenAny API key as Bearer authentication on the documented OpenAny route.

Where can I check the current request price?

Check the pricing area for the selected API implementation. Follow its billing unit, quantity and any request-dependent rules before sending the request.

Use Uniswap Swap Calldata Preparation API with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.