> ## 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.

# Polygon RPC Nodes

> Polygon PoS RPC and WebSocket endpoints on OrbitFlare, with plans from 25 to 1000 RPS, gRPC and archival data on every tier, and dedicated instances.

## Overview

OrbitFlare provides Polygon PoS RPC infrastructure for DeFi protocols, gaming, and production applications. Endpoints are region-pinned and authenticated with the same license key as your other OrbitFlare services. Every plan includes RPC, WebSockets, gRPC access, and archival data.

Polygon is EVM-compatible, so the JSON-RPC surface is the standard `eth_*` API.

## Endpoint

| Region    | Region Code | Endpoint                                               |
| --------- | ----------- | ------------------------------------------------------ |
| Amsterdam | `ams`       | `https://ams.poly.orbitflare.com?api_key=YOUR_API_KEY` |

The general form matches the rest of the platform:

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

<Note>
  Polygon endpoints are separate from the Solana endpoints documented in [Authentication & Limits](/authentication). Solana uses `{region}.rpc.orbitflare.com`; Polygon uses `{region}.poly.orbitflare.com`.
</Note>

## Authentication

Append your license key as a query parameter, exactly as with the Solana RPC endpoints:

```bash theme={null}
curl -X POST "https://ams.poly.orbitflare.com?api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_blockNumber"
  }'
```

<Tip>
  Your license key is in the **Licenses** section of your [OrbitFlare Dashboard](https://orbitflare.com/dashboard).
</Tip>

## Making RPC Calls

Polygon uses the same JSON-RPC 2.0 format as Ethereum. Pass `Content-Type: application/json` with a POST body:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ams.poly.orbitflare.com?api_key=YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "method": "eth_blockNumber",
      "params": [],
      "id": 1
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://ams.poly.orbitflare.com?api_key=YOUR_API_KEY",
    {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({
        jsonrpc: "2.0",
        method: "eth_blockNumber",
        params: [],
        id: 1,
      }),
    }
  );
  const data = await response.json();
  console.log("Latest block:", parseInt(data.result, 16));
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://ams.poly.orbitflare.com?api_key=YOUR_API_KEY",
      headers={"Content-Type": "application/json"},
      json={
          "jsonrpc": "2.0",
          "method": "eth_blockNumber",
          "params": [],
          "id": 1,
      },
  )
  data = response.json()
  print("Latest block:", int(data["result"], 16))
  ```
</CodeGroup>

## WebSocket Subscriptions

Real-time subscriptions use the `wss://` scheme with the same host and the same `api_key` parameter:

```javascript theme={null}
const ws = new WebSocket(
  "wss://ams.poly.orbitflare.com?api_key=YOUR_API_KEY"
);

ws.on("open", () => {
  ws.send(JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "eth_subscribe",
    params: ["newHeads"],
  }));
});

ws.on("message", (data) => {
  const msg = JSON.parse(data);
  console.log("New block header:", msg.params?.result);
});
```

## Plans

Throughput scales by plan. RPC, WebSockets, gRPC access, and archival data are included on every tier, and there are no monthly credit or request caps.

| Plan        | Price    | Requests / Second |
| ----------- | -------- | :---------------: |
| Free        | \$0/mo   |         25        |
| Starter     | \$49/mo  |        100        |
| Growth      | \$149/mo |        300        |
| Pro         | \$299/mo |        600        |
| Performance | \$499/mo |       1,000       |

<AccordionGroup>
  <Accordion title="What happens if I exceed my rate limit?">
    Requests over your plan's RPS limit receive an HTTP `429 Too Many Requests` response. Implement exponential backoff in your client to handle these gracefully.
  </Accordion>

  <Accordion title="Are there monthly credit caps?">
    No. You can send unlimited total requests as long as you stay within your plan's per-second rate.
  </Accordion>
</AccordionGroup>

## Dedicated Instances

For isolated, high-throughput workloads, OrbitFlare also offers dedicated Polygon nodes:

