Get an execution plan
Authorization
x-api-keystringrequiredheaderPath Parameters
planIdstringrequiredThe unique identifier of the plan to retrieve.
Query Parameters
forceRefreshbooleanWhether to force refresh the plan status. Defaults to false. Completed plans cannot be refreshed.
Response
Get plan successful.
requestIdstringrequiredA unique ID for the request.
planIdstringrequiredA unique identifier for this execution plan.
swapperstringrequiredThe wallet address which will be used to send the token.
recipientstringrequired(optional) The wallet address which will receive the output of the swap. If not provided, the output is returned to the swapper.
quoteIdstringrequiredA unique ID for the quote.
statusenumrequiredThe overall status of the plan execution. ACTIVE means the plan is ready to begin (all steps NOT_READY). AWAITING_ACTION means at least one step requires user action. IN_PROGRESS means at least one step is executing. COMPLETED means all steps have been successfully executed. FAILED means the plan cannot be completed.
stepsobject[]requiredThe sequential steps that need to be executed to complete the plan.
currentStepIndexnumberrequiredThe index of the current step that needs to be executed (0-based).
expectedOutputstringrequiredThe 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.
gasFeestringThe total estimated gas cost of this transaction (eg. gasLimit multiplied by maxFeePerGas) in the base unit of the chain.
gasFeeQuotestringThe 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 quoted currency.
gasFeeUSDstringThe total estimated gas cost of this transaction (eg. gasLimit multiplied by maxFeePerGas) denominated in USDC.
gasUseEstimatestringThe maximum units of gas that will be consumed by this transaction.
timeEstimateMsnumberEstimated time in milliseconds to complete the entire plan.
gasStrategiesobject[]Gas strategies used for the plan.
protocolsenum[]The protocols to use for the swap/order. If the protocols field is defined, then you can only set the routingPreference to BEST_PRICE. Note that the value UNISWAPX is deprecated and will be removed in a future release.
hooksOptionsenumThe hook options to use for V4 pool quotes. V4_HOOKS_INCLUSIVE will get quotes for V4 pools with or without hooks. V4_HOOKS_ONLY will only get quotes for V4 pools with hooks. V4_NO_HOOKS will only get quotes for V4 pools without hooks. Defaults to V4_HOOKS_INCLUSIVE if V4 is included in protocols and hookOptions is not set. This field is ignored if V4 is not passed in protocols.
createdAtstringTimestamp when the plan was created.
updatedAtstringTimestamp when the plan was last updated.
completedAtstringTimestamp when the plan completed.
lastUserActionAtstringTimestamp of the last user action on this plan.
slippageTolerancenumberThe 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 the price can change between the time the transaction is submitted and the time it is executed. The slippage tolerance is a percentage of the total value of the swap.
When submitting a quote, note that slippage tolerance works differently in UniswapX swaps where it does not set a limit on the Spread in an order. See here for more information.
Note that if the trade type is EXACT_INPUT, then the slippage is in terms of the output token. If the trade type is EXACT_OUTPUT, then the slippage is in terms of the input token.
When submitting a request, slippageTolerance may not be set when autoSlippage is defined. One of slippageTolerance or autoSlippage must be defined.
autoSlippageenumThe auto slippage strategy to employ. For Uniswap Protocols (v2, v3, v4) the auto slippage will be automatically calculated when this field is set to DEFAULT. Auto slippage cannot be calculated for UniswapX swaps.
Note that if the trade type is EXACT_INPUT, then the slippage is in terms of the output token. If the trade type is EXACT_OUTPUT, then the slippage is in terms of the input token.
When submitting a request, autoSlippage may not be set when slippageTolerance is defined. One of slippageTolerance or autoSlippage must be defined.
/plan/{planId}curl --request GET \
--url 'https://trade-api.gateway.uniswap.org/v1/plan/{planId}' \
--header 'x-api-key: <api-key>'{ "requestId": "<string>", "planId": "<string>", "swapper": "<string>", "recipient": "<string>", "quoteId": "<string>", "status": "<string>", "steps": [ { "stepIndex": "<number>", "method": "<string>", "payloadType": "<string>", "payload": {}, "status": "<string>", "proof": { "txHash": "<string>", "signature": "<string>", "orderId": "<string>" }, "tokenIn": "<string>", "tokenOut": "<string>", "tokenInChainId": "<number>", "tokenOutChainId": "<number>", "tokenInAmount": "<string>", "tokenOutAmount": "<string>", "swapper": "<string>", "recipient": "<string>", "stepType": "<string>", "gasUseEstimate": "<string>", "gasFeeUSD": "<string>", "gasFeeQuote": "<string>", "gasPrice": "<string>", "maxFeePerGas": "<string>", "maxPriorityFeePerGas": "<string>", "gasFee": "<string>", "routingStepKey": "<string>", "slippage": "<number>" } ], "currentStepIndex": "<number>", "expectedOutput": "<string>", "gasFee": "<string>", "gasFeeQuote": "<string>", "gasFeeUSD": "<string>", "gasUseEstimate": "<string>", "timeEstimateMs": "<number>", "gasStrategies": [ { "limitInflationFactor": "<number>", "priceInflationFactor": "<number>", "percentileThresholdFor1559Fee": "<number>", "thresholdToInflateLastBlockBaseFee": "<number>", "baseFeeMultiplier": "<number>", "baseFeeHistoryWindow": "<number>", "minPriorityFeeRatioOfBaseFee": "<number>", "minPriorityFeeGwei": "<number>", "maxPriorityFeeGwei": "<number>" } ], "protocols": [ "<string>" ], "hooksOptions": "<string>", "createdAt": "<string>", "updatedAt": "<string>", "completedAt": "<string>", "lastUserActionAt": "<string>", "slippageTolerance": "<number>", "autoSlippage": "<string>"}