Skip to main content

LLM Integration Guide

GoldRush API - LLM Integration Guide (Condensed)

Purpose: Quick reference for LLMs and AI agents to correctly use the GoldRush API, focusing on error prevention and critical validation rules.

Quick Reference

Rate Limits:
  • Free 14 day trial: 25,000 API credits/month, 4 requests/second, no overages
  • Vibe Coding tier: $10/month for 10,000 included API credits, 4 requests/second, overages at $0.001/credit
  • Professional: $250/month for 300,000 included API credits, 50 requests/second, overages at $0.00077/credit
  • x402 (Pay-Per-Request): No subscription required, 100 requests/minute per wallet, pay with stablecoins on Base

Chain Names (CRITICAL)

Chain names use the format: {network}-{environment}. These are case-sensitive and must match exactly.

Supported Chain Names Table

Note: Always use the “Chain Name (API Parameter)” value in API calls. Using common names will result in errors. Chain Support Levels: Chains are categorized into four support levels. See Chain Documentation for complete definitions.
  • Foundational (6 chains) - Full feature parity including historical balances, token holders at any block, and DEX spot prices
  • Frontier (28 chains) - Core features with expanding coverage; includes all non-EVM chains
  • Community (14 chains) - Growing integration with all core onchain data
  • Archived (5 chains) - Limited data availability, no live data

Parameter Naming Convention

GoldRush uses different naming conventions depending on the context:

Parameter Mapping (SDK ↔ REST API)


Input Validation Rules

Ethereum Addresses

  • Format: 0x followed by 40 hexadecimal characters
  • Regex: ^0x[a-fA-F0-9]{40}$
  • Case: Insensitive (both 0xabc... and 0xABC... are valid)
  • Special Values: Also accepts ENS names (e.g., vitalik.eth), RNS, Lens Handles, Unstoppable Domains
Examples:
  • ✅ Valid: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
  • ✅ Valid: vitalik.eth
  • ❌ Invalid: d8dA6BF26964aF9D7eEd9e03E53415D37aA96045 (missing 0x)
  • ❌ Invalid: 0xd8dA6BF (too short)

Chain Names

  • Format: Exact match from supported chains table (case-sensitive)
Examples:
  • ✅ Valid: eth-mainnet
  • ❌ Invalid: ethereum (use eth-mainnet)
  • ❌ Invalid: Eth-Mainnet (case-sensitive)
  • ❌ Invalid: eth_mainnet (use hyphen, not underscore)

Block Heights

  • Type: Integer ≥ 0
  • Special Value: "latest" for current block
  • Maximum: Current chain height (varies by chain)
Examples:
  • ✅ Valid: 12345678
  • ✅ Valid: latest
  • ❌ Invalid: -1

Quote Currency

  • Type: String (case-insensitive)
  • Supported Values: USD, CAD, EUR, SGD, INR, JPY, VND, CNY, KRW, RUB, TRY, NGN, ARS, AUD, CHF, GBP
  • Default: USD

Pagination

  • Page Numbers: 0-indexed (first page is 0)
  • Page Size: 100 items per page (default, not configurable for most endpoints)
  • End Detection:
    • If returned page has < 100 items, it’s the last page
    • Check has_more field in response (where available)
    • Use links.next for next page URL (where available)

Understanding Balance Fields

Field Explanations:
  • balance: Raw token amount as string (to handle large numbers/BigInt). This is NOT the human-readable value.
  • contract_decimals: Number of decimal places for this token
  • quote_rate: Current price of 1 token in quote currency (e.g., USD)
  • quote: Total value of this token holding in quote currency
  • pretty_quote: Formatted currency string for display
To get human-readable balance:

Understanding Transaction Fields

Field Explanations:
  • successful: Boolean indicating if transaction succeeded
  • value: Amount of native token transferred (as string, in wei for EVM chains)
  • gas_spent: Actual gas units consumed
  • gas_price: Gas price in wei (for EVM chains)
  • fees_paid: Total fee in wei (gas_spent × gas_price)
  • gas_quote: Total fee in quote currency (e.g., USD)
  • gas_quote_rate: Native token price used for conversion

Error Responses

All error responses follow this schema:

Common Error Codes


Best Practices for LLMs

1. Always Validate Chain Names

2. Handle BigInt Balance Values Correctly

3. Implement Pagination Properly

4. Use Appropriate Error Handling


Common Mistakes to Avoid

❌ Using Wrong Chain Name Format

❌ Treating Balance as Number

❌ Forgetting to Check Error Response

❌ Not Handling Pagination

❌ Missing Bearer Prefix in Authorization

❌ Using HTTP Instead of HTTPS


Frequently Asked Questions (LLM-Specific)