| Feature           | Details                                           |
| ----------------- | ------------------------------------------------- |
| **Throughput**    | Custom, unmetered                                 |
| **Hardware**      | 100% dedicated resources, isolated environment    |
| **Configuration** | Custom node configs and parameters                |
| **SLA**           | Custom uptime and response terms                  |
| **Support**       | Priority engineering support                      |
| **Pricing**       | Custom quote based on throughput, region, and SLA |

<Note>
  Dedicated Polygon infrastructure is quoted per deployment. [Contact sales](mailto:sales@orbitflare.com) to discuss throughput, region, and SLA requirements.
</Note>

## Supported Methods

Polygon endpoints expose the standard EVM JSON-RPC API, including:

| Category         | Methods                                                                           |
| ---------------- | --------------------------------------------------------------------------------- |
| **Blocks**       | `eth_blockNumber`, `eth_getBlockByHash`, `eth_getBlockByNumber`                   |
| **Transactions** | `eth_sendRawTransaction`, `eth_getTransactionByHash`, `eth_getTransactionReceipt` |
| **Accounts**     | `eth_getBalance`, `eth_getCode`, `eth_getStorageAt`, `eth_getTransactionCount`    |
| **Contracts**    | `eth_call`, `eth_estimateGas`, `eth_getLogs`                                      |
| **Network**      | `net_version`, `eth_chainId`, `eth_gasPrice`, `eth_feeHistory`                    |
| **WebSocket**    | `eth_subscribe` (newHeads, logs, newPendingTransactions)                          |

<Note>
  Polygon PoS uses `chainId: 137` for mainnet and `chainId: 80002` for the Amoy testnet.
</Note>

## Rate Limits and Quotas

These limits apply to all OrbitFlare EVM chains (Robinhood, Polygon, BSC). They are enforced per license, and HTTP and WebSocket traffic on the same key share a single rate limit and in-flight budget.

| Control                                | Free       | Paid          |
| -------------------------------------- | ---------- | ------------- |
| Requests / second                      | plan RPS   | plan RPS      |
| Batch size (HTTP + WS)                 | 1 item     | 100 items     |
| `eth_getLogs` in flight                | 1          | 10            |
| `eth_getLogs` block range              | 150 blocks | 10,000 blocks |
| `debug_*` / `trace_*` methods          | blocked    | allowed       |
| WebSocket connections                  | 1          | from 10       |
| Subscriptions per WebSocket connection | 5          | 25            |
| `logs` subscription without a filter   | refused    | allowed       |
| WebSocket data per connection          | 1 GiB      | unlimited     |

Applies to both tiers: WebSocket connection lifetime of 24 hours; idle timeout of 30 minutes with no data frames; frame size of 4 MiB inbound and 32 MiB outbound; each batch item counts as one request.

### Error Codes

| HTTP | JSON-RPC | Meaning                                                          |
| ---- | -------- | ---------------------------------------------------------------- |
| 429  | `-32429` | Rate limit exceeded                                              |
| 429  | `-32005` | Concurrent, batch, connection, or subscription limit exceeded    |
| 400  | `-32602` | `eth_getLogs` block range too large (the message names the span) |
| 403  | `-32601` | Method not available on this plan                                |
| 403  | `-32406` | WebSockets not enabled for this key                              |

<Note>
  `-32005` and `-32429` are transient. Retry with exponential backoff. If `-32005` persists on isolated calls, another client is likely using the same key concurrently, since HTTP and WebSocket share one in-flight budget.
</Note>

## Get Started

<CardGroup cols={2}>
  <Card title="Authentication & Limits" icon="key" href="/authentication">
    How API keys work, endpoint formats, rate limits, and error semantics.
  </Card>

  <Card title="Contact Sales" icon="envelope" href="mailto:sales@orbitflare.com">
    Talk to the OrbitFlare team about dedicated Polygon instances and enterprise terms.
  </Card>
</CardGroup>
