Quote a trade
Prices a buy or a sell. The answer has one of three shapes, one per venue: a curve quote (expectedOut, componentTargets), a market quote for a launch past the curve (graduated: true), or a pool quote for a collectible (estimatedAmountOut, no expectedOut). Read the quote guide before parsing. preview: true prices without storing a quote you could build from. Amounts are decimal strings of base units.
application/json- body
launch*stringThe launch address. Take one from GET /v1/launches.
^[1-9A-HJ-NP-Za-km-z]{32,44}$direction*stringbuy or sell.
"buy""sell"amountIn*stringBase units as a decimal string. With exactInSol it is lamports and a ceiling on what you spend. A sell is in the primary token's base units.
^(0|[1-9]\d*)$length <= 20mode?stringexactOut: amountIn is the tokens you want out. exactIn: amountIn is DNA units to spend. exactInSol: amountIn is lamports of SOL, the most you will spend.
"exactOut""exactIn""exactOut""exactInSol"slippageBps?integerTolerated slippage in basis points. 100 is 1%.
0 <= value <= 10000100wallet?stringThe wallet the trade is for. With it the quote reports what the wallet already holds.
^[1-9A-HJ-NP-Za-km-z]{32,44}$preview?booleantrue prices without storing a quote you could later build from. The answer has no usable quoteId.
falsetipLamports?stringThe tip for this quote in lamports per transaction. Absent: the server default. "0": none.
^(0|[1-9]\d*)$length <= 20priorityFee?|auto or lamports per transaction.
OK
application/json- response
quote*||curl -X POST 'https://api.dev.trend.fun/v1/trades/quote' \ -H 'Content-Type: application/json' \ -d '{ "launch": "3rvGiCyHHkhATZNhSznAhpcXKRZ9788AD6yan1khxwuS", "direction": "buy", "amountIn": "250000000", "mode": "exactInSol", "slippageBps": 100, "preview": true}'{ "quote": { "quoteId": "8c5857cf-fa33-4821-b451-aed20dd7094e", "launch": "7JkeZb8cAq58bLdKBMsbteyk5WJ5S4vhwqyax2rNvkVF", "direction": "buy", "amountIn": "10000000", "componentTargets": [ { "mint": "So11111111111111111111111111111111111111112", "symbol": "SOL", "decimals": 9, "amount": "9699999" } ], "componentFees": [ { "mint": "So11111111111111111111111111111111111111112", "symbol": "SOL", "decimals": 9, "amount": "96999" } ], "componentFunding": [ { "mint": "So11111111111111111111111111111111111111112", "symbol": "SOL", "decimals": 9, "amount": "9699999", "required": "9699999", "held": "0", "shortfall": "9699999" } ], "fullyCovered": false, "dnaUnitsNet": "9603000", "expectedOut": "50850504617455371", "minOut": "50341999571280817", "priceImpactBps": 944, "feeBps": 100, "expiresAt": 1790877961, "clamped": false, "budgetSolIn": "9699999", "route": { "fullyCovered": false, "solIn": "9699999", "legs": [], "venues": [], "needsAccountSetup": false, "transactions": 1, "note": "Wrapping SOL to fund the trade: no swaps, in one transaction." } }}