82trust / 100
Chain Erc1155 Balance
by ERC-1155 balance in Onchain & crypto
x402 APIPassing, checked 4 h ago
How many of one ERC-1155 token id an account holds, read straight from the contract. ERC-1155 is the multi-token standard behind most game items, editions and passes, where a single contract holds many ids and a balance is a quantity rather than ownership of one thing. Returns the balance as a decimal string. EVM chains: ethereum, base, polygon, arbitrum, optimism.
GET https://agent402.tools/api/chain/erc1155-balance
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 185 ms typical, 185 ms slowest 5%
- Last check
- 4 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X GET "https://agent402.tools/api/chain/erc1155-balance?address=0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0&contract=0x2953399124F0cBB46d2CbACD8A89cF0599974963&network=polygon&tokenId=1"import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fapi%2Fchain%2Ferc1155-balance
const res = await pay("https://agent402.tools/api/chain/erc1155-balance?address=0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0&contract=0x2953399124F0cBB46d2CbACD8A89cF0599974963&network=polygon&tokenId=1");
console.log(await res.json());Example input
{
"address": "0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0",
"contract": "0x2953399124F0cBB46d2CbACD8A89cF0599974963",
"network": "polygon",
"tokenId": "1"
}Example output
{
"address": "0xabf4fabd7c416fb67202e5f9002389fc75e2a9d0",
"balance": "0",
"contract": "0x2953399124f0cbb46d2cbacd8a89cf0599974963",
"network": "polygon",
"tokenId": "1"
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 4 h ago | Passed | 402 | 185 ms | $0.002 |