---
name: Chainstack
description: Use when deploying blockchain nodes, managing RPC endpoints, making JSON-RPC API calls, querying blockchain data, managing infrastructure via the platform API, or building Web3 applications across 70+ blockchain networks.
metadata:
    mintlify-proj: chainstack
    version: "1.0"
---

# Chainstack Skill

## Product summary

Chainstack is a managed blockchain node platform supporting 70+ chains (Ethereum, Solana, Bitcoin, Polygon, Arbitrum, Base, TON, and many others). Agents use Chainstack to deploy RPC nodes, access blockchain data via JSON-RPC APIs, manage infrastructure programmatically, and build Web3 applications. Key resources: **Platform console** at https://console.chainstack.com, **Platform API** at https://api.chainstack.com/v1, **Node endpoints** (HTTPS/WSS/gRPC formats), **API keys** for authentication, and **Request Units (RUs)** for billing. Primary docs: https://docs.chainstack.com.

## When to use

Reach for this skill when:
- **Deploying nodes**: Creating RPC endpoints for specific blockchains (Ethereum, Solana, Polygon, etc.)
- **Making blockchain queries**: Calling JSON-RPC methods (eth_blockNumber, getBalance, etc.) or protocol-specific methods
- **Managing infrastructure**: Creating projects, networks, nodes, or monitoring usage via the platform API
- **Building Web3 apps**: Integrating Chainstack endpoints into dApps, bots, or data pipelines
- **Real-time data**: Setting up WebSocket subscriptions for blocks, transactions, or logs
- **Multi-chain work**: Accessing multiple blockchains from a single managed platform
- **Debugging blockchain issues**: Using debug/trace APIs or checking node metrics and request logs

## Quick reference

### Node endpoint formats

| Type | Format | Auth |
|------|--------|------|
| HTTPS | `https://nd-123-456.p2pify.com/KEY` | Key in URL or basic auth |
| WSS | `wss://ws-nd-123-456.p2pify.com/KEY` | Key in URL or basic auth |
| gRPC | `sui-mainnet.core.chainstack.com:443` | x-token in metadata |

### Platform API authentication

```bash
curl -X GET 'https://api.chainstack.com/v1/organization/' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

### Common JSON-RPC calls

```bash
# Get block number
curl -X POST "YOUR_ENDPOINT" \
  -H 'Content-Type: application/json' \
  --data '{"method":"eth_blockNumber","jsonrpc":"2.0","params":[],"id":1}'

# Get balance
curl -X POST "YOUR_ENDPOINT" \
  -H 'Content-Type: application/json' \
  --data '{"method":"eth_getBalance","jsonrpc":"2.0","params":["0xaddress","latest"],"id":1}'
