Build an unsigned swap transaction
justi_build_swapBuilds an unsigned Solana v0 transaction to buy or sell a justi.fun coin for a wallet. Quotes fresh, simulates, sets compute limit and priority fee, and returns the base64 transaction for the user to sign.
Instructions
Build an unsigned Solana v0 transaction that buys or sells a justi.fun coin for a wallet. Nothing is signed or sent: the user's wallet must sign it. The server quotes fresh, simulates, and sets the compute limit and priority fee. Returns swapId, the base64 transaction, the quote and how to submit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mint | Yes | ||
| side | Yes | ||
| wallet | Yes | The wallet that pays and signs | |
| amountRaw | No | Raw units instead of the decimal amounts | |
| amountSol | No | Buy: SOL to spend | |
| priorityFee | No | "auto" or micro-lamports per compute unit | |
| slippageBps | No | ||
| amountTokens | No | Sell: whole tokens |