# FastGate RPC

FastGate RPC is a high-performance Solana RPC endpoint optimized for account queries. It provides low-latency responses for `getProgramAccounts` and related methods.

## Supported Methods

| Method                         | Description                           |
| ------------------------------ | ------------------------------------- |
| `getProgramAccounts`           | Get all accounts owned by a program   |
| `getProgramAccountsV2`         | Paginated version with cursor support |
| `getMultipleAccounts`          | Get multiple accounts by pubkey       |
| `getTokenAccountsByOwner`      | Get SPL token accounts for a wallet   |
| `getTokenAccountsByOwnerV2`    | Paginated version with cursor support |
| `getTokenAccountsByDelegate`   | Get delegated SPL token accounts      |
| `getTokenAccountsByDelegateV2` | Paginated version with cursor support |
| `getTokenLargestAccounts`      | Get top 20 token holders for a mint   |
| `getLargestAccounts`           | Get top 20 accounts by lamports       |

## Endpoint

```
POST https://rpc.thornode.io/
Content-Type: application/json
```

## Authentication

Requests require IP allowlist authentication. See the Authentication section.

## Encoding

| Encoding      | Description                                        |
| ------------- | -------------------------------------------------- |
| `base64`      | Default. Standard base64                           |
| `base58`      | Base58 encoding                                    |
| `base64+zstd` | Zstd-compressed, base64-encoded (smallest payload) |

## REST Endpoint

A REST interface is also available:

```
GET /getProgramAccounts/{programId}?encoding=base64&limit=100&after=<pubkey>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thornode.io/infrastructure/fastgate-rpc.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
