POST /quoteIntent
Last updated
Last updated
This endpoint fetches detailed quote information about a trade with Haiku Intents. It provides insights into the proposed transaction, including resulting tokens and fees. This data is essential for populating UIs, understanding trade specifics, and ensuring all required allowances are provided for successful trade execution.
This API enables developers to gain a comprehensive preview of a proposed intent trade, ensuring all aspects of the transaction are understood and prepared for execution.
Developers and traders can use this API to:
Preview trade details: Understand the tokens, fees, and trade outcomes before executing a transaction.
Automate allowance handling: Programatically detect and prompt for required approvals, including Permit2 allowances.
Enhance UI experiences: Populate UIs with comprehensive trade information for users, ensuring clarity and transparency.
Base URL: https://api.haiku.trade/v1
Header
Body
slippage
number
Maximum allowed slippage (Must be in the range 0-0.01)
receiver
string
Address to receive the resulting tokens.
input_positions
object
Tokens provided for the swap with their respective amounts.
target_weights
object
Desired token weights after the swap (must sum to 1).
quoteId
string
Unique identifier for this quote
funds
array
List of tokens and amounts deducted for the trade.
fundfees
array
Fees charged for the trade, specified per token.
balances
array
Tokens and amounts that will be returned post-trade.
approvals
array
List of ERC-20 token approvals required for the transaction.
permit2Datas
object
Permit2 approval data if applicable.
isComplexBridge
bool
Flag representing if a post-bridge operation is required
destinationBridge
object
Post-bridge transaction data to sign if isComplexBridge
gas
object
Gas estimation data denominated in both gas token & USD
Generate actionable data: Prepare detailed transaction data for immediate execution via the endpoint.
When preparing for a quote, ensure that the tokens involved are supported by first calling the API. This ensures input and output tokens are valid.
Upon successfully retrieving a quote, use the data to finalise and execute the transaction via .