{"uid":"cap_KSgR0E-jBMSewkLyJvEcq","slug":"x402-treasury-snapshot-dc2ef316","name":"x402 Treasury Snapshot","description":"One-call crypto treasury snapshot for autonomous agents: native ETH balance, up to 20 ERC-20 balances, current gas/base-fee state and recent ERC-20/USDC transfer activity with next_cursor for recurring polling. Use for treasury bots, wallet monitors, stablecoin operations, accounting and automated payment systems.","url":"https://x402-gateway-production-1f21.up.railway.app/agent/treasury-snapshot?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["address"],"properties":{"tokens":{"type":"array","items":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"maxItems":20},"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"network":{"enum":["base","ethereum"],"type":"string","default":"base"},"activity_cursor":{"type":"integer","minimum":0},"lookback_blocks":{"type":"integer","default":1000,"maximum":5000,"minimum":1},"activity_contract":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"ERC-20 activity contract; defaults to USDC."},"previous_state_hash":{"type":"string","pattern":"^[a-fA-F0-9]{64}$"}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"status":"ready"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_YJ8nkk8A151y4AHNsammC","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a deterministic snapshot of an on-chain wallet's token balances, recent ERC-20 activity, and a hash for change detection on Base or Ethereum.","exampleAgentPrompt":"Give me a treasury snapshot for wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 on Base, looking back 2000 blocks, and compare it against my previous state hash a3f1b2c4d5e6f7890abcd1234567890abcdef1234567890abcdef1234567890ab.","exampleUseCases":[{"title":"DAO treasury balance monitoring","prompt":"Pull a treasury snapshot for our DAO wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 on Base over the last 1000 blocks and tell me if anything has changed since our last hash 00aabbccddeeff1122334455667788990011223344556677889900aabbccddee."},{"title":"DeFi agent portfolio check","prompt":"Snapshot the token balances and recent ERC-20 activity for address 0x742d35Cc6634C0532925a3b844Bc454e4438f44e on Ethereum over 5000 blocks — I want to see activity for these tokens: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 and 0x6B175474E89094C44Da98b954EedeAC495271d0F."},{"title":"Automated treasury change detection","prompt":"Check if my treasury at 0x1234567890abcdef1234567890abcdef12345678 on Base has changed since last time — use previous hash f1e2d3c4b5a6978800112233445566778899aabbccddeeff0011223344556677 and look back 500 blocks."}],"resultDescription":"A JSON object containing the wallet's current token balances across specified ERC-20 contracts, a history of recent token activity within the specified block range, and a deterministic state hash that can be compared to a previous hash to detect changes — enabling idempotent treasury monitoring.","failureModes":["Invalid or malformed Ethereum address (must be 0x-prefixed 40-char hex) returns validation error","Unsupported network value (only 'base' or 'ethereum' accepted)","lookback_blocks exceeds maximum of 5000","Token address array exceeds 20 items","Payment not received or insufficient USDC — x402 payment required","Node/RPC timeout for very large block ranges","Address has no activity in the specified lookback window — empty result set"],"whenToPreferThis":"Choose this endpoint when you need a deterministic, machine-payable on-chain treasury snapshot with built-in change detection via state hashing. Ideal for AI agents that need to monitor wallet balances and ERC-20 activity on Base or Ethereum without running their own node, and especially when you want to cheaply poll for changes using the previous_state_hash comparison rather than re-fetching full data every time.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T12:35:46.240Z","isFirstParty":false,"canonicalSlug":"x402-treasury-snapshot-dc2ef316"}