{"openapi":"3.1.0","info":{"title":"Base On-chain Quick Tools (scan / token risk signals / tx decode / token market)","version":"1.4.0","description":"Pay-per-call Base mainnet helpers over x402 (USDC on Base): /scan address overview ($0.01), /risk token risk-signal check ($0.03, heuristic, not an audit; a low score means fewer risk signals found, not that a token is safe), /decode transaction decoder ($0.01), /market token price and liquidity ($0.005, public RPC pools only; 24h volume included only when Swap logs fit). For reference only, not investment advice. Payment settles only after a successful 2xx response.","x-guidance":"Call GET /scan?address=0x… ($0.01), GET /risk?token=0x… ($0.03), GET /decode?tx=0x… ($0.01) or GET /market?token=0x… ($0.005); address/token = 40 hex, tx = 64 hex, Base mainnet. Unpaid requests get HTTP 402 with a PAYMENT-REQUIRED header (USDC on Base, eip155:8453, payTo 0x288B7DE729023c756A3a7C18d64e07e9F9b85137). Unpaid requests, including missing or invalid query params, return HTTP 402 so scanners can read payTo/network. After a verified payment, invalid input returns 400 and is never settled. Timeouts/RPC failures return 503 and are never settled; unknown tx or non-token address returns 404, never settled. Results are heuristic public-data reads for reference only, not investment advice, no guarantee. GET /, /health and /openapi.json are free.","contact":{"email":"a4ndm5bg@mail.grokbot.com"}},"paths":{"/":{"get":{"operationId":"root","summary":"Service description (free)","security":[],"responses":{"200":{"description":"Service metadata"}}}},"/health":{"get":{"operationId":"health","summary":"Health check (free)","security":[],"responses":{"200":{"description":"ok"}}}},"/openapi.json":{"get":{"operationId":"openapi","summary":"OpenAPI document (free)","security":[],"responses":{"200":{"description":"OpenAPI 3.1"}}}},"/scan":{"get":{"operationId":"scan_address","summary":"Quick-scan a Base address or contract","tags":["base","wallet","erc20","contract"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"parameters":[{"in":"query","name":"address","required":true,"description":"Base address (wallet or contract)","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"]},"example":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}],"responses":{"200":{"description":"Scan result (includes disclaimer)","content":{"application/json":{"schema":{"type":"object"},"example":{"chain":"base","chainId":8453,"address":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","block":62761809,"type":"contract","ethBalance":"0.009800646158085843","nonce":1,"usdcBalance":"0","codeSizeBytes":1852,"erc20":{"name":"USD Coin","symbol":"USDC","decimals":6,"totalSupply":"4265076342.952979"},"owner":"0x3abd6f64a422225e61e435bae41db12096106df7","proxy":{"eip1967Implementation":null,"eip1967Admin":null,"eip1967Beacon":null,"legacyZeppelinOsImplementation":"0x2ce6311ddae708829bc0784c967b7d77d19fd779","minimalProxyTarget":null},"notes":["upgradeable proxy: logic can change","has owner(): privileged admin may exist"],"disclaimer":"僅供參考、非投資建議 / For reference only, not investment advice. Automated heuristics on public data; may be incomplete or wrong; no guarantee of any kind.","source":"Base public JSON-RPC (read-only)"}}}},"400":{"description":"Invalid input after a verified payment; never settled"},"402":{"description":"Payment Required"},"404":{"description":"Not found (never charged)"},"503":{"description":"Timeout or upstream RPC unavailable; payment is NOT settled"}}}},"/risk":{"get":{"operationId":"token_risk_check","summary":"Token / contract risk-signal quick-check on Base (0-100 count-of-signals score; not a safety rating)","tags":["base","token","security","risk","erc20"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.030000"},"protocols":[{"x402":{}}]},"parameters":[{"in":"query","name":"token","required":true,"description":"Token / contract address on Base","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed"]},"example":"0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed"}],"responses":{"200":{"description":"Risk-signal report (includes disclaimer and scoreMeaning; low score = fewer signals found, NOT safe)","content":{"application/json":{"schema":{"type":"object"},"example":{"chain":"base","chainId":8453,"address":"0x4ed4e862860bed51a9570b96d89af5e1b0efefed","block":62761809,"isContract":true,"riskScore":16,"riskLevel":"fewer_signals","scoreMeaning":"Higher score = more risk signals found by heuristics. A low score only means fewer signals were found; it is NOT a safety rating or guarantee.","disclaimer":"僅供參考、非投資建議 / For reference only, not investment advice. Automated heuristics on public data; may be incomplete or wrong; no guarantee of any kind.","findings":["+8 owner() is a contract (multisig/timelock?) 0x704ec5c12ca20a293c2c0b72b22619a4231f3c0d","+8 pause selectors present: pause(), unpause(), paused()"],"token":{"name":"Degen","symbol":"DEGEN","decimals":18,"totalSupply":"35789920824.236717394794927551"},"proxy":{"isProxy":false,"implementation":null,"beacon":null,"admin":null,"minimalClone":false},"owner":{"address":"0x704ec5c12ca20a293c2c0b72b22619a4231f3c0d","renounced":false,"isContract":true},"paused":false,"bytecodeSelectorsScanned":{"target":"contract","count":40,"privilegedGroups":{"pause":["pause()","unpause()","paused()"],"ownership":["owner()","transferOwnership(address)","renounceOwnership()"],"burn_admin":["burn(uint256)","burnFrom(address,uint256)"],"permit":["permit(address,address,uint256,uint256,uint8,bytes32,bytes32)","DOMAIN_SEPARATOR()","nonces(address)"],"erc20_core":["transfer(address,uint256)","transferFrom(address,address,uint256)","approve(address,uint256)","balanceOf(address)","totalSupply()","allowance(address,address)"]}},"sourceVerified":{"sourcify":{"verified":true,"match":"exact_match"}},"holders":{"method":"sampled: recipients of Transfer logs in the last 3000 blocks (+owner); not a full holder list","transfersSampled":11,"top":[{"address":"0xc9034c3e7f58003e6ae0c8438e7c8f4598d5acaa","percentOfSupply":0.72,"isContract":true},{"address":"0x704ec5c12ca20a293c2c0b72b22619a4231f3c0d","percentOfSupply":0.53,"isContract":true},{"address":"0x63db82de167055be56d3a9631fc60fdfb041475f","percentOfSupply":0,"isContract":true},{"address":"0x7c968220f98d3ddb8d408eebc6da4eba4303f4db","percentOfSupply":0,"isContract":true},{"address":"0xa06e26162c79fca164c11b135ef1feea9075cb4a","percentOfSupply":0,"isContract":true}],"top1Percent":0.72,"top5Percent":1.25},"transferSimulation":null,"source":"Base public JSON-RPC (read-only) + Sourcify; heuristic bytecode-selector scan"}}}},"400":{"description":"Invalid input after a verified payment; never settled"},"402":{"description":"Payment Required"},"404":{"description":"Not found (never charged)"},"503":{"description":"Timeout or upstream RPC unavailable; payment is NOT settled"}}}},"/decode":{"get":{"operationId":"decode_tx","summary":"Decode a Base transaction: method, transfers, fees, plain summary","tags":["base","transaction","decode","erc20","erc721"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"parameters":[{"in":"query","name":"tx","required":true,"description":"Base transaction hash (0x + 64 hex)","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$","examples":["0xbdeda011266f0816c9d6218f8540fd6dc4e1356e98df48739b7c48d38c7c95ef"]},"example":"0xbdeda011266f0816c9d6218f8540fd6dc4e1356e98df48739b7c48d38c7c95ef"}],"responses":{"200":{"description":"Decoded transaction (includes disclaimer)","content":{"application/json":{"schema":{"type":"object"},"example":{"chain":"base","chainId":8453,"hash":"0xbdeda011266f0816c9d6218f8540fd6dc4e1356e98df48739b7c48d38c7c95ef","status":"success","summary":"Succeeded: 0x6b34…7ece called transfer(address,uint256) on 0x8335…2913. ERC-20 transfers: 30 USDC 0x6b34…7ece→0x77b0…5ab2. Fee ≈ 0.000000242325406313 ETH, 40271 gas used.","disclaimer":"僅供參考、非投資建議 / For reference only, not investment advice. Automated heuristics on public data; may be incomplete or wrong; no guarantee of any kind.","block":62761726,"timestamp":"2026-11-27T01:25:20.000Z","txIndex":12,"type":2,"from":"0x6b3497028564b0bedde8885a1b064dcb5a577ece","to":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","contractCreated":null,"nonce":3,"valueEth":"0","method":{"selector":"0xa9059cbb","name":"transfer(address,uint256)","nameSource":"builtin","inputBytes":68},"gas":{"limit":"45668","used":"40271","effectiveGasPriceWei":"6000000","l2FeeEth":"0.000000241626","l1FeeEth":"0.000000000699406313","totalFeeEth":"0.000000242325406313"},"logCount":1,"decodedEvents":[{"type":"erc20_transfer","token":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","symbol":"USDC","from":"0x6b3497028564b0bedde8885a1b064dcb5a577ece","to":"0x77b0d999195a301477494de535720b58fd085ab2","amount":"30","raw":"30000000"}],"eventsNotListed":0,"notes":["Internal ETH transfers (traces) are not included.","Method names come from public signature databases and can be ambiguous."],"source":"Base public JSON-RPC (read-only) + openchain/4byte signature lookup"}}}},"400":{"description":"Invalid input after a verified payment; never settled"},"402":{"description":"Payment Required"},"404":{"description":"Not found (never charged)"},"503":{"description":"Timeout or upstream RPC unavailable; payment is NOT settled"}}}},"/market":{"get":{"operationId":"token_market","summary":"Base token market snapshot: price, liquidity, supply (public RPC pools; not DexScreener)","tags":["base","token","market","price","erc20"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{}}]},"parameters":[{"in":"query","name":"token","required":true,"description":"ERC-20 token address on Base","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed"]},"example":"0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed"}],"responses":{"200":{"description":"Market snapshot (includes disclaimer). 24h volume may be omitted when public-RPC log limits apply.","content":{"application/json":{"schema":{"type":"object"},"example":{"chain":"base","chainId":8453,"address":"0x4ed4e862860bed51a9570b96d89af5e1b0efefed","block":62816975,"timestamp":"2026-11-27T04:29:30.000Z","token":{"name":"Degen","symbol":"DEGEN","decimals":18,"totalSupply":"35789920824.236717394794927551"},"priceUsd":"0.00068182905","priceNative":{"usdc":null,"weth":"0.000000394519838507"},"wethUsd":"1728.250355875777892403","liquidityUsd":"349158.08","liquidity":{"pool":"0xc9034c3e7f58003e6ae0c8438e7c8f4598d5acaa","dex":"uniswap-v3","poolKey":"uniswap-v3 fee 3000 0x4ed4/0x4200","kind":"v3","tokenBalance":"257562597.415250404000316266","usdcBalance":"0","wethBalance":"100.416249934215312418"},"volume24hUsd":"2269.97","volume24hNote":"Swap-log volume on the selected pool over ≈24h; 16 swaps. May be incomplete if logs were truncated. Not a venue-wide figure.","poolsConsidered":22,"notes":[],"disclaimer":"僅供參考、非投資建議 / For reference only, not investment advice. Automated heuristics on public data; may be incomplete or wrong; no guarantee of any kind.","source":"Base public JSON-RPC only (read-only): ERC-20 metadata/supply plus Uniswap v2/v3, Aerodrome v2/Slipstream and PancakeSwap v3 pool reserves or slot0 vs USDC/WETH. 24h volume from that pool's Swap logs when a public RPC returns a bounded range; otherwise omitted. DexScreener is not used (API terms prohibit resale/redistribution to third parties)."}}}},"400":{"description":"Invalid input after a verified payment; never settled"},"402":{"description":"Payment Required"},"404":{"description":"Not found (never charged)"},"503":{"description":"Timeout or upstream RPC unavailable; payment is NOT settled"}}}}}}