How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Uniswap Swap API

The Swap API from Uniswap — 4 operation(s) for swap.

Uniswap Swap API is one of 14 APIs that Uniswap publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 6 JSON Schema definitions.

Tagged areas include Swap. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and 6 JSON Schemas.

This API exposes 4 operations across 4 paths, and defines 67 schemas. It is described by OpenAPI 3.0.0, at version 1.0.0.

Requests are made against a single base URL, https://trade-api.gateway.uniswap.org/v1.

4 operations 4 paths 67 schemas 1 GET3 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.0
API Version
1.0.0
Server
https://trade-api.gateway.uniswap.org/v1
Authentication
API Key
Resource Areas
1

Authentication & Security 1

Uniswap Swap API declares 1 security scheme for authenticating requests. An API key is passed in the header as x-api-key (apiKey). By default, every request must be authenticated.

Paths & Operations 4

Across 4 paths, the API surfaces 4 operations — 1 GET, 3 POST. Each is listed below with its method, path, parameters, and response codes.

Swap 4
POST
/swap
Create swap calldata
create_swap_transaction 2 params body → 200400401404429500504
GET
/swaps
Get swaps status
get_swaps 3 params → 200400404429500504
POST
/swap_5792
Create swap EIP 5792 calldata
create_swap_5792_transaction 1 param body → 200400401404429500504
POST
/swap_7702
Create swap EIP 7702 calldata
create_swap_7702_transaction 2 params body → 200400401404429500504

Schemas 67

The contract defines 67 schemas that model the data the API accepts and returns. The most detailed are ClassicQuote (23 properties), BridgeQuote (21 properties), WrapUnwrapQuote (12 properties), V4PoolInRoute (12 properties). Each schema is shown below with its type and property counts.

