Uniswap API integration (Finance, Developer Tools). Imported from open-connector.
https://trade-api.gateway.uniswap.org/v1/quote
| Param | Type | Required | Description |
|---|---|---|---|
| type | string | required | How Uniswap interprets the requested amount. |
| amount | string | required | The input or output amount in token base units. |
| tokenInChainId | number | required | The blockchain chain ID supported by the Uniswap Trading API. |
| tokenOutChainId | number | required | The blockchain chain ID supported by the Uniswap Trading API. |
| tokenIn | string | required | The input token contract address. |
| tokenOut | string | required | The output token contract address. |
| swapper | string | required | The wallet address that will submit the transaction. |
| recipient | string | optional | The wallet address that should receive the output token. |
| slippageTolerance | number | optional | The manual slippage tolerance percentage. |
| autoSlippage | string | optional | The automatic slippage strategy supported by the public Uniswap API. |
| routingPreference | string | optional | The quote routing preference for Uniswap route selection. |
| protocols | array | optional | The protocols Uniswap may use for routing. |
| urgency | string | optional | The urgency mode used for approval or swap pricing. |
| permitAmount | string | optional | The permit allowance mode included in a quote response when Permit2 is enabled. |
| spreadOptimization | string | optional | The UniswapX spread optimization strategy when applicable. |
| generatePermitAsTransaction | boolean | optional | Whether Permit2 should be generated as an onchain transaction instead of a sign… |
| enableUniversalRouter | boolean | optional | Whether to send the public x-universal-router-version header as version 2.0. |
| enablePermit2 | boolean | optional | Whether Permit2 should stay enabled. Set false to send x-permit2-disabled: true. |
/check_approval
| Param | Type | Required | Description |
|---|---|---|---|
| walletAddress | string | required | The wallet address that would send the token. |
| token | string | required | The token contract address to approve. |
| amount | string | required | The token amount that must be spendable. |
| chainId | number | required | The blockchain chain ID supported by the Uniswap Trading API. |
| urgency | string | optional | The urgency mode used for approval or swap pricing. |
| includeGasInfo | boolean | optional | Whether the gas-fee fields should be requested from Uniswap. |
| tokenOut | string | optional | The output token address when provided for routing context. |
| tokenOutChainId | number | optional | The blockchain chain ID supported by the Uniswap Trading API. |
| enablePermit2 | boolean | optional | Whether Permit2 should stay enabled. Set false to send x-permit2-disabled: true. |
/swap
| Param | Type | Required | Description |
|---|---|---|---|
| quote | object | required | The prior Uniswap quote object to convert into swap calldata. |
| signature | string | optional | The signed Permit2 signature when one is required. |
| permitData | object | optional | The Permit2 payload returned by Uniswap when applicable. |
| refreshGasPrice | boolean | optional | Whether Uniswap should refresh gas pricing. |
| simulateTransaction | boolean | optional | Whether Uniswap should simulate the transaction. |
| safetyMode | string | optional | The swap safety mode accepted by the /swap endpoint. |
| deadline | string | optional | The swap deadline timestamp in seconds. |
| urgency | string | optional | The urgency mode used for approval or swap pricing. |
| enableUniversalRouter | boolean | optional | Whether to send the public x-universal-router-version header as version 2.0. |
| enablePermit2 | boolean | optional | Whether Permit2 should stay enabled. Set false to send x-permit2-disabled: true. |