Skip to Content
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.

PropertyValue
Slugcosmoshub
TypeCosmos SDK
Native TokenATOM
Address FormatBech32 (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.

MethodDescription
getBlockHeightLatest Cosmos Hub block height
getBlockByNumberBlock by height
getBlockByHashBlock by hash
getBlockTransactionsDecoded transactions in a block (sdk 0.50+ LCD txs/block/{n})
getTransactionByHashTransaction lookup by hash
getReceiptTransaction receipt (decoded tx_response)
getBalanceNative ATOM balance
getTokenBalanceIBC / native denom balance
getDenomSupplyTotal supply for a denom
getTokenMetadataDenom metadata from the bank module
getAccountAccount info (account number, sequence, pubkey)
getDelegationsActive delegations for a delegator
getUnbondingDelegationsUnbonding delegations
getStakingRewardsOutstanding staking rewards
getValidatorsValidator set
getValidatorSingle validator lookup
getStakingPoolStaking pool (bonded / not-bonded totals)
rpcProxyRaw Tendermint / LCD passthrough
getChainHealthCosmos 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 uatom or IBC hashes (ibc/...) to getTokenBalance, getDenomSupply, and getTokenMetadata.
  • Logs, transfers, ENS, NFTs, contract reads, gas estimation, and simulateCall are not supported. Use the staking-specific endpoints under /api-reference/cosmos for delegation, reward, and validator data.