Supported ChainCosmos Hub
Cosmos Hub API
Access Cosmos Hub blockchain data through the Spectrum API. Cosmos Hub is the central chain of the Cosmos ecosystem, built on the Cosmos SDK and Tendermint/CometBFT consensus. Spectrum exposes Cosmos data through both the chain’s RPC and REST (LCD) endpoints, surfaced through Spectrum’s normalized JSON-RPC envelope.
| Property | Value |
|---|---|
| Slug | cosmoshub |
| Type | Cosmos SDK |
| Native Token | ATOM |
| Address Format | Bech32 (cosmos1..., cosmosvaloper1..., cosmosvalcons1...) |
Available methods
Cosmos Hub supports a Cosmos SDK-shaped subset of the API. EVM-specific endpoints (logs, transfers, contract reads, ERC-20 metadata, ENS, NFTs, gas estimation, simulateCall) are not available.
| Method | Description |
|---|---|
| getBlockHeight | Latest Cosmos Hub block height |
| getBlockByNumber | Block by height |
| getBlockByHash | Block by hash |
| getBlockTransactions | Decoded transactions in a block (sdk 0.50+ LCD txs/block/{n}) |
| getTransactionByHash | Transaction lookup by hash |
| getReceipt | Transaction receipt (decoded tx_response) |
| getBalance | Native ATOM balance |
| getTokenBalance | IBC / native denom balance |
| getDenomSupply | Total supply for a denom |
| getTokenMetadata | Denom metadata from the bank module |
| getAccount | Account info (account number, sequence, pubkey) |
| getDelegations | Active delegations for a delegator |
| getUnbondingDelegations | Unbonding delegations |
| getStakingRewards | Outstanding staking rewards |
| getValidators | Validator set |
| getValidator | Single validator lookup |
| getStakingPool | Staking pool (bonded / not-bonded totals) |
| rpcProxy | Raw Tendermint / LCD passthrough |
| getChainHealth | Cosmos Hub node health check |
Quick start
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \ -H "Content-Type: application/json" \
{ "jsonrpc": "2.0", "method": "getBlockHeight", "params": { "chain": "cosmoshub" }, "id": 1 }
{
"jsonrpc": "2.0",
"result": {
"chain": "cosmoshub",
"height": 21345678
},
"id": 1
}Get an ATOM balance
Cosmos chains use bech32 addresses (cosmos1...) instead of 0x-prefixed hex.
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \ -H "Content-Type: application/json" \
{ "jsonrpc": "2.0", "method": "getBalance", "params": { "chain": "cosmoshub", "address": "cosmos1xyzabc..." }, "id": 1 }
Look up a delegator’s active delegations
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \ -H "Content-Type: application/json" \
{ "jsonrpc": "2.0", "method": "getDelegations", "params": { "chain": "cosmoshub", "delegator": "cosmos1xyzabc..." }, "id": 1 }
{
"jsonrpc": "2.0",
"result": {
"chain": "cosmoshub",
"delegator": "cosmos1xyzabc...",
"delegation_responses": [
{
"delegation": {
"delegator_address": "cosmos1xyzabc...",
"validator_address": "cosmosvaloper1...",
"shares": "1000000.000000000000000000"
},
"balance": { "denom": "uatom", "amount": "1000000" }
}
]
},
"id": 1
}SDK
import { Spectrum } from '@spectrumnodes/sdk';
const spectrum = new Spectrum({ api: 'https://your-endpoint.simplystaking.xyz/YOUR_API_KEY/' });
// Latest Cosmos Hub block height
const block = await spectrum.core.getBlockHeight('cosmoshub');
// ATOM balance
const balance = await spectrum.tokens.getBalance('cosmoshub', 'cosmos1xyzabc...');
// Staking: delegations for a delegator
const delegations = await spectrum.cosmos.getDelegations('cosmoshub', 'cosmos1xyzabc...');
// Validator set
const validators = await spectrum.cosmos.getValidators('cosmoshub');Endpoint differences from EVM chains
- Addresses are bech32-encoded (
cosmos1...for accounts,cosmosvaloper1...for validator operators,cosmosvalcons1...for validator consensus addresses). - Block transactions are decoded from the LCD
txs/block/{height}endpoint (Cosmos SDK 0.50+); on older chains the raw base64-encoded transactions are returned as a fallback. - Denoms replace ERC-20 contract addresses. Pass denom strings like
uatomor IBC hashes (ibc/...) togetTokenBalance,getDenomSupply, andgetTokenMetadata. - Logs, transfers, ENS, NFTs, contract reads, gas estimation, and
simulateCallare not supported. Use the staking-specific endpoints under/api-reference/cosmosfor delegation, reward, and validator data.
Related pages
- Cosmos endpoints: Account, delegation, reward, and validator methods
- API Reference: Full endpoint documentation
- Supported Chains: All networks