Skip to main content

Documentation Index

Fetch the complete documentation index at: https://goldrush.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

GoldRush JSON-RPC authenticates every request by an Authorization: Bearer <key> HTTP header. Your API key never appears in the URL, keeping it out of server logs, browser history, screenshots, and error reports. This matches the pattern used across the rest of the GoldRush product family. The same GoldRush API key works across every GoldRush product: Foundational, Streaming, Pipeline, Hyperliquid, x402, and JSON-RPC. One key, every product.

The header

Authorization: Bearer cqt_xxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: application/json
Content-Type: application/json is required: JSON-RPC payloads are always JSON.

Per-library setup

viem, ethers, web3.js, and web3.py all support custom request headers, but the boilerplate differs slightly between them. Copy whichever one applies.
import { ethers } from "ethers";

const url = "https://rpc.goldrushdata.com/v1/eth-mainnet";
const fetchReq = new ethers.FetchRequest(url);
fetchReq.setHeader("Authorization", `Bearer ${process.env.GOLDRUSH_API_KEY}`);

const provider = new ethers.JsonRpcProvider(fetchReq);

Error responses

Authentication and credit failures return the standard JSON-RPC error envelope with an HTTP status code matching the failure mode.
HTTPJSON-RPC codeMeaningResolution
401 Unauthorized-32001Missing or malformed Authorization headerAdd the Authorization: Bearer <key> header
403 Forbidden-32002Key is valid but lacks JSON-RPC entitlementContact support to enable JSON-RPC
402 Payment Required-32003Insufficient creditsTop up your credit balance
429 Too Many Requests-32005Rate limit exceededBack off and retry after Retry-After
Example failure body:
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32001,
    "message": "missing or invalid Authorization header"
  }
}

Rotating keys

Generate a new key in the GoldRush dashboard, update your environment variable, and revoke the old one. There is no per-product key rotation: rotating once cycles the key for every GoldRush product.
For zero-downtime rotation, set both the old and new key as accepted in your config, deploy with the new key, then revoke the old key once traffic has cut over.

Quickstart

Make your first call.

Pricing

Per-method credit rates for the Edge tier.