Swap API on Solana

Beta

The fastest API for Solana swaps

Deliver faster trades with 35ms median quotes.
Find routes for new launch tokens instantly.

0x Solana swap widget showing a SOL to USDC quote

35ms

Median response time

Instant

Routing for new launchpad tokens

1 API

EVM, Solana & Cross-Chain

Shaped by teams
that know Solana

Designed and tested with our Key Beta Partners.

Titan
Kamino
Matcha Meta
Relay

Built to fit your swap flow

One call returns the quote, the route plan and swap instructions ready to compose into your own transaction. Backed by 99.9%+ uptime.

Build transactions your way

Reserve accounts or bytes for your own instructions, then compile, sign and send on your terms.

Transaction v1 ready

Request instructions for Solana's v1 transaction format, which gives the router more room for multi-hop routes. v0 is still supported as a fallback.

Earn on every swap

Set your own fee in parts per million on the buy or sell side, paid to the account you choose.

Every chain, one key

One 0x API key for EVM, Solana and cross-chain swaps.

One provider for every chain you ship on

Already swapping on EVM with 0x? Add Solana and cross-chain swaps without needing another vendor.

Get your API key

Same API key, dashboard and plan across EVM, Solana and cross-chain.

Collect fees on every chain you route.

Ready to build on Solana

Get an API key and make your first Solana call, or talk to the Solana team about your setup.

Read the Solana docs →

const main = async () => {
  const sellAmount = 1_000_000; // 0.001 SOL, in lamports

  // fetch quote + swap instructions
  const response = await fetch("https://api.0x.org/solana/swap-instructions", {
    method: "POST",
    headers,
    body: JSON.stringify({
      token_in: "So11111111111111111111111111111111111111112", // SOL
      token_out: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", // USDC
      amount_in: sellAmount,
      slippage_bps: 100,
      taker: wallet.publicKey.toBase58(),
    }),
  });

  const quote = await response.json();
  console.log("Quote to swap 0.001 SOL for USDC: ", quote);
};
main();

Solana Swap API FAQ

Is the 0x Solana Swap API ready to use?

Yes. Swap API on Solana has been in public beta since August 4, 2026 and is open to every team: create an API key in the 0x Dashboard to start. Interfaces may still change while it's in beta.

How fast is it?

The median quote response is ~35ms, measured from US-East (us-east-1). That's the p50 across every token category 0x tests, including new launchpad tokens.

Which new tokens can it route?

Almost every token on Solana can be traded through 0x Swap API on Solana. New tokens from Pump.fun and Meteora are indexed and available to route within seconds, including multi-hop routes out of a new token into SOL or a stablecoin.

Does it support Transaction v1?

Yes. Set transaction_version to v1 and the API returns instructions for Solana's v1 transaction format. v0 is supported too.

Does it support Token2022?

Yes, Token2022 tokens are supported. Tokens that use the transfer-fee or transfer-hook extensions aren't supported yet.

Can I use it alongside the router I already have?

Yes. The API returns swap instructions rather than a finished transaction, so you can request a 0x quote next to your current providers and use the one that fits your rules.

Can I charge a fee on swaps?

Yes. Set swap_fee_ppm and swap_fee_recipient to collect a fee on each swap. See "Monetize your app" in the Solana docs.

How much does it cost?

Solana swaps are included on both 0x plans, Standard and Enterprise. See 0x.org/pricing.