getCheckoutTransactionQuote
Fetches a conversion quote for a checkout transaction. The quote includes fee breakdowns and the signing payload needed for on-chain execution. CallattachCheckoutTransactionSource before requesting a quote to specify the source wallet and chain.
Usage
Parameters
| Parameter | Type | Description |
|---|---|---|
transactionId | string | The checkout transaction ID returned by createCheckoutTransaction. |
fromTokenAddress | string | The contract address of the token the user is paying with. |
fromChainId | string (optional) | Overrides the source chain ID recorded by attachCheckoutTransactionSource for this quote. The chain family (fromChainName) and source address (fromAddress) remain locked to the attached source — to switch chain families or wallets, call attachCheckoutTransactionSource again. |
slippage | number (optional) | Maximum allowed slippage as a decimal (e.g., 0.005 for 0.5%). |
Returns
Promise<CheckoutTransaction> - The updated transaction with quote data populated:
Examples
Display quote to user
With custom slippage
Quote against a different source chain on the same chain family
The attached source locks the chain family (e.g. EVM) and the source address, but you can request quotes against any chain in that family by passingfromChainId. This avoids re-calling attachCheckoutTransactionSource just to switch between, for example, Ethereum mainnet and Base.
Related
attachCheckoutTransactionSource- Attach a wallet source (call before getting a quote)submitCheckoutTransaction- Submit after reviewing the quote