Actions
getPrice
Get a lightweight quote for a crosschain relay (bridge, swap, call, etc)
Parameters
Property | Description | Required |
---|---|---|
originChainId | The chain id to deposit funds on | ✅ |
destinationChainId | The chain id to execute the txs on | ✅ |
originCurrency | Address for a supported native currency or valid erc20 | ✅ |
destinationCurrency | Address for a supported native currency or valid erc20 | ✅ |
tradeType | Either EXACT_INPUT for quoting via an input amount, or EXPECTED_OUTPUT /EXACT_OUTPUT for quoting via an output amount. | ✅ |
amount | Amount in wei, in the supplied currency | ❌ |
user | The wallet address initiating the relay | ❌ |
recipient | A valid address to send the funds to, defaults to wallet address if not sepcified | ❌ |
txs | An array of either transaction objects (made up of a to, data and value properties) or viem request objects returned from viem’s simulateContract function | ❌ |
options | Additional options that map directly to the price API | ❌ |
Native Bridge Example
Cross-Chain Swap Example
Wrap/Unwrap Example
Send Example
The Price is a lightweight quote, excluding steps and calldata but it includes a preview of what the full quote might contain. Prices are subject to change once you get the quote so you should handle price changes accordingly.