Q: How do I convert balance to human-readable format?

A: Divide the balance string by 10^contract_decimals:

Q: What’s the difference between quote and quote_rate?

A:
  • quote_rate: Price of 1 token in quote currency (e.g., $2,500.50 per ETH)
  • quote: Total value of the balance in quote currency (balance × quote_rate)

Q: How do I know which chains support internal transactions?

A: Only Foundational chains support tracing features (with-internal, with-state, with-input-data). Currently, only eth-mainnet fully supports all tracing features. Check the endpoint documentation for “Foundational Chains” support.

Q: How do I handle ENS names?

A: Just pass the ENS name directly as the wallet address. GoldRush automatically resolves it:

Q: What’s the difference between balances_v2 and balances_native?

A:
  • balances_v2: Returns ALL tokens (native + ERC20 + NFTs)
  • balances_native: Returns ONLY the native token (ETH, MATIC, etc.)
Use balances_native for lightweight queries when you only need the native token balance.

Q: How do I filter out spam tokens?

A: Use the no-spam query parameter:

Q: When should I use the SDK vs direct REST calls?

A:
  • Use SDK: TypeScript/JavaScript projects, automatic pagination, type safety
  • Use REST: Python, Go, or any other language; curl testing; maximum flexibility

Q: How often does data update?

A:
  • Real-time endpoints: 30 seconds or 2 blocks (whichever is faster)
  • Historical data: Indexed from genesis block
  • NFT metadata: Cached, use with-uncached=true to force refresh

Quick Reference: Endpoint URL Patterns


Additional Resources


System Prompt Suggestion for AI Agents

When building AI agents that use GoldRush API, include this in your system prompt:

Last Updated: January 2025 API Version: v1 Documentation Version: 2.0 (LLM-Optimized Condensed)

Error Handling & Troubleshooting

The GoldRush Foundational API (REST) returns structured errors when something goes wrong. This page is the single reference for understanding error codes, handling rate limits, implementing retries, and debugging common issues.
Note: Failed requests are free. No API credits are deducted for any response outside the 2xx range, whatever the cause. A 429, a 501, a 556 and a 500 all cost you nothing, so a retry is never a billing risk.
Retries do still count against your rate limit, which is why the guidance below is about backing off correctly rather than about cost.

Standard and GoldRush-specific codes

Not every code this API returns is a registered HTTP status code. It is worth knowing which is which, because off-the-shelf HTTP clients, proxies and monitoring tools only understand the registered ones and will usually flatten the rest into a generic “5xx”. Standard HTTP codes: 400 401 402 403 404 406 410 416 429 500 501 503 504 507 Registered status codes. Several carry a GoldRush-specific meaning, noted in the table below. GoldRush-specific codes: 452 551 552 554 556 557 558 561 562 563 565 567 570 Not registered HTTP status codes. Specific to the GoldRush API. Match on the exact number, not on the 5xx class.

The error response body

Every error the API itself generates uses the same envelope as a successful response, with data set to null:
Three things to note:
  • error_code is a JSON number, not a string. Compare it with 501, not "501".
  • error_code always equals the HTTP status code, so you can branch on either one.
  • error_message carries the specific reason. Two requests can share a status code and mean entirely different things, so log the message as well as the code.
The one exception is a bare 500, which is returned with an empty body. Treat a response that has a 5xx status and no parseable JSON as a 500.
Warning: A request with no Authorization header at all is rejected by the edge proxy, not by the API, and returns an HTML body rather than JSON:
A missing or malformed key sent with the request returns the normal JSON 401. If your client parses every response body as JSON, guard this one case, or check the Content-Type header before parsing.

Standard HTTP status codes

These are all registered HTTP status codes. Where our meaning is narrower or more specific than the generic one, it is spelled out here.

501 is a capability answer, not an outage

A 501 means your request was well-formed and your key was fine, but the chain or endpoint cannot serve that particular thing. It is a stable answer rather than a transient one, so retrying it unchanged will not succeed until that support actually ships. It is returned in three situations:
  • An unsupported chain. Note that an unrecognized chain name returns 501, not 404:
  • A feature flag the chain does not support. Flags such as with-state and with-input-data are only available on chains with the underlying data. The flag is valid, the chain just cannot serve it:
    Rather than discovering this by trial, read the capability flags on /v1/chains/, such as is_internal_tx_supported and is_input_data_supported, and skip the call when the flag is false.
  • An endpoint restricted to certain chains, for example an EVM-only endpoint called on a non-EVM chain.
Note: The gate runs before the identifier is looked up, so a transaction hash that does not exist returns 404 on a chain that supports the flag and 501 on a chain that does not. That makes a throwaway hash a cheap way to test chain support.

