Hedera ledger · onchain.hederaToken
Token Metadata
Hedera token metadata
- Request
- POST /v1/onchain/hedera/token
- Price
- $0.025 USDC / fUSD
- Typical latency
- ~300 ms
- Settles on
- Hedera testnet · x402
Data sources

Hedera Mirror Node
Accounts, tokens, HCS topics, transactions, network
Input
JSON body (content-type: application/json). Add ?format=compact to get numbers only.
| Field | Type | Rules |
|---|---|---|
| tokenId* | string | — |
Code
import { x402Client } from '@x402/core/client'
import { wrapFetchWithPayment, decodePaymentResponseHeader } from '@x402/fetch'
import { ExactHederaScheme } from '@x402/hedera/exact/client'
import { createClientHederaSigner } from '@x402/hedera'
import { PrivateKey } from '@hiero-ledger/sdk'
// Your Hedera account pays USDC (0.0.429274 on testnet); Blocky402 pays the network fee.
const signer = createClientHederaSigner(process.env.HEDERA_ACCOUNT_ID!, PrivateKey.fromStringECDSA(process.env.HEDERA_PRIVATE_KEY!), { network: 'hedera:testnet' })
const client = x402Client.fromConfig({ schemes: [{ network: 'hedera:testnet', client: new ExactHederaScheme(signer) }] })
const paidFetch = wrapFetchWithPayment((input, init) => globalThis.fetch(input, init), client)
const res = await paidFetch('https://finality.accuracy.wtf/api/x402/v1/onchain/hedera/token', {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({"tokenId":"0.0.429274"}),
})
const { data, meta } = await res.json() // $0.025 USDC, paid only if the call succeeds
const receipt = decodePaymentResponseHeader(res.headers.get('PAYMENT-RESPONSE')!)
console.log(data, meta.sources, receipt.transaction)Illustrative response
{
"success": true,
"operationId": "onchain.hederaToken",
"requestId": "example",
"data": {
"token_id": "0.0.429274",
"name": "USDC",
"symbol": "USDC",
"decimals": "6"
},
"meta": {
"sources": [
"mirror"
],
"asOf": "2026-11-07T00:00:00.000Z",
"synthetic": true
}
}