{"name":"Chain Data API","seller":"MyceliaLogic","description":"Pay-per-call on-chain data reads for agents, across Base, Ethereum, Polygon, Arbitrum and Optimism. GET /balance returns an address's native token balance. GET /token-balance returns an ERC-20 balance with decimals applied and the raw value. GET /token-info returns ERC-20 name, symbol, decimals and total supply. GET /block returns the latest block number, timestamp, transaction count and base fee. GET /tx returns a transaction summary with receipt status and gas used. GET /ens resolves an ENS name on Ethereum mainnet, or reverse-resolves an address. GET /gas returns the current gas price and priority fee suggestion. GET /wallet-profile returns an agent trust read on a wallet: native balance, outgoing transaction count, balances of well-known tokens, code-presence flag (eth_getCode), and a wallet-age estimate honestly derived from the first outgoing transaction block (null, with the reason stated, when it cannot be derived). Bitcoin and Lightning Network reads are covered too: GET /btc-balance returns a Bitcoin address's confirmed and unconfirmed balance with funded and spent totals, GET /btc-tx returns a Bitcoin transaction summary, GET /btc-block returns the chain tip and latest block summary, GET /btc-fees returns recommended fee rates, GET /ln-stats returns Lightning Network totals (channels, nodes, capacity), GET /ln-node returns a Lightning node's alias, capacity and channel count, and GET /ln-decode decodes a BOLT11 invoice locally (payment hash, destination public key, amount, expiry, description) with no external service. /wallet-profile also accepts a Bitcoin address and returns the BTC profile with the same honest-limits labelling. Six expansion routes complete the shelf: GET /btc-txs returns a Bitcoin address's recent transactions with value in and out relative to the address, GET /btc-mempool returns a compact mempool summary, GET /allowance returns an ERC-20 allowance with an unlimited-approval flag (the approval check an agent runs before transacting), GET /token-price returns a token's spot price in USD computed from on-chain Uniswap V2/V3 liquidity with no external price API (found: false, never a fabricated price, when no usable pool exists), GET /sol-balance returns a Solana address's SOL balance, and GET /sol-tx looks up a Solana transaction by signature. /wallet-profile also accepts a Solana address and returns the SOL profile. Small composable sub-cent reads, priced in the band agents already pay for chain reads. No accounts, no API keys: payment is the auth. GET /cost-basis returns a premium UTXO cost basis and unrealized P&L report for a Bitcoin address: per-UTXO basis traced through single-input and pro-rata fan-in lineage against Bitstamp daily prices, with CoinJoin and other provenance breaks flagged and honest limits labelled (estimates, not tax advice). Six batch-2 routes deepen the shelf along the proven chain-read demand: GET /logs returns a contract's event logs over a bounded block window (eth_getLogs), GET /contract-read performs a generic eth_call against any contract and returns the raw return data with best-effort decodings, GET /token-transfers returns an address's ERC-20 Transfer history (sent and received) over a bounded window, GET /block-by-number returns any block by its number, GET /balances returns an address's native balance on all five chains in one call, and GET /btc-utxos returns a Bitcoin address's current UTXO set with totals.","version":"1.0.0","endpoints":{"GET /balance":{"price":"$0.001","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: chain, chainId, address, symbol, balanceWei, balance, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/balance?address=0x0000000000000000000000000000000000000000&chain=base"},"GET /token-balance":{"price":"$0.002","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: chain, chainId, address, token, decimals, balanceRaw, balance, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/token-balance?address=0x0000000000000000000000000000000000000000&token=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&chain=base"},"GET /token-info":{"price":"$0.002","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: chain, chainId, token, name, symbol, decimals, totalSupplyRaw, totalSupply, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/token-info?token=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&chain=base"},"GET /block":{"price":"$0.001","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: chain, chainId, number, hash, timestamp, timestampIso, transactionCount, baseFeePerGasWei, gasUsed, gasLimit, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/block?chain=base"},"GET /tx":{"price":"$0.002","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: chain, chainId, found, hash, from, to, contractAddress, valueWei, value, blockNumber, nonce, status, gasUsed, effectiveGasPriceWei, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/tx?hash=0x0000000000000000000000000000000000000000000000000000000000000000&chain=base"},"GET /ens":{"price":"$0.003","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: chain, chainId, name or address, resolved, address or name, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/ens?name=vitalik.eth"},"GET /gas":{"price":"$0.001","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: chain, chainId, gasPriceWei, gasPriceGwei, baseFeePerGasWei, priorityFeeWei, priorityFeeGwei, suggestedMaxFeePerGasWei, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/gas?chain=base"},"GET /wallet-profile":{"price":"$0.005","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: chain, chainId, address, hasCode, symbol, balanceWei, balance, transactionCount, tokenBalances, knownTokensChecked, activity (outgoingTransactionCount, hasOutgoingActivity, hasBalance, firstOutgoingBlock, firstOutgoingTimestamp, firstOutgoingTimestampIso, walletAgeDays, latestBlockNumber, ageBasis), notes, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/wallet-profile?address=0x0000000000000000000000000000000000000000&chain=base"},"GET /btc-balance":{"price":"$0.002","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: network, address, addressType, balanceSats, balance, unconfirmedSats, unconfirmedBalance, fundedSats, spentSats, fundedTxoCount, spentTxoCount, txCount, mempoolTxCount, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/btc-balance?address=1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"},"GET /btc-tx":{"price":"$0.002","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: network, found, txid, confirmed, blockHeight, blockHash, blockTime, blockTimeIso, feeSats, fee, feeRateSatVb, size, vsize, weight, version, locktime, inputsCount, outputsCount, totalOutputSats, totalOutput, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/btc-tx?txid=4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"},"GET /btc-block":{"price":"$0.001","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: network, height, hash, timestamp, timestampIso, txCount, size, weight, version, merkleRoot, previousBlockHash, difficulty, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/btc-block?"},"GET /btc-fees":{"price":"$0.001","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: network, unit, fastestFee, halfHourFee, hourFee, economyFee, minimumFee, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/btc-fees?"},"GET /ln-stats":{"price":"$0.002","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: network, channelCount, nodeCount, totalCapacitySats, totalCapacity, avgCapacitySats, medianCapacitySats, torNodes, clearnetNodes, unannouncedNodes, snapshotAdded, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/ln-stats?"},"GET /ln-node":{"price":"$0.002","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: network, found, pubkey, alias, capacitySats, capacity, channelCount, openedChannelCount, closedChannelCount, firstSeen, firstSeenIso, updatedAt, updatedAtIso, city, country, countryCode, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/ln-node?pubkey=03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f"},"GET /ln-decode":{"price":"$0.002","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: network, currency, amountSats, amountMsat, timestamp, timestampIso, expirySeconds, expiryIsDefault, expiresAt, expiresAtIso, paymentHash, paymentSecretPresent, destinationPubkey, destinationSource, description, descriptionHash, minFinalCltvExpiryDelta, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/ln-decode?invoice=lnbc2500u1pvjluez..."},"GET /btc-txs":{"price":"$0.002","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: network, address, addressType, limit, count, transactions (txid, confirmed, blockHeight, blockTime, blockTimeIso, feeSats, fee, valueInSats, valueIn, valueOutSats, valueOut, netSats, net), durationMs","example":"https://chain-data-api.agentlogic.workers.dev/btc-txs?address=1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa&limit=10"},"GET /btc-mempool":{"price":"$0.001","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: network, txCount, totalVsize, totalFeesSats, totalFees, feeHistogram (bucketCount, minRateSatVb, maxRateSatVb), durationMs","example":"https://chain-data-api.agentlogic.workers.dev/btc-mempool?"},"GET /allowance":{"price":"$0.001","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: chain, chainId, token, owner, spender, decimals, allowanceRaw, allowance, unlimited, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/allowance?token=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&owner=0x0000000000000000000000000000000000000000&spender=0x0000000000000000000000000000000000000000&chain=base"},"GET /token-price":{"price":"$0.003","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: chain, chainId, token, found, symbol, priceUsd, pool (dex, address, feeTier, quoteToken, quoteSymbol), reserves (tokenReserve, quoteReserve), depthQuoteUsd, source, note, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/token-price?token=0x4200000000000000000000000000000000000006&chain=base"},"GET /sol-balance":{"price":"$0.002","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: network, address, lamports, balance, symbol, slot, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/sol-balance?address=11111111111111111111111111111111"},"GET /sol-tx":{"price":"$0.002","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: network, found, signature, slot, blockTime, blockTimeIso, feeLamports, fee, status, error, version, instructionCount, signerCount, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/sol-tx?signature=5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiURkQU"},"GET /cost-basis":{"price":"$0.10","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: network, address, addressType, currency, method, priceSource, currentPriceUsd, utxoCount, utxos (txid, vout, amountSats, amount, confirmed, blockHeight, creationTime, creationTimeIso, basisTimestamp, basisTimestampIso, basisPriceUsd, basisTotalUsd, currentValueUsd, unrealizedPnlUsd, unrealizedPnlPct, ageDays, holdingPeriod, isLongTerm, basisMethod, provenanceBroken, provenanceNote), totals (totalAmountSats, totalAmount, totalBasisUsd, totalCurrentValueUsd, totalUnrealizedPnlUsd, totalUnrealizedPnlPct, utxoCount, pricedUtxoCount, unpricedUtxoCount, provenanceBrokenCount, longTermCount, shortTermCount), notes, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/cost-basis?address=1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"},"GET /logs":{"price":"$0.002","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: chain, chainId, address, topic0, fromBlock, toBlock, count, truncated, logs (address, topics, data, blockNumber, transactionHash, logIndex, removed), durationMs","example":"https://chain-data-api.agentlogic.workers.dev/logs?address=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&chain=base"},"GET /contract-read":{"price":"$0.002","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: chain, chainId, to, data, returnData, decodedUint, decodedAddress, decodedBool, decodedString, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/contract-read?to=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&data=0x70a082310000000000000000000000000000000000000000000000000000000000000000&chain=base"},"GET /token-transfers":{"price":"$0.002","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: chain, chainId, address, token, tokensScanned, decimals, fromBlock, toBlock, count, truncated, transfers (token, from, to, valueRaw, value, blockNumber, transactionHash, logIndex), durationMs","example":"https://chain-data-api.agentlogic.workers.dev/token-transfers?address=0x0000000000000000000000000000000000000000&chain=base"},"GET /block-by-number":{"price":"$0.001","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: chain, chainId, found, number, hash, timestamp, timestampIso, transactionCount, baseFeePerGasWei, gasUsed, gasLimit, durationMs","example":"https://chain-data-api.agentlogic.workers.dev/block-by-number?number=38400000&chain=base"},"GET /balances":{"price":"$0.003","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: address, balances (chain, chainId, symbol, balanceWei, balance, error), durationMs","example":"https://chain-data-api.agentlogic.workers.dev/balances?address=0x0000000000000000000000000000000000000000"},"GET /btc-utxos":{"price":"$0.002","currency":"USDC","network":"Base (eip155:8453)","returns":"JSON: network, address, addressType, count, truncated, totalUtxos, confirmedCount, unconfirmedCount, totalSats, total, utxos (txid, vout, valueSats, value, confirmed, blockHeight, blockTime, blockTimeIso), durationMs","example":"https://chain-data-api.agentlogic.workers.dev/btc-utxos?address=1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"}},"payTo":"0x6c3a7f1B187aB86909685Fa8Ef34c51625CF9A8b","placeholderPayTo":false}