# Jupiter Swap API: quotes, keys, rate limits and errors

URL: https://fincodelabs.com/en/blog/jupiter-swap-api · Publisher: Fincode (Fincode Yazılım ve Teknoloji A.Ş.), Istanbul, Turkey · Category: Exchange APIs · Published: 2026-11-26 · Updated: 2026-11-26

Jupiter swap API V2 read 26 November 2026: /order quotes without a key, plans and rate limits, /execute error codes, and a tested Python quote client.

**Short answer:** The **Jupiter swap API** is a REST API at `https://api.jup.ag/swap/v2` where `GET /order` returns a quote and, with a taker wallet, an unsigned Solana transaction that `POST /execute` lands. As read on 26 November 2026, quotes work without a key at 0.5 requests per second; a free key gives 1 per second and paid plans start at $25 a month for 10.

Most pages about the Jupiter API still describe `/swap/v1/quote` on `lite-api.jup.ag`; Jupiter's documentation now recommends Swap API V2 and a credit-based Developer Platform. Everything below comes from that documentation, read on 26 November 2026, and from public quote calls made that day between 18:13 and 18:30 UTC. No private key was used and nothing was signed, so signing and `/execute` are described from the docs, not run.

This is a technical guide, not a recommendation of Jupiter, any token or any trading approach. On-chain swaps and smart contracts carry high risk: a signed transaction cannot be recalled and automated swapping can lose money.

## Jupiter swap API endpoints in November 2026

Jupiter's Swap API V2 has two paths: a Meta-Aggregator path (`/order` then `/execute`) and a Router path (`/build`) for teams that need to change the transaction.

**Swap API V2 endpoints (Jupiter developer docs, read 26 November 2026)**

| Endpoint | What it returns | Routers | Who lands the transaction |
| --- | --- | --- | --- |
| `GET /swap/v2/order` | Quote, plus an unsigned transaction if `taker` is set | Metis, JupiterZ (RFQ), Dflow, OKX | Jupiter, via `/execute` |
| `POST /swap/v2/execute` | Status, signature, amounts, code | As the order | Jupiter |
| `GET /swap/v2/build` | Quote plus raw instructions and a blockhash | Metis only | You (own RPC or `tx.jup.ag`) |

Per the docs, `/build` carries no Jupiter swap fee, and an `/order` transaction cannot be modified because JupiterZ market makers keep last-look rights; custom instructions or cross-program calls need `/build`.

### Migrating from V1, Ultra and lite-api

Ultra users only change the base URL from `ultra-api.jup.ag` to `api.jup.ag/swap/v2`. Metis V1 users on `/quote` plus `/swap-instructions` move to `/build`, where `userPublicKey` becomes `taker`. The migration page says `lite-api.jup.ag` will be phased out, with no end date given. On 26 November 2026 both V1 quote hosts still answered without a key.

## Jupiter quote API without a key: a live response

A quote needs only `inputMint`, `outputMint` and `amount` in the input token's smallest unit; no key and no wallet.

```bash
curl "https://api.jup.ag/swap/v2/order?inputMint=So11111111111111111111111111111111111111112&outputMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount=100000000"
```

The `amount` of 100,000,000 is 0.1 SOL, because SOL has 9 decimals; USDC has 6. Selected fields from the response at 18:13 UTC on 26 November 2026:

**Live /order response, 0.1 SOL to USDC, no key, no taker (26 November 2026)**

| Field | Value | Meaning |
| --- | --- | --- |
| `router` | jupiterz | An RFQ market maker won the quote |
| `outAmount` | 7107003 | 7.107003 USDC |
| `otherAmountThreshold` | 7107003 | Minimum output after slippage |
| `slippageBps` | 0 | RFQ quote marked `guaranteedPrice: true` |
| `feeBps` / `feeMint` | 2 / SOL mint | Total fee rate and the token it is taken in |
| `transaction` | null | No `taker`, so quote only |

With `excludeRouters=jupiterz` and `slippageBps=50`, Metis answered with `slippageBps` 50 and a lower minimum, but sending `slippageBps=50` without the exclusion still returned 0 when JupiterZ won, so read the response value rather than assuming yours applied. Also, `priceImpact` is in percentage points. These numbers explain fields, not prices.

## Jupiter API key, plans and rate limits

A free Jupiter API key from the Developer Platform goes in the `x-api-key` header and raises the limit from 0.5 to 1 request per second.

**Jupiter Developer Platform plans and rate limits (plans and rate-limit pages, read 26 November 2026)**

