{"uid":"cap_TBgghv5JHBbiY8SNqrF8l","slug":"onesource-total-supply-lookup-b6fa30f8","name":"OneSource Total Supply Lookup","description":"Total supply of an ERC20 or ERC721 token contract via totalSupply (eth_call)","url":"https://api.onesource.io/api/chain/total-supply","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["contract"],"properties":{"network":{"enum":["ethereum","sepolia","robinhood"],"type":"string","default":"ethereum"},"contract":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"name":{"type":"string"},"symbol":{"type":"string"},"decimals":{"type":"integer"},"is_erc721":{"type":"boolean"},"total_supply":{"type":"string"},"contract_address":{"type":"string"}},"description":"Endpoint-specific response payload"},"meta":{"type":"object","required":["endpoint","request_id"],"properties":{"endpoint":{"type":"string"},"cost_usdc":{"type":"string"},"request_id":{"type":"string"},"payment_chain":{"type":"string"},"payment_token":{"type":"string"}}},"error":{"type":["object","null"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}}}}}},"responseSchema":{"type":"json","example":{"data":{"name":"Tether USD","symbol":"USDT","decimals":6,"is_erc721":false,"total_supply":"39283948340000000","contract_address":"0xdac17f958d2ee523a2206206994597c13d831ec7"},"meta":{"endpoint":"/api/chain/total-supply","cost_usdc":"0.001","request_id":"00000000abcdef01","payment_chain":"base","payment_token":"USDC"}}},"example":{"request":{"network":"ethereum","contract":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"response":{"data":{"name":"USD Coin","symbol":"USDC","decimals":6,"is_erc721":false,"total_supply":"51723436877755337","contract_address":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"meta":{"endpoint":"/api/chain/total-supply","request_id":"56d0a835f583a4cd"}}},"exampleRequest":{"network":"ethereum","contract":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_h_BN1FLodoA4X24hvyPg6","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the total supply of an ERC20 or ERC721 token contract by calling the totalSupply function on-chain via eth_call","exampleAgentPrompt":"What's the total token supply for the USDC contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum mainnet?","exampleUseCases":null,"resultDescription":"Returns the total supply value for the specified token contract, representing the full on-chain count of minted tokens as returned by the contract's totalSupply() function.","failureModes":["Invalid contract address format (must be 0x followed by 40 hex characters) returns a validation error","Contract at address does not implement totalSupply() returns a call error or empty result","Unsupported network value (anything other than 'ethereum' or 'sepolia') returns an enum validation error","Contract address is valid hex but not deployed returns an error or zero result","Network RPC timeout causes a delayed or failed response"],"whenToPreferThis":"Use this endpoint when you need to programmatically query the on-chain totalSupply of any ERC20 or ERC721 token contract on Ethereum mainnet or Sepolia testnet without running your own node. Ideal for agents that need token supply data as part of DeFi analysis, NFT inventory checks, or on-chain data enrichment pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:50:12.840Z","isFirstParty":false}