{"openapi":"3.1.0","info":{"title":"Fathom API","version":"1.0.0","description":"x402-powered Base token price oracle for agents"},"paths":{"/v1/prices":{"get":{"summary":"Batch pricing for Base tokens","description":"Batch price, liquidity, confidence, and risk flags for Base token lists. Note: Requires x402 payment (HTTP 402 Payment Required returned when unpaid).","parameters":[{"name":"tokens","in":"query","required":true,"schema":{"type":"string"},"description":"Comma-separated list of Base ERC-20 token addresses (1 to 50)","example":"0x940181a94A35A4569E4529A3CDfB74e38FD98631,0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"},{"name":"chain","in":"query","required":false,"schema":{"type":"string","default":"base"},"description":"Target chain (default: base)"}],"responses":{"200":{"description":"Successful pricing result","content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string"},"count":{"type":"number"},"priced":{"type":"number"},"failed":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"chain":{"type":"string"},"symbol":{"type":"string"},"price_usd":{"type":"number"},"price_low":{"type":"number"},"price_high":{"type":"number"},"twap_5m":{"type":"number"},"confidence":{"type":"number"},"label":{"type":"string"},"liquidity_usd":{"type":"number"},"main_pool":{"type":"object","properties":{"dex":{"type":"string"},"address":{"type":"string"},"fee":{"type":"number"},"liquidity_usd":{"type":"number"},"price_usd":{"type":"number"}},"required":["dex","address","liquidity_usd","price_usd"]},"flags":{"type":"array","items":{"type":"string"}},"updated_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["ok","not_found","no_liquidity","rpc_error","unpriceable"]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}},"required":["token","chain","status"]}}},"required":["chain","count","priced","failed","results"]}}}},"402":{"description":"Payment Required - Follow x402 protocol instructions in headers to pay 0.003 USDC via Base."}}}},"/v1/price":{"get":{"summary":"Price for a single Base token","description":"Returns price, liquidity, confidence score, main pool, and risk flags for a Base ERC-20 token. Requires x402 payment.","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string"},"description":"Base ERC-20 token address","example":"0x940181a94A35A4569E4529A3CDfB74e38FD98631"}],"responses":{"200":{"description":"Successful pricing result","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"chain":{"type":"string"},"symbol":{"type":"string"},"price_usd":{"type":"number"},"price_low":{"type":"number"},"price_high":{"type":"number"},"twap_5m":{"type":"number"},"confidence":{"type":"number"},"label":{"type":"string"},"liquidity_usd":{"type":"number"},"main_pool":{"type":"object","properties":{"dex":{"type":"string"},"address":{"type":"string"},"fee":{"type":"number"},"liquidity_usd":{"type":"number"},"price_usd":{"type":"number"}},"required":["dex","address","liquidity_usd","price_usd"]},"flags":{"type":"array","items":{"type":"string"}},"updated_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["ok","not_found","no_liquidity","rpc_error","unpriceable"]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}},"required":["token","chain","status"]}}}},"402":{"description":"Payment Required - Follow x402 protocol instructions to pay 0.001 USDC."}}}},"/v1/metadata":{"get":{"summary":"Token Metadata","description":"Returns ERC-20 metadata. Requires x402 payment.","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string"},"description":"Base ERC-20 token address","example":"0x940181a94A35A4569E4529A3CDfB74e38FD98631"}],"responses":{"200":{"description":"Successful metadata result","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"number"}},"required":["address","symbol","name","decimals"]}}}},"402":{"description":"Payment Required."}}}},"/v1/metadatas":{"get":{"summary":"Batch Token Metadata","description":"Batch endpoint for Base ERC-20 token metadata. Requires x402 payment.","parameters":[{"name":"tokens","in":"query","required":true,"schema":{"type":"string"},"description":"Comma-separated list of Base ERC-20 token addresses"}],"responses":{"200":{"description":"Successful batch metadata result","content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string"},"count":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"number"}},"required":["address","symbol","name","decimals"]}}},"required":["chain","count","results"]}}}},"402":{"description":"Payment Required."}}}}}}