Get raw swap instructions for composing custom transactions. Use this when you need to add custom instructions (tips, memos, etc.) or batch multiple swaps.
Parameters (InstructionsRequest)
Fogo Sessions mode
Pass sessionAccount to build instructions for a Fogo session instead of a
wallet signature: the session account becomes the route’s signing authority (the userWallet’s
ATAs still hold the funds), and the response contains a single route instruction — no
ATA-create or SOL-wrap instructions, because the wallet never signs. Check the response’s
requiredTokenAccounts: those ATAs must exist (and the input ATA hold amountIn) before the
session transaction is sent. Send it via the Fogo Sessions SDK — the session key signs, the
paymaster pays. Session routes are currently Valiant-V1-only; pairs without such a route return
a 400.
Combine with quoteId + firm: true for the strongest flow: firm price-or-fail redemption with no
wallet popup.
Response (InstructionsResponse)
Response Fields
RawInstruction
Building a Transaction
After receiving the instructions, you build the transaction yourself:
When to Use instructions() vs swap()
Last modified on August 31, 2026