```

### Request Units (RUs) pricing

| Request Type | Cost |
|--------------|------|
| Full node (latest state) | 1 RU |
| Archive state (historical) | 2 RUs |
| Debug/trace methods | 2 RUs |
| Solana archive (beyond 1.5 days) | 2 RUs |

### Node types available

- **Global Elastic Node**: High-performance, auto-scaling, global distribution
- **Unlimited Node**: Full archive data, unlimited requests
- **Dedicated Node**: Custom resource allocation
- **Trader Node**: Optimized for trading (Solana, Ethereum, BNB)

## Decision guidance

| Scenario | Use This | Why |
|----------|----------|-----|
| Need real-time block updates | WebSocket (WSS) | Lower latency, subscriptions |
| Querying historical state | Archive node | Full node won't have old data |
| High-frequency trading | Trader Node | Optimized for speed and MEV |
| Cost-sensitive queries | Full node (latest) | 1 RU vs 2 RU for archive |
| Multi-chain app | Single Chainstack account | Manage all chains from one console |
| Debug transaction execution | debug_trace* methods | Requires archive node (2 RU) |
| Monitoring dApp usage | Platform API + metrics | Track requests, method calls, response codes |

## Workflow

1. **Set up infrastructure**
   - Sign up at https://console.chainstack.com
   - Create a project (organizes networks and nodes)
   - Join or create a network (e.g., Ethereum Mainnet)
   - Deploy a node (choose type: Global, Unlimited, Dedicated, Trader)
   - Copy endpoint credentials (HTTPS, WSS, or gRPC)

2. **Authenticate requests**
   - For blockchain APIs: Use key-protected URL or basic auth (username:password)
   - For platform API: Generate API key in console, pass as `Authorization: Bearer KEY` header
   - Store credentials in environment variables, never hardcode

3. **Make blockchain queries**
   - Use curl, Postman, or Web3 library (web3.js, ethers.js, web3.py)
   - Send JSON-RPC POST requests to your endpoint
   - Check response for `result` (success) or `error` (failure)
   - Monitor RU consumption in console metrics

4. **Handle subscriptions (WebSocket)**
   - Connect to WSS endpoint
   - Subscribe to `newHeads` (blocks), `newPendingTransactions`, or `logs`
   - Implement reconnect logic (auto-reconnect with backoff)
   - Unsubscribe when done to free resources

5. **Manage via platform API**
   - Create/list/update projects and nodes programmatically
   - Query organization info and billing
   - Monitor node status and metrics
   - Rotate API keys regularly

6. **Monitor and optimize**
   - Check node metrics (requests, method calls, response codes)
   - Review RU usage to control costs
   - Set billing thresholds to avoid overages
   - Use debug/trace APIs sparingly (2 RU each)

## Common gotchas

- **Archive state threshold**: Methods like `eth_getBalance` on blocks older than ~128 blocks cost 2 RU, not 1. Check the exact threshold for your network.
- **WebSocket connection drops**: Implement auto-reconnect with exponential backoff; don't rely on persistent connections without retry logic.
- **API key exposure**: Never commit API keys to version control. Use `.env` files and environment variables. Rotate keys regularly.
- **Rate limits on Hyperliquid**: Different limits apply (1200 weight/min for REST, 100 req/min for EVM). Check protocol-specific limits before scaling.
- **Solana archive availability**: Only specific methods can fetch archive data beyond 1.5 days. Check the limits page for which methods support archive.
- **Debug/trace methods require archive**: If your node is full-only, debug_trace* calls will fail. Deploy an archive node or use Unlimited Node.
- **gRPC auth is different**: gRPC uses x-token in request metadata, not URL-based auth. Check the protocol-specific docs.
- **Pending block state**: `eth_call` with `pending` block may not work on all nodes. Use `latest` for reliability.
- **Filter not found errors**: Filters expire after ~5 minutes of inactivity. Recreate filters if you get "filter not found" errors.
- **Batch requests**: Batch multiple JSON-RPC calls in a single POST to reduce overhead, but check size limits.

## Verification checklist

Before submitting work:

- [ ] Node is deployed and status shows "Running" in console
- [ ] Endpoint credentials are copied correctly (no typos in URL or auth)
- [ ] API key is stored in environment variable, not hardcoded
- [ ] JSON-RPC request has correct `method`, `params`, `jsonrpc: "2.0"`, and `id`
- [ ] WebSocket subscriptions include reconnect logic
- [ ] Archive queries are routed to archive node (not full node)
- [ ] Debug/trace methods are only called on archive nodes
- [ ] Error responses are parsed and logged (not silently ignored)
- [ ] RU consumption is monitored (check metrics in console)
- [ ] Billing thresholds are set to prevent surprise charges
- [ ] API keys are rotated periodically and old keys are revoked

## Resources

- **Comprehensive navigation**: https://docs.chainstack.com/llms.txt (page-by-page listing for agent reference)
- **Platform API reference**: https://docs.chainstack.com/reference/platform-api-getting-started
- **Blockchain APIs overview**: https://docs.chainstack.com/reference/blockchain-apis
- **Authentication guide**: https://docs.chainstack.com/docs/authentication-methods-for-different-scenarios
- **Request Units pricing**: https://docs.chainstack.com/docs/request-units
- **Error handling best practices**: https://docs.chainstack.com/docs/best-practices-for-error-handling-in-api-requests

---

> For additional documentation and navigation, see: https://docs.chainstack.com/llms.txt