What Is the Swap API?
The Swap API is Quicknode's hosted Solana trading endpoint that bundles Jupiter swaps, Pump.fun trading, limit orders, trading WebSockets, and commission and referral webhooks. Quicknode operates and maintains it, so you do not run or scale your own server, and new markets and pools are available as soon as they launch.
The API covers five areas:
- Jupiter Swap API: Fetch prices and quotes, then build and send swaps routed for the best price across Solana DEXs.
- Pump.fun Trading API: Price and execute buys and sells of Pump.fun tokens.
- Jupiter Limit Orders: Create, cancel, and track orders that execute at a price you set.
- Trading WebSockets: Get real-time quote and swap updates with no polling required.
- Commission and Referral Webhooks: Receive HTTP POSTs when referral and commission events occur.
How to Access the Swap API
You can access the Swap API through a public or private endpoint:
- Public endpoint:
https://public.jupiterapi.com(more info at jupiterapi.com) - Private endpoints: available on the Quicknode dashboard or by adding Swap API to your Quicknode account from your dashboard.
Users on the free plan receive the public Jupiter API endpoint (https://public.jupiterapi.com) rather than a private Quicknode endpoint. To receive a dedicated private endpoint with higher rate limits, upgrade to a paid Swap API plan on the Quicknode dashboard.
Some endpoints are available only to paid subscribers of the Swap API plan. The Paid column in each table below shows which endpoints require a paid plan.
Jupiter Swap API
The Jupiter Swap API is a decentralized exchange (DEX) aggregator that routes a trade between two SPL tokens across Solana liquidity venues to find the best available price. Use these endpoints to fetch prices and quotes, build and sign swap transactions or instructions, list tradable tokens, and monitor newly deployed pools.
| Endpoint | Method | Description | Paid |
|---|---|---|---|
/price | GET | Real-time price of SPL Tokens | ✅ |
/quote | GET | Get best price quote | |
/swap | POST | Generates a Solana transaction from a quote | * |
/swap-instructions | POST | Generates Solana transaction instructions from a quote | * |
/program-id-to-label | GET | Returns a hash, whose key is the program id and value is the label | |
/tokens | GET | Returns a list of all the tradable mints. | |
/new-pools | GET | Returns recently deployed Solana liquidity pools and tokens | ✅ |
*Swap fees are included for Free Trial plans using these endpoints. Please visit JupiterAPI.com for more details.
Resources
- How to use the Jupiter API to create a Solana trading bot
- Video: how to create a Solana trading bot
- Tips to improve Jupiter Swap landing rates on Solana
- Sample code: use Jito Bundles with the Swap API
Pump.fun Trading API
The Pump.fun trading API lets you buy and sell Pump.fun tokens through Swap API using the same quote and swap flow as the Jupiter Swap endpoints. Use these endpoints to price a Pump.fun trade and build the transaction or instructions that execute it.
| Endpoint | Method | Description | Paid |
|---|---|---|---|
/pump-fun/quote | GET | Get the best priced quote on Pump.fun | ✅ |
/pump-fun/swap | POST | Returns a Solana transaction that you can use to swap on Pump.fun | * |
/pump-fun/swap-instructions | POST | Returns Solana transaction instructions that you can use to swap on Pump.fun | ✅ |
*Swap fees are included for Free Trial plans using these endpoints. Please visit JupiterAPI.com for more details.
Subscribing to either the Pump.fun API or the Swap API gives you access to both APIs under a shared subscription. You receive one API key (for example, https://jupiter-swap-api.quiknode.pro/KEY), which works with both add-ons. You do not need to subscribe separately.
Resources
- Automate Pump.fun trading with Swap API and Solana Kit
- Create a Solana copy trading bot using Pump.fun
Jupiter Limit Orders
Jupiter limit orders let you place an order that executes when the market reaches a price you set, instead of trading immediately at the current price. Use these endpoints to create, inspect, cancel, and list limit orders for a wallet, and to check the fee Jupiter charges to fulfill them.
| Endpoint | Method | Description | Paid |
|---|---|---|---|
/limit-orders/create | POST | Get unsigned transactions needed to create a limit order | ✅ |
/limit-orders/{pubkey} | GET | Returns the details of a specific limit order | ✅ |
/limit-orders/cancel | POST | Get unsigned transactions needed to cancel a limit order | ✅ |
/limit-orders/open | GET | Returns a list of all open limit orders associated to a wallet | ✅ |
/limit-orders/fee | GET | Returns the fee in basis points Jupiter charges to fulfill orders | ✅ |
/limit-orders/history | GET | Returns a list of all limit orders associated to a wallet | ✅ |
Trading WebSockets
Trading WebSockets stream notifications from the Jupiter API over a persistent /ws connection, so you receive updates without polling. Both entries share the /ws path and are distinguished by purpose: subscribe to the quote stream to receive best-price quotes as they change, or the swap stream to build a swap from a quote you receive.
| Endpoint | Method | Description | Paid |
|---|---|---|---|
/ws | WS (quote) | Subscribe to real-time quote stream and receive best price updates as market conditions change | ✅ |
/ws | WS (swap) | Subscribe to swap stream and receive notifications with executable swap transactions from your received quotes | ✅ |
Commission and Referral Webhooks
Commission and referral webhooks send an HTTP POST to your endpoint when a referral or commission event happens, so your backend can react to it in real time. Use these payload specifications to handle referral account creation, token commission claims, and commission swaps.
| Endpoint | Method | Description | Paid |
|---|---|---|---|
/webhooks/referral-account | POST | Specification of webhook for referral accounts creation | ✅ |
/webhooks/commission-claim | POST | Specification of webhook for claiming token commissions | ✅ |
/webhooks/commission-swap | POST | Specification of webhook for commission swaps | ✅ |