executePurchase
Execute a buy trade for on-chain tokens using payment tokens after user confirms a quote obtained from getTradeQuote.
Instructions
Place a buy order to purchase on-chain tokens with payment tokens.
Returns an orderNo that can be used with getOrderList to track order status.
Prerequisites (mandatory):
Call
getTradeQuotefirst to getquoteData,correctingCode, andgasDisplay quote details (amount, fees, slippage) to user
Obtain explicit user confirmation
AI agent must obtain explicit user confirmation before calling this endpoint.
Response is an acknowledgment only — use getOrderList to confirm actual order status.
On-chain confirmation typically takes 10-60 seconds.
Do NOT call this endpoint directly without a valid quote. All of quoteData, correctingCode,
and gas must come from a non-expired getTradeQuote response.
Agent hint: Use this endpoint to execute a buy trade after getting a quote and user confirmation. Never call without user approval. Always call getTradeQuote first. Do NOT use this for selling — use executeRedeem instead. Do NOT guess or fabricate quoteData/correctingCode values — they must come from getTradeQuote.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fromTokenCode | Yes | ||
| fromTokenAmount | Yes | ||
| toTokenCode | Yes | ||
| slippage | Yes | ||
| quoteData | Yes | ||
| gas | Yes | ||
| quoteMode | Yes | ||
| correctingCode | Yes | ||
| tenant | No |