GoldRush-specific status codes

Warning: The codes in this section are not registered HTTP status codes. They are specific to the GoldRush API.
They exist so that different backend conditions stay distinguishable instead of collapsing into one generic 500, which is what makes a useful retry policy possible at all. The tradeoff is that generic HTTP tooling does not know them: most clients, proxies and dashboards will report them only as “a 5xx”. Match on the exact number, and if you alert on error classes, give at least 556 and 565 their own treatment. All of these carry the normal JSON error body described above.
Tip: 556 is the one to watch. It means the request was refused on purpose while the backend was under load, not that anything is broken. A burst of 556 is the correct signal to back off; clients that retry it aggressively make the condition worse and last longer.
Note: 565 is short-lived by design. The response is cached for only 10 seconds, because the usual cause is that indexing is a few seconds behind the chain tip. Waiting 10 to 15 seconds and retrying once resolves most occurrences. If a 565 for the same record persists for minutes, raise it on the support page.

What to do with every code

Sorted by what the right response actually is, rather than by number.

Retry with exponential backoff

429, 500, 503, 504, 551, 552, 554, 556, 557, 558, 561, 562, 563, 565, 567 These are transient. The same request may well succeed later. Use the loop in Retry Strategies below, with these adjustments:
  • 557: retry once immediately before backing off. It usually clears on the next attempt.
  • 565: wait at least 10 seconds before the first retry.
  • 562 and 563: recovery depends on a third party, so allow a ceiling of 30 to 60 seconds rather than a few seconds.
  • 429: back off until your request rate is under the limit for your plan. More attempts will not help.

Change the request, then retry

406, 507 The request as sent will keep failing, but a narrower one will succeed. Reduce page-size, shorten the date range, or split the query, then send it again.

Fix something, then retry once

400 fix the parameters. 401 fix the API key. 402 check error_message to see which of the three causes applies, then raise your spending limit, upgrade your plan, or resume your subscription. 452 send an honest User-Agent.

Do not retry

403, 410, 416, 501, 570 These are stable answers, not failures in progress. Retrying returns exactly the same thing. 410 means the endpoint or chain is gone for good, so remove the call and any scheduled job that makes it. 501 means the capability does not exist on that chain, so check /v1/chains/ and skip it. 570 means the contract reverted, which is a real answer about the contract.
Note: None of this costs credits. Error responses are not billed, so the cost of a retry is only the rate limit slot it consumes and the latency it adds. Optimize your retry policy for recovery time and for not amplifying an incident, not for spend.

Rate Limits

The Foundational API enforces rate limits based on your plan tier: Rate limits are enforced per API key and IP address. When you exceed your limit, you’ll receive a 429 Too Many Requests response. Back off and retry using the strategies below.

Retry Strategies

Exponential Backoff with Jitter

Retry on the transient set only, and use exponential backoff with random jitter so that many clients recovering from the same incident do not retry in lockstep. A retry loop written against 429, 500 and 503 alone will miss most of what the API actually returns under load, because the specific codes above are used in preference to a generic 500. Include them explicitly.
TypeScript
Python
Warning: Never put 403, 410, 416, 501 or 570 in a backoff loop. They are stable answers about the request, the chain or the contract, so every attempt returns the same thing while still consuming a rate limit slot. See What to do with every code for the codes that are worth one retry after you fix something.

SDK Built-in Retries

The GoldRush TypeScript Client SDK handles retries and rate limiting automatically - no manual retry logic needed when using the SDK.

Debugging Tips

Verify your API key format

GoldRush API keys follow the pattern cqt_wF... or cqt_rQ... (26 base58 characters after the prefix). Double-check for trailing whitespace or truncation.

Check supported chains

An unsupported or misspelled chain returns 501, not 404, with "Chain not supported." in error_message. A 404 on a chain-scoped path usually means the record was not found, not that the chain is wrong. See Supported Chains for the full list.

Inspect the full error body

Don’t rely on the HTTP status code alone. The JSON response body contains an error_message field with specific details about what went wrong. This matters most for 402 and 501, where one status code covers several unrelated causes that only the message distinguishes.

Test with curl

Isolate issues from your application code by testing directly:

Monitor credit usage

Track your API credit consumption on the GoldRush Platform dashboard to avoid unexpected 402 errors.

Contact support for persistent server-side errors

If you’re consistently hitting 500, 503, or any of the GoldRush-specific 5xx codes after backing off, open a ticket on the GoldRush support page with your API key prefix, the endpoint, the exact error_code and error_message, and timestamps of the failures. The support form asks for the endpoint and chain directly, so filing there routes the issue faster than describing it in free text. Include the exact code. 556 and 565 in particular point at very different causes from a generic 500, and quoting the number shortens the diagnosis considerably.

