{"uid":"cap_haBGTs180t3wiCkhHBWDp","slug":"onesource-erc-1155-token-balance-lookup-797a5965","name":"OneSource ERC-1155 Token Balance Lookup","description":"ERC1155 token balance via balanceOf (eth_call) - how many copies of a token_id a wallet holds","url":"https://api.onesource.io/api/chain/erc1155-balance","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":["address","contract","token_id"],"properties":{"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"network":{"enum":["ethereum","sepolia","robinhood"],"type":"string","default":"ethereum"},"contract":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"token_id":{"type":"string","pattern":"^[0-9]+$"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"account":{"type":"string"},"balance":{"type":"string"},"token_id":{"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":{"account":"0xd8da6bf26964af9d7eed9e03e53415d37aa96045","balance":"42","token_id":"1","contract_address":"0xdac17f958d2ee523a2206206994597c13d831ec7"},"meta":{"endpoint":"/api/chain/erc1155-balance","cost_usdc":"0.001","request_id":"00000000abcdef01","payment_chain":"base","payment_token":"USDC"}}},"example":{"request":{"account":"0x1234567890123456789012345678901234567890","network":"sepolia","contract":"0x0987654321098765432109876543210987654321","token_id":"1"},"response":{"data":{"account":"0x1234567890123456789012345678901234567890","balance":"0","token_id":"1","contract_address":"0x0987654321098765432109876543210987654321"},"meta":{"endpoint":"/api/chain/erc1155-balance","request_id":"007b7e62b1eac6ef"}}},"exampleRequest":{"account":"0x1234567890123456789012345678901234567890","network":"sepolia","contract":"0x0987654321098765432109876543210987654321","token_id":"1"},"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_X8ylxi28hVBo4VtohWSBx","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 ERC-1155 NFT token balance for a given wallet address, contract, and token ID on Ethereum mainnet or Sepolia testnet","exampleAgentPrompt":"How many ERC-1155 tokens does wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 hold for token ID 1 on the contract 0xdAC17F958D2ee523a2206206994597C13D831ec7 on Ethereum mainnet?","exampleUseCases":null,"resultDescription":"A JSON object containing the queried account address, contract address, token ID, and the integer balance (as a string) representing how many of that ERC-1155 token the account holds.","failureModes":["Invalid wallet address format returns an error (must be 0x-prefixed 40-char hex)","Invalid contract address format returns an error","Non-existent token ID may return balance of 0","Network not found if unsupported network specified","Payment failure (402) if USDC payment not provided or insufficient","Rate limiting if too many unauthenticated requests made"],"whenToPreferThis":"Use this endpoint when you need to check the exact quantity of a specific ERC-1155 (multi-token standard) token held by a wallet — especially for NFT games, semi-fungible tokens, or multi-edition collectibles. Prefer this over ERC-721 balance endpoints when dealing with tokens that can have quantity > 1. Choose this when no API key is available and you can pay per call with USDC on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T06:48:09.051Z","isFirstParty":false}