| Tier | Monthly price | Requests per second | Requests per minute | Included credits |
| --- | ---: | ---: | ---: | --- |
| Keyless | $0 | 0.5 | 30 | No key, no analytics |
| Free | $0 | 1 | 60 | Unlimited, rate-limited |
| Developer | $25 | 10 | 600 | 25M a month |
| Launch | $100 | 50 | 3,000 | 100M a month |
| Pro | $500 | 150 | 9,000 | 500M a month |

The same pages say annual plans cost ten months ($250, $1,000, $5,000), overage is billed, `/order` and `/build` cost 1 credit and `/execute` 0, and limits use a 60-second sliding window per organisation, so extra keys add no capacity. `/execute` has its own bucket: 20 requests per second keyless, 50 on Free, 100 on paid plans.

Keys are shown in full only once, at creation, and can be restricted to products such as Swap or Price. Keep the key server-side; the general rules are in the guide to [API key security for trading bots](https://fincodelabs.com/en/blog/api-key-security-trading-bots).

### What the rate-limit headers showed

Successful and 429 responses carry `x-ratelimit-remaining` and `x-ratelimit-reset` (Unix seconds when a slot frees); 401, 403 and 5xx responses do not. On 26 November 2026 the keyless `/order` bucket did not match the documented 30 a minute: headers counted down from 20, the 21st request within about 7 seconds got HTTP 429 `[API Gateway] Too many requests`, and the reset sat about 10 seconds ahead. Build to the documented 0.5 per second and let the headers slow you down. General patterns are in the guide to [rate limit errors on crypto APIs](https://fincodelabs.com/en/blog/api-rate-limit-exceeded-crypto-exchanges).

## A tested Python client for the Jupiter quote API

The client below uses only the Python standard library, reads an optional key from `JUP_API_KEY`, and never touches a private key.

```python
import http.client, json, os, sys, time, urllib.error, urllib.parse, urllib.request
from decimal import Decimal, InvalidOperation

BASE = "https://api.jup.ag/swap/v2"
MINTS = {"SOL": ("So11111111111111111111111111111111111111112", 9),
         "USDC": ("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", 6)}

class JupiterError(Exception):
    pass

def to_units(text, decimals):
    try:
        units = Decimal(text).scaleb(decimals)
    except InvalidOperation:
        raise ValueError("not a number: " + repr(text))
    if not units.is_finite() or units <= 0 or units > 2**64 - 1:
        raise ValueError("need a positive amount that fits in a u64")
    if units.to_integral_value() - units:
        raise ValueError("more than %d decimals" % decimals)
    return str(int(units))

def error_text(body):
    try:
        data = json.loads(body)
    except ValueError:
        return body[:200]
    err = (data.get("error") or data.get("message") or data) if isinstance(data, dict) else data
    return err if isinstance(err, str) else json.dumps(err)[:200]

def get_order(params, retries=2):
    url = BASE + "/order?" + urllib.parse.urlencode(params)
    headers = {"User-Agent": "Mozilla/5.0"}
    if os.environ.get("JUP_API_KEY"):
        headers["x-api-key"] = os.environ["JUP_API_KEY"]
    for attempt in range(retries + 1):
        try:
            with urllib.request.urlopen(urllib.request.Request(url, headers=headers), timeout=15) as r:
                return json.loads(r.read())
        except urllib.error.HTTPError as e:
            body = e.read().decode("utf-8", "replace")
            if e.code == 429 and attempt < retries:
                reset = e.headers.get("x-ratelimit-reset")
                time.sleep(min(60, max(0, int(reset) - time.time())) + 0.2 if reset else 1)
                continue
            rid = e.headers.get("x-api-gateway-request-id", "-")
            raise JupiterError(f"HTTP {e.code} request={rid}: {error_text(body)}")
        except (OSError, http.client.HTTPException) as e:
            raise JupiterError(f"network error or timeout: {getattr(e, 'reason', e)}")

def quote(sell, buy, amount, taker=None):
    if sell not in MINTS or buy not in MINTS or sell == buy:
        raise ValueError(f"unknown or identical pair: {sell}/{buy}")
    (in_mint, in_dec), (out_mint, out_dec) = MINTS[sell], MINTS[buy]
    params = {"inputMint": in_mint, "outputMint": out_mint, "amount": to_units(amount, in_dec)}
    if taker:
        params["taker"] = taker
    o = get_order(params)
    if taker and o.get("transaction") == "":
        raise JupiterError(f"[{o.get('router')}] errorCode {o.get('errorCode')}: {o.get('errorMessage')}")
    scale = Decimal(10) ** out_dec
    return {"router": o.get("router"), "out": Decimal(o["outAmount"]) / scale,
            "min_out": Decimal(o["otherAmountThreshold"]) / scale,
            "slippage_bps": o.get("slippageBps"), "fee_bps": o.get("feeBps")}

if __name__ == "__main__":
    print(quote("SOL", "USDC", sys.argv[1] if len(sys.argv) > 1 else "0.1"))
```

Run with Python 3.11 on 26 November 2026 at 18:30 UTC, `python jup_quote.py 0.1` printed:

```
{'router': 'jupiterz', 'out': Decimal('7.129463'), 'min_out': Decimal('7.129463'), 'slippage_bps': 0, 'fee_bps': 2}
```

> **Failure paths tested the same day** against the final code, live or with a short-lived local mock:
>
> - `1e400`, `inf`, `NaN`, `0`, `-1` and ten SOL decimals are rejected before any request. `float` would make `1e400` infinite; as a `Decimal` it is finite, so the u64 check stops it (the API itself answered HTTP 400 "amount exceeds max of 18446744073709551615").
> - An invalid key gives HTTP 401; an unreachable host or a dropped connection gives "network error", not an auth error. A silent server raises the same error after the 15-second timeout.
> - A missing `amount` returned `error` as an object, a bad mint as a string; `error_text` handles both, and HTML, without a `KeyError`.
> - A mocked 429 waited until `x-ratelimit-reset`, then succeeded.
> - An unfunded random taker got an empty `transaction` with metis `errorCode` 1, "Insufficient funds".

For broader testing, see [how to test trading bots](https://fincodelabs.com/en/blog/how-to-test-trading-bots).

## From quote to swap: signing, /execute and /build

To swap, add `taker` to `/order`, sign the returned transaction with that wallet, and post it with the `requestId` to `/execute` promptly.

Jupiter's example uses `partiallySignTransaction`, because on a JupiterZ route the market maker signs after you. Aggregator transactions expire at `lastValidBlockHeight`, RFQ quotes at `expireAt`, usually sooner. `/execute` sets the priority fee, lands the transaction, polls for confirmation and returns the amounts that reached the wallet.

With `/build` you assemble instructions, simulate compute units, set the priority fee and land the transaction yourself. Jupiter's docs advise capping the compute unit price in volatile conditions.

Never paste a seed phrase or private key into a script or bot you did not write; keep signing in a separate process or hardware-backed signer. Architecture choices for multi-venue systems are covered in the guide to [crypto exchange API integration](https://fincodelabs.com/en/blog/crypto-exchange-api-integration), and slippage settings in the guide to [slippage in crypto trading](https://fincodelabs.com/en/blog/slippage-crypto).

## Jupiter API error codes and failure modes

Jupiter errors arrive at three layers: HTTP status from the gateway, `errorCode` inside a 200 `/order` response, and `code` inside the `/execute` response.

**/order errorCode when transaction is an empty string (order reference, read 26 November 2026)**

| errorCode | Metis, Dflow, OKX | JupiterZ |
| ---: | --- | --- |
| 1 | Insufficient funds | Insufficient balance to fund the swap |
| 2 | Insufficient SOL for gas | Missing associated token account |
| 3 | Swap below minimum for gasless | Quote could not be built into a transaction |

Match on `router` and `errorCode` together, never on the message text.

**/execute result codes (Order and Execute guide, read 26 November 2026)**

| Code | Meaning |
| --- | --- |
| 0 | Success |
| -1 / -2 | Missing cached order / invalid signed transaction |
| -1000 / -2000 | Failed to land (aggregator / RFQ) |
| -1003 | Transaction not fully signed |
| -1004 / -1005 | Invalid block height / expired before landing |
| -2003 / -2004 | RFQ quote expired / swap rejected |

At the gateway, a missing key is keyless; 401 means an unknown key; 403 means the key lacks permission or a firewall rule blocked it; 429 is the plan limit or a firewall rule. Log `x-api-gateway-request-id` on every failure.

The documents do not say how long a `requestId` stays valid, or whether a failed `/execute` may be retried with the same transaction. A failure can still carry a `signature`: look it up on-chain before sending anything new, or a retry loop can swap twice.

## Jupiter swap fees, terms and legal limits

Jupiter's documented platform fee on `/order` swaps ranges from 0 to 50 basis points by token pair, and use of the API falls under its SDK and API License Agreement.

**Jupiter platform fee by pair on /order (read 26 November 2026)**

| Pair type | Fee (bps) |
| --- | ---: |
| Pegged pairs; buying Jupiter's own tokens | 0 |
| SOL to stablecoin | 2 |
| Liquid staking token to stablecoin | 5 |
| Everything else | 10 |
| Tokens less than 24 hours old | 50 |

The top-level `feeBps` can exceed `platformFee.feeBps` when gasless costs are recouped.

Section 7.3 of the SDK and API License Agreement makes the integrator responsible for KYC, anti-money-laundering, sanctions and securities-law compliance of its own product, and sections 14.3 and 14.4 put disputes under the laws of Panama. The Terms of Use for the jup.ag interface list prohibited localities, including the United States, Singapore and sanctioned regions, and forbid using a VPN to get around them. They cover the interface, and API access is no way around them; take legal advice before shipping to users. Article 99/A of Capital Markets Law No. 6362 treats activity by foreign crypto-asset platforms directed at Turkish residents as unauthorized.

If you are scoping a build that touches on-chain venues, Fincode's [exchange API integration service page](https://fincodelabs.com/en/services/exchange-api-integration) is a general pointer; naming Jupiter here does not mean Fincode integrates it or has built on it. For a broader introduction, see [what a crypto API is](https://fincodelabs.com/en/blog/what-is-crypto-api).

Related guide: [Birdeye API in Python](https://fincodelabs.com/en/blog/birdeye-api).

## Frequently asked questions

### Does the Jupiter API need an API key?

Not for quotes. As read on 26 November 2026, requests without an x-api-key header run keyless at 0.5 requests per second; a free key gives 1.

### What is the Jupiter quote API endpoint now?

Jupiter's docs recommend GET https://api.jup.ag/swap/v2/order without a taker. The older /swap/v1/quote still answered on 26 November 2026, but the docs describe migrating away from it.

### How much does a Jupiter API plan cost?

Jupiter's plans page, read 26 November 2026, lists Free at $0 and paid plans at $25, $100 and $500 a month.

### Why does /order return an empty transaction?

The router quoted a price but could not build a transaction for that taker. Read router and errorCode together; errorCode 1 from Metis means insufficient funds.

### Can I use /execute with a transaction from /build?

No. Jupiter's execute reference says /execute only accepts transactions from /order; /build transactions go through your own RPC or tx.jup.ag.

## Sources

- [Jupiter Developer Docs: Solana Swap API overview (read 26 November 2026)](https://developers.jup.ag/docs/swap/index.md)
- [Jupiter Developer Docs: Order and Execute, error codes and fees](https://developers.jup.ag/docs/swap/order-and-execute.md)
- [Jupiter API reference: GET /swap/v2/order](https://developers.jup.ag/docs/api-reference/swap/order.md)
- [Jupiter API reference: POST /swap/v2/execute](https://developers.jup.ag/docs/api-reference/swap/execute.md)
- [Jupiter API reference: GET /swap/v2/build](https://developers.jup.ag/docs/api-reference/swap/build.md)
- [Jupiter Developer Platform: Plans and Pricing](https://developers.jup.ag/docs/portal/plans.md)
- [Jupiter Developer Platform: Rate Limits](https://developers.jup.ag/docs/portal/rate-limits.md)
- [Jupiter Developer Platform: Response Codes](https://developers.jup.ag/docs/portal/responses.md)
- [Jupiter Developer Platform: API Keys](https://developers.jup.ag/docs/portal/api-keys.md)
- [Jupiter Developer Platform: Migrating to Developer Platform (lite-api phase-out)](https://developers.jup.ag/docs/portal/migration.md)
- [Jupiter Developer Docs: Ultra to Meta-Aggregator migration](https://developers.jup.ag/docs/swap/migration/ultra-to-order.md)
- [Jupiter Developer Docs: Metis to Router migration](https://developers.jup.ag/docs/swap/migration/metis-to-build.md)
- [Jupiter: SDK and API License Agreement](https://developers.jup.ag/docs/legal/sdk-api-license-agreement.md)
- [Jupiter: Terms of Use (jup.ag interface)](https://developers.jup.ag/docs/legal/terms-of-use.md)

> This guide is general information about software and markets, not investment, legal or tax advice. Automated trading can lose money, past or backtested performance does not guarantee future results, and the rules that apply depend on your jurisdiction and your exchange's terms. Sources, checks and corrections: see the [editorial policy](https://fincodelabs.com/en/editorial-policy).

---

Published by Fincode (Fincode Yazılım ve Teknoloji A.Ş.), a software company in Istanbul, Turkey: https://fincodelabs.com/en/blog/jupiter-swap-api

Cite as: Fincode, "Jupiter Swap API: quotes, keys, rate limits and errors", updated November 26, 2026, https://fincodelabs.com/en/blog/jupiter-swap-api
