LLMs.txt: agent-readable Markdown index of this site at /llms.txt

Troubleshooting

Troubleshoot common Uniswap API request, quoting, authentication, and rate limit errors in swapping integrations.

Common Issues

Headers

The API is specific about request header validation. In particular, ensure that your accept and content-type headers only include the value application/json. For a complete example of properly formatted request headers, see the authentication section of the Developer Dashboard.

If you're sending the optional X-Agent-Info attribution header and it isn't being picked up, check the response for an x-agent-info-status: malformed header. See Agent Attribution for the full set of rules that make the header malformed. A malformed X-Agent-Info never causes an error response; the request proceeds without attribution.

Rate limits

Most API keys have a default rate limit of 6 requests per second (RPS). If you exceed the rate limit supported by an API key you can expect to receive an HTTP 429 error. If you receive a 429 error, we recommend pausing all requests from your API key and then retrying your requests. If you require a higher rate limit than what your API key is currently provisioned for, please reach out to our team through the Help Center. For more information on rate limits, see the Developer Dashboard.

Error Code Troubleshooting

404 No quotes available

The most commonly encountered HTTP error is an HTTP 404 from the /quote endpoint. The errorCode field identifies the cause, and detail carries a human-readable explanation:

{
  "errorCode": "QuoteAmountTooLowError",
  "detail": "Order size is below the minimum quotable size for the requested protocols on this chain.",
  "requestId": "..."
}

errorCode is a stable enum. detail is free text and may be reworded without notice. New errorCode values may be added over time, so treat unrecognized values the same as you do ResourceNotFound.

errorCodeWhat it meansWhat to do
QuoteAmountTooLowErrorThe amount is below the minimum quotable size for the requested protocols — most commonly UniswapX minimums on L2s (see UniswapX Chain Support)Increase the amount, or widen protocols
NoRouteFoundErrorRouting completed and found no viable route for this pairVerify token addresses match the specified chain; do not retry unchanged
UnsupportedTokenErrorA requested token is not routable (unknown or not on this chain)Verify the token address belongs to the given chain (ex. USDC on Mainnet differs from Base)
UnsupportedChainErrorThe chain is not supported for this operationSee Supported Chains
UniswapXNotSupportedOnChainErrorA UniswapX protocol was requested on a chain it does not serveRemove the UniswapX protocol pin, or change chain
UpstreamTimeoutErrorA routing dependency timed out or failedRetry with exponential backoff — this is the only cause where an unchanged retry can succeed
ResourceNotFoundThe failure could not be classified (detail is "No quotes available")Retry cautiously; contact support with the requestId if persistent

A request that combines a bridge and a swap (different chains and different tokens) is not supported as a single quote and currently surfaces as ResourceNotFound. Request a bridge or a swap, not both — for bridgeable pairs see Supported Chains.

If an error persists after you apply the fix listed above, reach out to our team through the Help Center and include the requestId from the error response.

400 Request validation error

Request validation errors are returned when a request does not contain the minimum required set of fields or has other syntactical errors. Some examples are a required field is not populated (/quote requires type, amount, tokenInChainId, tokenOutChainId, tokenIn, tokenOut, and swapper), or an address is missing a character (eg. is 39 characters long instead of 40). These errors typically include a specific error message which describes the field which could not be interpreted.

400 Integrator fee errors

If something's off with your integratorFees, /quote returns a 400 with one of these errorCode values:

errorCodeWhat went wrongHow to fix it
IntegratorFeesTooManyEntriesErrorYou sent more than 4 fee entriesSend 4 or fewer
IntegratorFeeEntryExceedsMaxErrorOne entry is over 500 bipsBring that entry down to 500 or less
IntegratorFeesTotalExceedsMaxErrorThe entries add up to more than 500 bipsBring the total down to 500 or less
InvalidIntegratorFeesErrorSomething else is malformed: a repeated recipient, a zero or over-precise bips, or a sentinel address as a recipientCheck detail, it names the problem

Splitting fees across more than one entry also needs x-universal-router-version: 2.1.1 or higher. A lower version, or a chain that doesn't have 2.1.1 deployed yet, returns a 400.

Universal Router balance swap errors

A normal /quote can return a 200 without swapTransaction and leave it to /swap. A /quote or /swap with swapSource: "UNIVERSAL_ROUTER" doesn't do that: if we can't build the calldata, you get an error instead of a quote. A 400 means the request itself needs fixing. A 422 means the request was fine but we couldn't build a swap for it. Either way, detail tells you what happened.

StatusdetailWhat to do
400swapSource "UNIVERSAL_ROUTER" requires tokenInChainId to equal tokenOutChainIdQuote on the destination chain only
400swapSource "UNIVERSAL_ROUTER" requires an EXACT_INPUT tradeUse EXACT_INPUT
400autoSlippage is not supported with swapSource "UNIVERSAL_ROUTER"Send a slippageTolerance instead
400x-permit2-disabled is not supported with swapSource "UNIVERSAL_ROUTER"Drop the header; there's no permit in this flow
400recipient cannot be a Universal Router sentinel (address(1)/address(2)) or the zero addressPut the end user's address in swapper (or recipient)
400wrap/unwrap pairs cannot be balance swapped; deliver the wrapped token directlyHave your bridge deliver WETH
422permissioned tokens cannot be balance swappedNot supported in this mode
422no balance-swap route available for this pairCheck the pair and chain; retrying unchanged won't help
422the routed swap failed simulation; no balance-swap calldata is served for a known-failing routeThe swap reverted in simulation. Re-quote, or re-quote without swapSource to see txFailureReasons
422the routed path cannot be executed from the router balance; re-quote without swapSourceThe route spends raw ETH in a v4 pool. Re-quote without swapSource, or deliver WETH

Two simulation failures don't trigger the 422: TRANSFER_FROM_FAILED and SLIPPAGE_TOO_LOW. Those quotes still come back with calldata. The integration guide explains why.

401 Unauthorized error

All API requests must be authenticated through the inclusion of a valid API key in the header of the request. If you do not have an API key, you may create one through the Uniswap Developer Platform. 401 errors may also be returned if the request has malformed or missing required headers, or if headers contain unsupported values (see above). For more details on authentication requirements, see the Developer Dashboard.

For developer support, reach out to our team through the Help Center.