Skip to Content
API ReferenceERC-20 Tokens

ERC-20 Tokens

getTokenMetadata

Returns name, symbol, decimals, and total supply for an ERC-20 token. Responses are cached for 1 hour. EVM chains only.

curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
  -H "Content-Type: application/json" \
{
  "jsonrpc": "2.0",
  "method": "getTokenMetadata",
  "params": {
    "chain": "ethereum",
    "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "blockHeight": 19834521
  },
  "id": 1
}

Parameters

NameRequiredDescription
chainyesNetwork slug
addressyesToken contract address (0x...)
e.g. 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
blockHeightnoHistorical EVM block number (archive nodes only)
e.g. 19834521

Response Fields

FieldType
dataobject
chainstring
addressstring
blockHeightinteger
namestring
symbolstring
decimalsinteger
totalSupplystring

Supported Networks

EthereumPolygonBNB ChainOptimismBaseAvalancheArbitrumGnosisMoonbeamLineaHyperliquid
Try It
{
  "jsonrpc": "2.0",
  "method": "getTokenMetadata",
  "params": {
    "chain": "ethereum",
    "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "blockHeight": 19834521
  },
  "id": 1
}

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" \
{
  "jsonrpc": "2.0",
  "method": "getTokenAllowance",
  "params": {
    "chain": "ethereum",
    "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "owner": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "spender": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
    "blockHeight": 19834521
  },
  "id": 1
}

Parameters

NameRequiredDescription
chainyesNetwork slug
addressyesERC-20 contract address
e.g. 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
owneryesToken owner wallet address
e.g. 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
spenderyesApproved spender contract address
e.g. 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45
blockHeightnoHistorical EVM block number (archive nodes only)
e.g. 19834521

Response Fields

FieldType
dataobject
chainstring
tokenstring
symbolstring
ownerstring
spenderstring
blockHeightinteger
allowancestring
allowanceRawstring
isUnlimitedboolean

Supported Networks

EthereumPolygonBNB ChainOptimismBaseAvalancheArbitrumGnosisMoonbeamLineaHyperliquid
Try It
{
  "jsonrpc": "2.0",
  "method": "getTokenAllowance",
  "params": {
    "chain": "ethereum",
    "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "owner": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "spender": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
    "blockHeight": 19834521
  },
  "id": 1
}