Skip to main content

v1 only

Every transaction the router builds is v1 (SIMD-0385, active on mainnet since slot 447,120,000). There is no v0 and no legacy form: txVersion is the integer 1 or absent, and txVersion: 0 (or any other number) and asLegacyTransaction: true answer 400. The response spells it "txVersion": "v1"; do not send that string back, it is a parse error.
The user’s signer must be able to sign v1 transactions. Check your SDK before you integrate: older @solana/web3.js 1.x releases can read v1 but cannot build or sign it. Use a v1-capable SDK (for example @solana/kit 8 or later).

Getting a transaction

The build answers instructions by default. Two ways to a transaction:
  • Let the router serialize it: send "serialize": true. You get swapTransaction (base64, unsigned) and lastValidBlockHeight. The blockhash is the router’s: refreshed every 2 seconds and never served older than 30, so sign and send right away. Without a fresh one the build answers 503 not_ready (blockhash unavailable).
  • Assemble it yourself: put setupInstructions, then every instruction of swapInstructions, then cleanupInstruction, then otherInstructions, and set the header from transactionConfig. Or post them to POST /tx/v1, which serializes any instructions you give it as an unsigned v1 transaction (useful to add your own instructions).
The swap instruction has no deadline of its own: only the blockhash expires the transaction.

Compute budget

transactionConfig carries what goes in the v1 header: A limit left out of a v1 header counts as zero, not as a default: keep every field the router gives you. The compute-unit limit is sized from the route’s steps (walkSteps in the quote); if you strip walkSteps from a quoteResponse, the build declares the maximum for those hops and you pay priority fee on it.

Priority fee

The first of these that the build body sets (to a value above zero) decides the fee: Nothing set means no priority fee: absent is not auto, and an explicit 0 is no fee, not the market price. The fee is charged on the declared compute-unit limit, not on the units the swap ends up using. costs.priorityFeeSource says where the number came from (client, chain, floor, ceiling, none).

Tips

  • prioritizationFeeLamports: {"jitoTipLamports": N} (or {"jitoTipLamportsWithPayer": {"lamports": N}}) adds a System transfer of N lamports to the Jito tip account 96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5 in otherInstructions, and no priority fee from that field (computeUnitPriceMicroLamports still applies).
  • tipWallet + tipLamports tip any wallet you choose, and win over the Jito field.

What the user pays

costs estimates the lamports the transaction costs the user, as decimal strings (priorityFeeSource is a label and rentExact a boolean): rentLamports counts every account the setup creates as if the user had none of them: a user who already has the token account pays less. With rentExact: false, the size of a Token-2022 account could not be known exactly and that account’s rent is counted at its minimum.