Overview
TheQuoteIntent endpoint allows you to request a quote for a cross-chain intent transaction. It provides comprehensive information about the transaction including gas fees, optimal routing, and price impact.
Use Cases
- Get a quote for swapping tokens across different chains
- Estimate fees before executing a cross-chain transaction
- Compare different routing options
- Calculate price impact and slippage
Request Parameters
Required Fields
- ownerAddress (string): The wallet address initiating the transaction
- originChainId (number): Source chain ID where the transaction originates
- originTokenAddress (string): Contract address of the source token
- destinationChainId (number): Target chain ID for the transaction
- destinationTokenAddress (string): Contract address of the destination token
- destinationToAddress (string): Recipient address on the destination chain
Optional Fields
- tradeType (TradeType): Either
EXACT_INPUTorEXACT_OUTPUT - destinationTokenAmount (number): Amount of destination tokens (only for EXACT_OUTPUT)
- originTokenAmount (number): Amount of origin tokens (only for EXACT_INPUT)
- destinationCallData (string): Custom calldata for contract interactions on destination chain
- destinationCallValue (string): Value to send with the destination call
- options (QuoteIntentRequestOptions):
- quoteProvider (QuoteProviderType): Preferred quote provider (
RELAY,CCTPV2, orLIFI) - slippageTolerance (number): Maximum acceptable slippage percentage
- trailsAddressOverrides (TrailsAddressOverrides): Custom Sequence wallet addresses
- quoteProvider (QuoteProviderType): Preferred quote provider (
Response
The response includes:- intent (Intent): Complete intent object with transaction details
- gasFeeOptions (GasFeeOptions): Available gas fee payment options
Intent Object Details
The intent object contains:- Unique intent ID
- Transaction status
- Deposit transaction details
- Cross-chain calls to execute
- Quote information (rates, slippage, price impact)
- Fee breakdown (gas fees, provider fees)
- Expiration timestamp
Example
Next Steps
After receiving a quote:- Review the quote details, fees, and estimated amounts
- Use
CommitIntentto commit the intent if the quote is acceptable
Authorizations
API Key for authenticating requests, get an access key at https://trails.build and request early access
Body
application/json
Represented as string on the server side
Available options:
EXACT_INPUT, EXACT_OUTPUT