Getting Started with the GoldRush API¶
Introduction¶
GoldRush, formerly known as Covalent, provides structured blockchain data APIs for developers building wallets, dashboards, analytics, and automation tooling. Instead of stitching data from many RPC calls, you can query balances, transactions, token transfers, logs, and chain metadata through REST endpoints.
On Moonbeam networks, GoldRush can be used to read both historical and current on-chain data for Moonbeam, Moonriver, and Moonbase Alpha. This page is a concise integration guide focused on the most common setup values and endpoint groups.
Quick Start¶
To begin using GoldRush, create an API key from the GoldRush dashboard. Requests use the base URL:
https://api.covalenthq.com/v1/
Use the following network values in path parameters:
| Parameter | Value |
|---|---|
chainName | moonbeam-mainnet |
chainID | 1284 |
| Parameter | Value |
|---|---|
chainName | moonbeam-moonriver |
chainID | 1285 |
| Parameter | Value |
|---|---|
chainName | moonbeam-moonbase-alpha |
chainID | 1287 |
API Usage¶
The following examples show typical request patterns for Moonbeam and Moonriver. Replace INSERT_API_KEY with your GoldRush key and INSERT_WALLET_ADDRESS with a wallet address for your use case. You can use GoldRush through direct HTTP requests or through the TypeScript SDK, which wraps the same API endpoints.
Direct API Calls (curl)¶
Use these curl requests to quickly validate connectivity and response format before integrating in an application.
curl -X GET "https://api.covalenthq.com/v1/moonbeam-mainnet/address/INSERT_WALLET_ADDRESS/balances_v2/?key=INSERT_API_KEY"
curl -X GET "https://api.covalenthq.com/v1/moonbeam-moonriver/address/INSERT_WALLET_ADDRESS/balances_v2/?key=INSERT_API_KEY"
TypeScript SDK Usage¶
If you're building a service or frontend, the GoldRush SDK can simplify request construction and response handling.
import { GoldRushClient } from '@covalenthq/client-sdk';
async function main() {
const client = new GoldRushClient('INSERT_API_KEY');
const resp = await client.BalanceService.getTokenBalancesForWalletAddress({
chainName: 'moonbeam-mainnet',
walletAddress: 'INSERT_WALLET_ADDRESS',
});
console.log(resp);
}
main().catch(console.error);
import { GoldRushClient } from '@covalenthq/client-sdk';
async function main() {
const client = new GoldRushClient('INSERT_API_KEY');
const resp = await client.BalanceService.getTokenBalancesForWalletAddress({
chainName: 'moonbeam-moonriver',
walletAddress: 'INSERT_WALLET_ADDRESS',
});
console.log(resp);
}
main().catch(console.error);
Supported Foundational API Categories¶
Moonbeam networks support a broad set of GoldRush Foundational API methods. Commonly used categories are listed in the following sections. For the complete and most current endpoint list, refer to the Foundational API overview and API reference.
Wallet APIs¶
- Get token balances for address
- Get native token balance for address
- Get historical portfolio value over time
- Get ERC-20 token transfers for address
Activity APIs¶
Utility and Explorer APIs¶
Security APIs¶
Additional Resources¶
- GoldRush docs
- GoldRush supported chains
- Moonbeam chain page on GoldRush
- Moonriver chain page on GoldRush
- Moonbase Alpha chain page on GoldRush
| Created: June 9, 2021