CreateSwap5792Response
object
5 properties 4 required
CreateSwap7702Request
object
7 properties 1 required
ClassicInput
object
2 properties
RequestId
string
A unique ID for the request.
Permit
object
the permit2 message object for the customer to sign to permit spending by the permit2 contract.
3 properties
gasFee
string
The total estimated gas cost of this transaction (eg. gasLimit multiplied by maxFeePerGas) in the base unit of the chain.
AggregatedOutput
object
An array of all outputs of the proposed transaction. This includes the swap as well as any fees collected by the API integrator. This does not include pool fee…
5 properties
portionBips
number
The portion of the swap that will be taken as a fee stated in basis points. Fractional basis points are supported with up to two decimal places (e.g. 87.5 for…
Routing
string
The routing for the proposed transaction.
sqrtRatioX96
string
The square root of the ratio of the token0 and token1 in the pool, as a Q64.64 number. For more information see the [Uniswap V3 Whitepaper](https://app.uniswap…
tokenSymbol
string
The symbol of the token.
receiverWalletAddress
string
The wallet address which will receive the token.
Err401
object
2 properties
contractAddress
string
The address of a contract which will be used to facilitate the swap.
WrapUnwrapQuote
object
12 properties
quoteId
string
A unique ID for the quote.
outputToken
string
The token which will be received, specified by its token address. For a list of supported tokens, see the [FAQ](https://api-docs.uniswap.org/guides/faqs).
maxPriorityFeePerGas
string
The maximum tip to the block builder. Adjusted based upon the urgency specified in the request.
SwapSafetyMode
string
Swap safety mode will automatically sweep the transaction for the native token and return it to the sender wallet address. This is to prevent accidental loss o…
CreateSwap7702Response
object
3 properties 2 required
GetSwapsResponse
object
2 properties 2 required
CreateSwap5792Request
object
4 properties 1 required
tokenAmount
string
The 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…
NullablePermit
object
the permit2 message object for the customer to sign to permit spending by the permit2 contract.
3 properties
deadline
number
The unix timestamp at which the order will be reverted if not filled.
bps
number
The portion of the swap stated in basis points. Fractional basis points are supported with up to two decimal places (e.g. 12.5).
Err500
object
2 properties
SwapStatus
string
liquidity
string
The amount of liquidity in the pool at a given tick. For more information see the [Uniswap V3 Whitepaper](https://app.uniswap.org/whitepaper-v3.pdf).
inputToken
string
The token which will be sent, specified by its token address. For a list of supported tokens, see the [FAQ](https://api-docs.uniswap.org/guides/faqs).
Err404
object
2 properties
V4PoolInRoute
object
12 properties 10 required
TradeType
string
The handling of the amount field. EXACTINPUT means the requester will send the specified amount of input tokens and get a quote with a variable quantity of out…
ClassicQuote
object
23 properties
TransactionFailureReason
string
portionAmount
string
The portion of the swap that will be taken as a fee in the base units of the token. The fee will be taken from the output token.
gasFeeUSD
string
The total estimated gas cost of this transaction (eg. gasLimit multiplied by maxFeePerGas) denominated in USDC.
minAmount
string
The minimum portion of the swap, stated in the base unit of the token, which will be output to the recipient.
TransactionRequest5792
object
7 properties 4 required
Err429
object
2 properties
bpsFee
string
A fee charged by the token specified in basis points. Field is not present if the token does not charge a fee.
tickCurrent
string
The current tick of the pool. For more information see the [Uniswap V3 Whitepaper](https://app.uniswap.org/whitepaper-v3.pdf).
tickSpacing
number
The width of ticks in this pool (e.g. the price range between two ticks) specified in basis points. For more information see the [Uniswap V3 Whitepaper](https:…
ChainId
number
The unique ID of the blockchain. For a list of supported chains see the [FAQ](https://api-docs.uniswap.org/guides/faqs).
gasFeeInCurrency
string
The total estimated gas cost of this transaction (eg. gasLimit multiplied by maxFeePerGas) in the quoted currency (e.g. output token) in the base units of the…
TokenInRoute
object
6 properties
BridgeQuote
object
21 properties
V2PoolInRoute
object
8 properties
Err400
object
2 properties
CreateSwapResponse
object
3 properties 2 required
gasPrice
string
The cost per unit of gas.
TransactionHash
string
The unique hash of the transaction.
V3PoolInRoute
object
10 properties
V2Reserve
object
The remaining reserve of this token in the pool.
2 properties
ClassicOutput
object
3 properties
senderWalletAddress
string
The wallet address which will be used to send the token.
poolFee
string
The fee of the pool in basis points.
Address
string
Err504
object
2 properties
CreateSwapRequest
object
The parameters signature and permitData should only be included if permitData was returned from /quote.
9 properties 1 required
TransactionRequest
object
9 properties 5 required
slippageTolerance
number
The slippage tolerance as a percentage up to a maximum of two decimal places. For Uniswap Protocols (v2, v3, v4), the slippage tolerance is the maximum amount…
UniversalRouterVersion
string
maxFeePerGas
string
The sum of the base fee and priority fee. Subtracting maxPriorityFeePerGas from this value will yield the base fee to be paid for this transaction.
gasLimit
string
The maximum units of gas that will be consumed by this transaction.
Urgency
string
The urgency impacts the estimated gas price of the transaction. The higher the urgency, the higher the gas price, and the faster the transaction is likely to b…
portionAmountReceiverAddress
string
The wallet address which will receive the fee.

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

uniswap-swap-api-openapi.yml Raw ↑

Other APIs Uniswap publishes across the network.

Uniswap Subgraph API
UniswapX API
Uniswap Approval API
Uniswap LimitOrderQuote API
Uniswap Liquidity API
Uniswap Order API
Uniswap Plan API
Uniswap Quote API
Uniswap Send API
Uniswap SwappableTokens API
Uniswap Wallet API
Uniswap WalletCheckDelegation API
Where this information came from

This is an independent, third-party profile of Uniswap Swap API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.