LLMs.txt: agent-readable Markdown index of this site at /llms.txt
GETGet an execution plan

Get an execution plan

Retrieves an existing execution plan by its ID. Returns the full plan with current status and all steps. If forceRefresh is set to true, the plan will be refreshed to check for any updates to step statuses. Note: Completed plans cannot be refreshed.

Authorization

x-api-keystringrequiredheader
Playground key
You're using a shared playground keyCreate a free account and get your own API keys from the dashboard.
Get your keys

Path Parameters

planIdstringrequired

The unique identifier of the plan to retrieve.

Query Parameters

forceRefreshboolean

Whether to force refresh the plan status. Defaults to false. Completed plans cannot be refreshed.

Response

Get plan successful.

requestIdstringrequired

A unique ID for the request.

planIdstringrequired

A unique identifier for this execution plan.

swapperstringrequired

The 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.

quoteIdstringrequired

A unique ID for the quote.

statusenumrequired

The 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[]required

The sequential steps that need to be executed to complete the plan.

currentStepIndexnumberrequired

The index of the current step that needs to be executed (0-based).

expectedOutputstringrequired

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 1x10^6 base units.) This value must be greater than 0.

gasFeestring

The total estimated gas cost of this transaction (eg. gasLimit multiplied by maxFeePerGas) in the base unit of the chain.

gasFeeQuotestring

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 quoted currency.

gasFeeUSDstring

The total estimated gas cost of this transaction (eg. gasLimit multiplied by maxFeePerGas) denominated in USDC.

gasUseEstimatestring

The maximum units of gas that will be consumed by this transaction.

timeEstimateMsnumber

Estimated 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.

hooksOptionsenum

The 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.

createdAtstring

Timestamp when the plan was created.

updatedAtstring

Timestamp when the plan was last updated.

completedAtstring

Timestamp when the plan completed.

lastUserActionAtstring

Timestamp of the last user action on this plan.

slippageTolerancenumber

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 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.

autoSlippageenum

The 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.