Skip to content
Fourohtwo

agent402.tools/api/chain/erc1155-balance

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.

BasePolygonArbitrumMonadAvalancheSei+4Unchecked
GEThttps://agent402.tools/api/chain/erc1155-balance

UptimeNot checked yet

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://agent402.tools/api/chain/erc1155-balance?address=0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0&network=polygon&tokenId=1&contract=0x2953399124F0cBB46d2CbACD8A89cF0599974963");
console.log(await res.json());

Example input

{
  "address": "0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0",
  "network": "polygon",
  "tokenId": "1",
  "contract": "0x2953399124F0cBB46d2CbACD8A89cF0599974963"
}