Skip to content
Alchemy Logo

Solana Trader API

Alchemy's REST endpoints for pricing and building Solana token swaps.

Powered by Metis.

The Solana Trader API returns swap quotes and, when you provide a wallet address, either an unsigned transaction for that wallet to sign and broadcast or the instructions to build one yourself. Use it to price a swap ahead of time, present a route to a user, or hand a signable transaction to a wallet. Requests use the same Alchemy API key as your other Solana calls.

The Solana Trader API is powered by Metis, a Solana swap routing engine. Requests and responses follow the Swap V2 /order format, so existing integrations need minimal changes. Two differences worth calling out:

  • Alchemy carries auth in the URL path (see Endpoint), not in an x-api-key header.
  • /quote-multiple-output-mints is an Alchemy-specific endpoint that returns quotes for one input mint against up to 32 candidate output mints in a single request.

The API exposes three endpoints:

  • GET /swap/v2/order returns a swap quote. Pass a taker to also receive an unsigned base64 transaction; omit taker for a quote-only response. Optional payer compiles a sponsor as the fee payer; optional referralFee + referralAccount charge an integrator fee.
  • GET /swap/v2/build returns raw swap instructions for composing into your own transaction (multi-leg flows, program deposits, cleanup steps). Optional payer rewrites rent and account-creation instructions onto a sponsor; optional referralFee + referralAccount charge an integrator fee.
  • POST /quote-multiple-output-mints returns quotes for a single input against up to 32 output mints in one call.

Solana Trader API is available on Solana Mainnet through the standard Alchemy Solana endpoint. Devnet is not supported.

https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Use your Solana Mainnet API key from the Alchemy Dashboard. The docs-demo key powers the Try It widget on the method pages below.

MethodFunctionCU costThroughput CUs (counted against your per-second rate limit)
GET /swap/v2/orderGet a swap quote. Include a taker to also receive an unsigned base64 transaction; omit taker for quote fields only.10080
GET /swap/v2/buildReturn raw swap instructions for composing into your own transaction.10060
POST /quote-multiple-output-mintsQuote a single input mint against up to 32 candidate output mints in one call.100100
Was this page helpful?