ERC-20 Tokens
Chain coverage:
getTokenAllowanceis EVM-only.getTokenMetadataworks on EVM chains and the Cosmos SDK chains (cosmoshub,osmosis,axelar,noble,agoric).getDenomSupplyis Cosmos-only (EVM total supply is returned bygetTokenMetadataastotalSupply). On Cosmos chains, pass a base denom (e.g.uatom) or an IBC hash (ibc/...) in place of an ERC-20 contract address; metadata and supply both read from the bank module.
getTokenMetadata
Returns name, symbol, decimals, and total supply for an ERC-20 token (EVM), a denom (Cosmos SDK), or an SPL mint (Solana). Responses are cached for 1 hour. On Cosmos chains pass a base denom (e.g. `uatom`) or an IBC hash; on Solana pass the SPL mint — `name`/`symbol`/`uri` come from Metaplex or the Token-2022 metadata extension.
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "getTokenMetadata",
"params": {
"chain": "ethereum",
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"blockHeight": 19834521
},
"id": 1
}'import { Spectrum } from '@spectrumnodes/sdk';
const spectrum = new Spectrum({ api: 'https://your-endpoint.simplystaking.xyz/YOUR_API_KEY/' });
const result = await spectrum.tokens.getMetadata('ethereum', '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48');
console.log(result);{
"jsonrpc": "2.0",
"result": {
"data": {
"chain": "ethereum",
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"blockHeight": 19834521,
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"totalSupply": "53151453828.474567"
}
},
"id": 1
}Parameters
| Name | Required | Description |
|---|---|---|
| chain | yes | Network slug |
| address | yes | Token contract address (0x...) e.g. 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
| blockHeight | no | Historical EVM block number (archive nodes only) e.g. 19834521 |
Response Fields
| Field | Type |
|---|---|
data | object |
chain | string |
address | string |
blockHeight | integer |
name | string |
symbol | string |
decimals | integer |
totalSupply | string |
Supported Networks
getDenomSupply
Returns the total bank supply for a denom on a Cosmos SDK chain. Pass a base denom (e.g. `uatom`) or an IBC hash (`ibc/...`). Cosmos chains only; for EVM total supply use `getTokenMetadata` (the `totalSupply` field).
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "getDenomSupply",
"params": {
"chain": "cosmoshub",
"denom": "uatom"
},
"id": 1
}'{
"jsonrpc": "2.0",
"result": {
"data": {
"chain": "cosmoshub",
"denom": "uatom",
"amount": {
"denom": "uatom",
"amount": "391827654000000"
}
}
},
"id": 1
}Parameters
| Name | Required | Description |
|---|---|---|
| chain | yes | Cosmos SDK chain slug |
| denom | yes | Base denom (e.g. `uatom`) or IBC hash (`ibc/...`) e.g. uatom |
Response Fields
| Field | Type |
|---|---|
data | object |
chain | string |
denom | string |
amount | object |
denom | string |
amount | string |
Supported Networks
getTokenAllowance
Returns the amount a spender is approved to transfer from an owner's wallet for a specific ERC-20 token. Calls the token contract's allowance(owner, spender) function. Returns both human-readable and raw values, plus an isUnlimited flag. EVM chains only.
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "getTokenAllowance",
"params": {
"chain": "ethereum",
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"owner": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"spender": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
"blockHeight": 19834521
},
"id": 1
}'import { Spectrum } from '@spectrumnodes/sdk';
const spectrum = new Spectrum({ api: 'https://your-endpoint.simplystaking.xyz/YOUR_API_KEY/' });
const result = await spectrum.data.getAllowance('ethereum', '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', {
owner: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
spender: '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45'
});
console.log(result);{
"jsonrpc": "2.0",
"result": {
"data": {
"chain": "ethereum",
"token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"symbol": "USDC",
"owner": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"spender": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
"blockHeight": 19834521,
"allowance": "1000.0",
"allowanceRaw": "1000000000",
"isUnlimited": false
}
},
"id": 1
}Parameters
| Name | Required | Description |
|---|---|---|
| chain | yes | Network slug |
| address | yes | ERC-20 contract address e.g. 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
| owner | yes | Token owner wallet address e.g. 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 |
| spender | yes | Approved spender contract address e.g. 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45 |
| blockHeight | no | Historical EVM block number (archive nodes only) e.g. 19834521 |
Response Fields
| Field | Type |
|---|---|
data | object |
chain | string |
token | string |
symbol | string |
owner | string |
spender | string |
blockHeight | integer |
allowance | string |
allowanceRaw | string |
isUnlimited | boolean |