Quick Reference

Foundational API Auth

API key setup, authentication methods, and SDK usage.

FAQ

Common questions about plans, rate limits, and features.

Supported Chains

Full list of supported blockchains and endpoints.

Frequently Asked Questions

General Questions

What is the GoldRush API?

GoldRush offers the most comprehensive Blockchain Data API suite for developers, analysts, and enterprises.

What can I do with the GoldRush API?

The GoldRush API provides fast, accurate, and developer-friendly access to the essential onchain data for building DeFi dashboards, wallets, trading bots, AI Agents, tax and compliance platforms.

Do I need API keys to use GoldRush?

Yes. The credential you need depends on the product:
  • API key (read-only) - covers the Foundational API, CLI, and x402.
It’s available on the GoldRush platform once you sign up.

If a client asks how to verify that GoldRush API is real-time or low-latency, how can we demonstrate or prove that?

You can demonstrate real-time or low-latency capabilities through:
  • Timestamp validation: Pull /v1/{chain_id}/block_v2/latest/ and compare the block timestamp with the current time (should be sub-second to a few seconds behind depending on chain).
  • Latency benchmarks: Use tools like curl or Postman to measure API response time.

Besides the common 401, 402, and 429 error codes, are there any other error responses we should be aware of?

Yes. Additional error codes include:
  • 400 Bad Request – Invalid parameters or malformed request.
  • 402 Payment Required – Alloted credits exceeded and need to enable Flex Credits or upgrade subscription tier.
  • 403 Forbidden – API key is valid but not authorized for the resource.
  • 404 Not Found – Endpoint or data not available (e.g. unsupported chain).
  • 500 Internal Server Error – Unexpected failure on GoldRush’s side.
  • 503 Service Unavailable – Maintenance or backend issue.
Each error includes a descriptive JSON body for debugging. For a complete guide to error codes, retry strategies, and debugging tips, see Error Handling & Troubleshooting.

Foundational API Questions

What is the rate limit for API calls?

The GoldRush Foundational API enforces rate limits based on the user’s plan:
  • 14-day Free Trial: 4 requests per second (RPS), 25,000 API credits.
  • Vibe Coding Plan ($10/mo): 4 RPS, 10,000 API credits.
  • Professional Plan ($250/mo): 50 RPS, 300,000 API credits.
  • Inner Circle: Custom limits, typically up to 100 RPS or higher, based on SLAs.
Rate limits are enforced per API key and IP, and requests exceeding limits receive a 429 Too Many Requests error. For a complete guide to error codes, retry strategies, and debugging tips, see Error Handling & Troubleshooting.

Which plan is right for me?

Vibe Coding Plan ($10/mo) is built for:
  • Solo founders and indie hackers shipping fast
  • Hackathon teams and weekend projects
  • AI-native builders using Cursor, Windsurf, or Claude
  • Prototyping and validating ideas before scaling
Professional Plan ($250/mo) is built for:
  • Teams building production applications
  • Apps that need higher rate limits (50 RPS)
  • Projects requiring priority support
  • Companies with compliance or reliability requirements
You can start with Vibe Coding and upgrade to Professional as your project scales. For a full breakdown of plans, the free trial, and credit-based GoldRush API pricing, see the pricing page.

Can I upgrade from Vibe Coding to Professional?

Yes. You can upgrade at any time from the GoldRush platform. Your API key stays the same, so no code changes are needed.

Does GoldRush support Hyperliquid?

Yes. GoldRush supports Hyperliquid’s native chain (HyperCore) with zero rate limits. You can stream real-time fills, liquidations, funding rates, vault actions, delegations, deposits, withdrawals, and OHLCV pricing data for all Hyperliquid markets - including data not available through the public Hyperliquid API. GoldRush runs dedicated Hyperliquid nodes in Tokyo with a private backbone for low-latency data ingestion. See the HyperCore chain page for full details and code examples.

What are Redstone Bolt price feeds?

Redstone Bolt provides ultra-low-latency CEX price data for 9 major tokens on MegaETH, including BTC, ETH, SOL, BNB, XRP, ADA, DOGE, USDT, and USDC. Prices are updated every 2.4 ms (~400 updates/sec), sourced from Binance, Coinbase, OKX, Bitget, and Kraken via Bolt nodes co-located with MegaETH sequencer infrastructure. Bolt-powered feeds use the REDSTONE- prefix (e.g. REDSTONE-BTC, REDSTONE-ETH).

Not finding answers?

  • Error Handling & Troubleshooting — Debug issues and retry strategies
  • What is GoldRush — Understand the core platform
  • GoldRush SDKs & CLI — Get started with code
  • Powered by GoldRush — See real-world examples