Check swap approvals
npx skills add uniswap/uniswap-ai --skill swap-integrationFull swap flow integration for apps. Works with Claude Code, Cursor, and other AI coding tools.
Authorization
x-api-keystringrequiredheaderHeaders
x-permit2-disabledbooleandefault:falseDisables the Permit2 approval flow. When set to true, permitData is returned as null and the header is forwarded to the routing layer for correct gas simulation against the Proxy Universal Router contract. When false or omitted, the standard Permit2 approval flow is used. This header is intended for integrators whose infrastructure uses a direct approval-then-swap pattern without Permit2.
x-agent-infostringOptional 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
application/jsonwalletAddressstringrequiredThe wallet address which will be used to send the token.
tokenstringrequiredThe token which will be sent, specified by its token address. For a list of supported tokens, see the FAQ.
amountstringrequiredThe quantity of tokens denominated in the token's base units. (For example, for an ERC20 token one token is 1x10^18 base units. For one USDC token one token is 1x10^6 base units.) This value must be greater than 0.
chainIdenumrequireddefault:1The unique ID of the blockchain. For a list of supported chains see the FAQ.
includeGasInfobooleandefault:falseIf set to true, the response will include the estimated gas fee for the proposed transaction.
tokenOutstringThe token which will be received, specified by its token address. For a list of supported tokens, see the FAQ.
tokenOutChainIdenumdefault:1The unique ID of the blockchain. For a list of supported chains see the FAQ.
Response
Check approval successful.
requestIdstringrequiredA unique ID for the request.
approvalobjectrequiredcancelobjectrequiredgasFeestringThe total estimated gas cost of this transaction (eg. gasLimit multiplied by maxFeePerGas) in the base unit of the chain.
cancelGasFeestringThe total estimated gas cost of this transaction (eg. gasLimit multiplied by maxFeePerGas) in the base unit of the chain.
/check_approvalcurl --request POST \
--url 'https://trade-api.gateway.uniswap.org/v1/check_approval' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-permit2-disabled: false' \
--data '{
"walletAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1000000000",
"chainId": 1
}'{ "requestId": "<string>", "approval": { "to": "<string>", "from": "<string>", "data": "<string>", "value": "<string>", "gasLimit": "<string>", "chainId": "<number>", "maxFeePerGas": "<string>", "maxPriorityFeePerGas": "<string>", "gasPrice": "<string>" }, "cancel": { "to": "<string>", "from": "<string>", "data": "<string>", "value": "<string>", "gasLimit": "<string>", "chainId": "<number>", "maxFeePerGas": "<string>", "maxPriorityFeePerGas": "<string>", "gasPrice": "<string>" }, "gasFee": "<string>", "cancelGasFee": "<string>"}