Skip to main content
Raptor finds a route and builds the swap transaction. Your app signs it with the user’s wallet, submits the signed bytes, and checks the result. Use the separate quote and build steps when the user needs to review a price first.
HTTP Base URL: https://raptor-beta.solanatracker.io
WebSocket Base URL: wss://raptor-beta.solanatracker.io
Raptor is currently in public beta.

Supported routing

Raptor routes across venues and pool types including Raydium, Meteora, Orca Whirlpool, Pump.fun, Pumpswap, MoonIt, Boopfun, FluxBeam, PancakeSwap V3, and more. Use dexes when you want to restrict routing to a subset of supported venues.

1. Get a quote

Request a route with Get swap quote. Supply:
  • inputMint
  • outputMint
  • amount in smallest units, which means blockchain integer amounts with no decimals
  • optional slippageBps in basis points, where 50 means 0.5%
  • optional routing controls like dexes, pools, and maxHops

Restrict routes

2. Build a swap transaction

Use Build swap transaction to create a serialized transaction. Send this request body:
  • userPublicKey
  • quoteResponse from /quote
  • optional transaction tuning like priorityFee, txVersion, computeUnitLimit, tipLamports, and platform fee fields

Transaction controls

Token accounts and SOL wrapping

The /swap response includes setup and cleanup instructions for the swap:
  • Associated Token Accounts (ATAs) — Raptor adds createAssociatedTokenAccountIdempotent instructions to setupInstructions for any input, output, or intermediate mint where the user does not already have an ATA. You do not need to pre-create ATAs for the output token; the rent (~0.00203 SOL per account) is paid by userPublicKey. If you build your own transaction from /swap-instructions, keep the setupInstructions and cleanupInstruction arrays — that is where ATA creation and SOL wrap/unwrap live.
  • SOL wrapping — wrapUnwrapSol defaults to true. Raptor wraps SOL into wSOL in setupInstructions when SOL is the input, and unwraps any remaining wSOL back to native SOL in cleanupInstruction when SOL is the output. Set wrapUnwrapSol: false only if you are managing a long-lived wSOL account yourself.

3. Sign in the wallet

Raptor returns swapTransaction as base64. Sign it in the wallet, then send the signed base64 transaction.

4. Send the signed transaction

Send signed transactions with raptor/transactions: POST /send-transaction.
Raptor sends through Yellowstone Jet TPU and retries in the background until the transaction confirms or expires.

Track status

Valid statuses are pending, confirmed, failed, and expired.

Quote and build in one request

Use Quote and swap in one request if you want a single request instead of separate /quote and /swap calls.

Build instructions only

Use Build swap instructions when you want instructions without a transaction wrapper.

Atomic buy → sell in one transaction (token ledger)

For a buy followed by a sell in one transaction, the second leg may need the first leg’s actual output. A token ledger records that amount during execution so the next instruction can read it. The flow is:
  1. Call /swap-instructions for the buy leg (e.g. SOL → TOKEN on pool 1). Use the returned tokenLedgerInstruction to capture the on-chain output amount.
  2. Call /swap-instructions for the sell leg (e.g. TOKEN → SOL on pool 2). The sell instruction reads its input amount from the token ledger written by the buy leg.
  3. Assemble both calls’ computeBudgetInstructions, setupInstructions, tokenLedgerInstruction, swapInstruction, and cleanupInstruction into a single VersionedTransaction. Deduplicate setup/cleanup instructions and combine the addressLookupTableAddresses from both responses.
  4. Sign once and submit through /send-transaction.
Notes
  • tokenLedgerInstruction is null for ordinary single-swap responses — that is expected. It is populated when the swap is part of a chain where a later instruction needs to read the runtime output of an earlier one.
  • amountOut in a quote is the expected output and cannot be set to auto. The token ledger is the supported way to chain “sell whatever the buy produced” without knowing the amount ahead of time.
  • Keep both legs inside the compute unit budget. You may need to raise computeUnitLimit and computeUnitPriceMicroLamports when combining two swaps.

Stream live quotes

Use the Raptor WebSocket /stream endpoint for quote updates.

Stream ready-to-sign swap transactions

Use /stream/swap when you want live quote updates plus a fresh prebuilt transaction. This stream requires userPublicKey because Raptor builds the transaction for that wallet.
/stream/swap re-sends the latest transaction after 10 slots without an update to help avoid transaction expiry.

Raptor Overview

Full endpoint reference, supported DEXs, routing controls, and WebSocket details.

Raptor Transactions

Send signed transactions and track confirmation status through Raptor.