> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orbitflare.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication & Limits

> How OrbitFlare authenticates RPC, WebSocket, Jetstream and Yellowstone: the IP Whitelist and API Key Only modes, where to send your license key, and the per-plan rate and connection limits.

## Authentication

Every request is checked against your **license**. You will find the license key, the authentication mode and the IP whitelist in the **Licenses** section of the [dashboard](https://orbitflare.com/dashboard).

### Authentication modes

Each license runs in one of two modes. Switch between them under **Authentication Mode** in the dashboard, or with the [Toggle Auth Mode](https://docs.orbitflare.com/api-documentation/customer-endpoints/licenses/toggle-auth-mode.md) endpoint.

| | IP Whitelist | API Key Only |
| - | - | - |
| Who can connect | Only the IPs on your license's whitelist | Anyone who has the key, from any IP |
| RPC and WebSocket | License key, sent from a whitelisted IP | License key |
| Jetstream and Yellowstone (gRPC) | A whitelisted IP. No key is needed | License key in the `x-token` header |
| Good for | Fixed servers with stable IPs | Serverless functions, laptops, CI, and anything with changing IPs |

In **API Key Only** mode the key is the only thing standing between your license and anyone else, so keep it out of client-side code and public repos, and regenerate it from the dashboard if it leaks. Rentals are disabled while a license is in this mode.

> [!NOTE]
>
> A license also covers a set of regions. A request to a region outside your license returns `-32404 IP not whitelisted` in either mode, even with the right key. On gRPC, Jetstream closes the connection (`Unavailable: EOF`) and Yellowstone returns `PermissionDenied: IP not whitelisted for this api key`. Use the regions listed on your license, or check them with the [locations endpoint](https://docs.orbitflare.com/api-documentation/customer-endpoints/licenses/locations.md).

### Sending your key

| Service | How to send the key |
| - | - |
| RPC (HTTP) | `?api_key=YOUR_LICENSE_KEY` on the URL, or an `x-api-key: YOUR_LICENSE_KEY` header |
| WebSocket | `?api_key=YOUR_LICENSE_KEY` on the URL, or an `x-api-key` header on the upgrade request. Browsers cannot set WebSocket headers, so use the URL there |
| Jetstream and Yellowstone (gRPC) | An `x-token: YOUR_LICENSE_KEY` metadata header. gRPC has no query string, and `x-api-key` is not accepted |

```bash RPC theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl https://fra.rpc.orbitflare.com \
  -H "x-api-key: $ORBITFLARE_LICENSE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"getBlockHeight"}'
```

```bash WebSocket theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
wscat -c "wss://fra.rpc.orbitflare.com?api_key=$ORBITFLARE_LICENSE_KEY"
```

```bash Jetstream theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
grpcurl -plaintext -H "x-token: $ORBITFLARE_LICENSE_KEY" \
  -import-path . -proto jetstream_v2.proto -d '{}' \
  fra.jetstream.orbitflare.com:80 jetstream.v2.JetstreamV2/GetVersion
```

```bash Yellowstone theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
grpcurl -plaintext -H "x-token: $ORBITFLARE_LICENSE_KEY" \
  -import-path . -proto geyser.proto -d '{}' \
  fra.rpc.orbitflare.com:10000 geyser.Geyser/GetVersion
```

The header keeps the key out of URLs, which tend to end up in logs and proxies. Use it wherever your client can set headers.

**With the SDKs**, set `ORBITFLARE_LICENSE_KEY` in the environment or call `.api_key()` (`.apiKey()` in TypeScript, `.APIKey()` in Go) on any client builder. The RPC and WebSocket clients send it as `api_key`, and the Jetstream and Yellowstone clients send it as `x-token`. In IP Whitelist mode the gRPC clients work without a key, so you can leave it unset there.

### When authentication fails

| Error | Mode | Meaning |
| - | - | - |
| `-32401 missing API key` | Both | RPC or WebSocket request without a key |
| `-32402 invalid API key` | Both | The key is wrong or was regenerated |
| `-32404 IP not whitelisted` | IP Whitelist | The request came from an IP that is not on the whitelist |
| `-32404 IP not whitelisted` | Both | The region is not on your license |
| gRPC `Unauthenticated: authentication required: provide x-token header` | Both | Yellowstone: no `x-token` in API Key Only mode, or a non-whitelisted IP in IP Whitelist mode |
| gRPC `PermissionDenied: IP not whitelisted for this api key` | IP Whitelist | Yellowstone: a valid key, but sent from an IP that is not whitelisted. The key alone is not enough in this mode |
| gRPC `Unavailable: EOF` or `connection reset by peer` | Both | Jetstream refused the connection: no valid `x-token` in API Key Only mode, or a non-whitelisted IP in IP Whitelist mode. If an endpoint isn't covered by your license, hitting it results in this too |

The [error reference](https://docs.orbitflare.com/rpc/error-codes.md) lists every error, and [gRPC debugging](https://docs.orbitflare.com/troubleshooting/grpc.md) covers streaming connections in detail.

## Customer API Authentication

The [Customer API](https://docs.orbitflare.com/api-documentation/welcome.md) uses a different authentication method. Pass your API key via the `X-ORBIT-KEY` HTTP header:

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl -X GET https://orbitflare.com/api/customer/v2/licenses \
  -H "X-ORBIT-KEY: YOUR_API_KEY"
```

Customer API v2 also supports Bearer token authentication obtained through the device flow or wallet signature auth. See the [Customer API docs](https://docs.orbitflare.com/api-documentation/welcome.md) for details.

## RPC Endpoints

OrbitFlare provides geo-distributed RPC endpoints so you can route requests to the region closest to your users or infrastructure. The URL format is:

```
https://{region}.rpc.orbitflare.com?api_key=YOUR_API_KEY
```

Replace `{region}` with one of the region codes below.

### Available Regions

> [tab] US
>
> | City | Region Code | Endpoint |
> | - | - | - |
> | Ashburn | `va` | `https://va.rpc.orbitflare.com?api_key=YOUR_API_KEY` |
> | New York | `ny` | `https://ny.rpc.orbitflare.com?api_key=YOUR_API_KEY` |
> | Los Angeles | `la` | `https://la.rpc.orbitflare.com?api_key=YOUR_API_KEY` |
> | Salt Lake City | `slc` | `https://slc.rpc.orbitflare.com?api_key=YOUR_API_KEY` |

> [tab] Europe
>
> | City | Region Code | Endpoint |
> | - | - | - |
> | Amsterdam | `ams` | `https://ams.rpc.orbitflare.com?api_key=YOUR_API_KEY` |
> | Frankfurt | `fra` | `https://fra.rpc.orbitflare.com?api_key=YOUR_API_KEY` |
> | London | `lon` | `https://lon.rpc.orbitflare.com?api_key=YOUR_API_KEY` |

> [tab] Asia Pacific
>
> | City | Region Code | Endpoint |
> | - | - | - |
> | Tokyo | `jp` | `https://jp.rpc.orbitflare.com?api_key=YOUR_API_KEY` |
> | Singapore | `sg` | `https://sg.rpc.orbitflare.com?api_key=YOUR_API_KEY` |

### Choosing a Region

Endpoints are region-pinned. Pick the region closest to your infrastructure for the lowest latency, for example Frankfurt:

```
https://fra.rpc.orbitflare.com?api_key=YOUR_API_KEY
```

> [!NOTE]
>
> Latency to the nearest region is what matters most. If you are unsure which region is closest to your servers, test a few with the `/health` endpoint and compare round-trip times.

## WebSocket Endpoints

WebSocket connections use the same region codes with the `wss://` scheme:

```
wss://{region}.rpc.orbitflare.com?api_key=YOUR_API_KEY
```

For example, Frankfurt:

```
wss://fra.rpc.orbitflare.com?api_key=YOUR_API_KEY
```

Authentication is handled through the same `api_key` query parameter.

## Devnet

OrbitFlare provides a dedicated Devnet endpoint for development and testing:

```
https://devnet.rpc.orbitflare.com?api_key=YOUR_API_KEY
```

> [!WARNING]
>
> The Devnet endpoint connects to the Solana Devnet. Do not use it for production workloads. Devnet tokens have no monetary value.

## Rate Limits by Plan

Each plan defines a maximum number of **requests per second (RPS)** and **transactions per second (TPS)**.

| Plan | Requests per Second (RPS) | Transactions per Second (TPS) |
| - | :-: | :-: |
| Free | 10 | 1 |
| Developer | 50 | 10 |
| Growth | 200 | 75 |
| Scale | 400 | 150 |
| Pro | 600 | 200 |
| Dedicated | Unlimited | Unlimited |

> [accordion] What happens if I exceed my rate limit?
>
> Requests that exceed your plan's RPS or TPS limit will receive an HTTP `429 Too Many Requests` response. Implement exponential backoff in your client to handle these gracefully.

> [accordion] Are there monthly credit or request caps?
>
> No. OrbitFlare does not impose monthly credit limits or request caps. You can send unlimited total requests within your plan's per-second rate limit.

> [!NOTE]
>
> OrbitFlare plans have **no credit limits** -- you can make unlimited requests as long as you stay within your plan's per-second rate tier. There are no surprise overage charges.

### Archival requests

Requests that have to read historical data from the archive, such as [getTransactionsForAddress](https://docs.orbitflare.com/fetching-data/getTransactionsForAddress.md) calls that reach it, have a separate limit of **10% of your plan's RPS**.

| Plan | Archival RPS |
| - | :-: |
| Free | 1 |
| Developer | 5 |
| Growth | 20 |
| Scale | 40 |
| Pro | 60 |

Going over it returns HTTP `429` with the message `archival rate limit exceeded`.

## Data Streaming Connection Limits

Connection limits apply independently of your RPC rate limit tier and are enforced per IP address.

### Jetstream

| Limit | Value |
| - | - |
| Concurrent connections per IP, per region | **25** |
| Streams per connection | **20** |
| Idle connection timeout | 10 minutes (use ping to keep alive) |

Each regional endpoint counts its own connections: 25 Jetstream connections to Amsterdam do not stop you from opening more to Frankfurt or New York. The [OrbitFlare SDKs](https://docs.orbitflare.com/sdk/overview.md) open one connection per stream, so each SDK stream counts toward the 25.

**What happens when a limit is exceeded**

* **Too many connections:** Jetstream resets a new connection before the gRPC handshake, which clients report as `UNAVAILABLE` (`connection reset by peer`). Close unused streams before opening new ones, and back off exponentially when reconnecting.
* **Too many streams on one connection:** the 21st stream is refused with `REFUSED_STREAM`. Some clients, including grpc-go, queue it until another stream on the connection closes.

### Yellowstone

| Limit | Value |
| - | - |
| Concurrent connections per IP, per region | **5** |
| Streams per connection | **20** |
| Pubkeys per filter | **600** |
| Idle connection timeout | 10 minutes (use ping to keep alive) |

Connections are counted per regional endpoint, like Jetstream.

Yellowstone also caps each list in a single filter:

| Filter field | Max pubkeys |
| - | :-: |
| Transactions `account_include` | 600 |
| Transactions `account_exclude` | 50 |
| Transactions `account_required` | 50 |
| Accounts `account` | 600 |
| Accounts `owner` | 100 |

The caps are per filter, so a request with two transaction filters of 400 pubkeys each is accepted.

> [!NOTE]
>
> The [OrbitFlare SDKs](https://docs.orbitflare.com/sdk/overview.md) open one connection per stream, so with Yellowstone you can run at most 5 SDK streams from one IP per region. Put several named filters on one stream, or change them on the open stream, instead of opening a stream per filter. Dedicated gRPC nodes are not subject to the shared limits. If you need more, contact the team about a dedicated gRPC node.

**What happens when a limit is exceeded**

* **Too many streams on one connection:** the 21st stream is refused with `REFUSED_STREAM`.
* **Too many pubkeys:** Yellowstone rejects the subscription with `INVALID_ARGUMENT`, for example `failed to create filter: Max amount of Pubkeys reached, only 600 allowed`. Retrying the same request fails the same way, so the SDKs end the stream with this error instead of reconnecting.

### Keeping gRPC connections alive

Cloud load balancers and proxies (including Cloudflare) may close idle Jetstream and Yellowstone streams after \~10 minutes. The OrbitFlare SDKs ping the stream every 10 seconds and send HTTP/2 keepalive pings every 20 seconds on their own. With your own client, send a ping every 30 seconds to prevent disconnection:

```typescript theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
const pingRequest: SubscribeRequest = {
  ping: { id: 1 },
  accounts: {},
  accountsDataSlice: [],
  transactions: {},
  transactionsStatus: {},
  blocks: {},
  blocksMeta: {},
  slots: {},
  entry: {},
};

setInterval(() => {
  stream.write(pingRequest, (err) => {
    if (err) console.error("Ping failed:", err);
  });
}, 30_000);
```

### WebSocket

| Limit | Value |
| - | - |
| Concurrent connections per IP | **50** |
| Subscriptions per connection | Varies by plan |
| Idle connection timeout | Several minutes without traffic (send ping frames every 20 to 30 seconds) |

WebSocket connections are limited to 50 concurrent connections per IP. Idle connections are dropped after several minutes without traffic, with close code `1006` and no close frame. Send a WebSocket ping frame every 20 to 30 seconds to keep them open. See [WebSocket debugging](https://docs.orbitflare.com/troubleshooting/websocket.md).

**What happens when the limit is exceeded**

New WebSocket connections attempted beyond the limit are rejected with a `1008 Policy Violation` close code:

```
WebSocket closed: 1008 Policy Violation - connection limit exceeded
```

> [accordion] Can I increase my connection limit?
>
> The gRPC limits (25 Jetstream and 5 Yellowstone connections) and the 50 WebSocket connections apply to all shared plans. If your workload requires more concurrent streaming connections, a **Dedicated gRPC Node** or **Dedicated RPC Node** removes the shared limit entirely. Contact the team on [Discord](https://discord.gg/orbitflare) to discuss options.

> [accordion] Is the limit per region or global?
>
> gRPC connections are counted per regional endpoint: one IP can hold 25 Jetstream connections to Frankfurt and another 25 to New York. WebSocket connections are counted globally per IP across all regions, so 30 connections to Frankfurt and 20 to New York reach the 50-connection cap.

> [accordion] How should I handle reconnection?
>
> Use exponential backoff when reconnecting after a connection error. Start with a 1-second delay, doubling on each failed attempt up to a maximum of 30 seconds. Always close streams cleanly before reconnecting to avoid exhausting your connection quota.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.