{"openapi":"3.1.0","info":{"title":"AgentData — Executable Liquidity / Exit-Cost","description":"Pay-per-call data service for AI agents: size-aware **exit cost**, **depeg risk**, and liquidity **fragility** for a token on Base. Computed deterministically from on-chain AMM reserves (Aerodrome volatile & stable curves; Uniswap v3 via QuoterV2 is a planned extension) and verified against the pools' own on-chain getAmountOut — reproducible and redistributable, not a raw price feed.\n\nThree tiers by compute depth (default `risk`): `quote`, `risk`, `deep`. Pricing is machine-readable at `/pricing` (single source of truth) and replicated into the MCP tool schema and `llms.txt`.\n\nSettlement is in USDC via the open x402 protocol (HTTP 402); payment is the auth. **Status: testnet/preview** — prices are forced to $0 and no real funds are involved. Mainnet is a separate, human-reviewed escalation.","contact":{"name":"AgentData — Executable Liquidity","url":"https://github.com/phenicea/agentdata"},"license":{"name":"MIT"},"version":"0.1.0"},"servers":[{"url":"https://agentdata-liquidity-exit-cost.onrender.com","description":"Live testnet/preview deployment (Base Sepolia)."}],"paths":{"/health":{"get":{"tags":["ops"],"summary":"Health","operationId":"health_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Head"}}}}}},"head":{"tags":["ops"],"summary":"Health","operationId":"health_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Head"}}}}}}},"/metrics":{"get":{"tags":["ops"],"summary":"Metrics","operationId":"metrics_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Metrics Metrics Get"}}}}}}},"/pricing":{"get":{"tags":["discovery"],"summary":"Pricing","operationId":"pricing_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Pricing Pricing Get"}}}}}}},"/llms.txt":{"get":{"tags":["discovery"],"summary":"Llms Txt","description":"Serve the discovery ``llms.txt`` raw, as ``text/plain``.\n\nAn agent reads this directly (no JS/auth) to decide whether and how to call the\nservice (CLAUDE.md §10). It is the file shipped at the repo root, served verbatim\n— single source, no duplication. 404 (not 500) if the artifact is missing.","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/docs/api.md":{"get":{"tags":["discovery"],"summary":"Api Docs Md","description":"Serve the raw markdown API docs, as advertised by ``llms.txt``.\n\nThe link in ``llms.txt`` must resolve — an agent that follows it to a dead 404\nis an agent that doesn't pick us. Served verbatim from the repo's ``docs/api.md``\n(single source). Distinct from FastAPI's Swagger UI at ``/docs``.","operationId":"api_docs_md_docs_api_md_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/v1/liquidity/exit-cost":{"get":{"tags":["liquidity"],"summary":"Exit Cost Endpoint","operationId":"exit_cost_endpoint_v1_liquidity_exit_cost_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","description":"Token symbol/address to exit (sell).","title":"Token"},"description":"Token symbol/address to exit (sell)."},{"name":"size","in":"query","required":true,"schema":{"type":"number","exclusiveMinimum":0,"description":"Sell size in human token units.","title":"Size"},"description":"Sell size in human token units."},{"name":"tier","in":"query","required":false,"schema":{"type":"string","description":"quote | risk | deep","default":"risk","title":"Tier"},"description":"quote | risk | deep"},{"name":"pool","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Restrict to a single pool id.","title":"Pool"},"description":"Restrict to a single pool id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExitCostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard":{"get":{"tags":["ops"],"summary":"Dashboard","description":"Render the current ``METRICS.snapshot()`` as a simple HTML status page.","operationId":"dashboard_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"CrossCheck":{"properties":{"deepest_pool_id":{"type":"string","title":"Deepest Pool Id"},"deepest_pool_cost_bps":{"type":"number","title":"Deepest Pool Cost Bps"},"best_route_cost_bps":{"type":"number","title":"Best Route Cost Bps"}},"type":"object","required":["deepest_pool_id","deepest_pool_cost_bps","best_route_cost_bps"],"title":"CrossCheck"},"CurvePoint":{"properties":{"size":{"type":"number","title":"Size","description":"Sell size in human token units."},"amount_out":{"type":"number","title":"Amount Out","description":"Output-token units received (fee incl.)."},"mid_price":{"type":"number","title":"Mid Price","description":"Marginal price (out per 1 in) at size 0."},"exec_price":{"type":"number","title":"Exec Price","description":"Realized price = amount_out / size."},"total_cost_bps":{"type":"number","title":"Total Cost Bps","description":"Loss vs mid (fee + slippage), bps."},"price_impact_bps":{"type":"number","title":"Price Impact Bps","description":"Slippage only (fee excluded), bps."},"fee_bps":{"type":"number","title":"Fee Bps","description":"Pool fee component, bps."},"size_multiple":{"type":"number","title":"Size Multiple"}},"type":"object","required":["size","amount_out","mid_price","exec_price","total_cost_bps","price_impact_bps","fee_bps","size_multiple"],"title":"CurvePoint"},"DepegModel":{"properties":{"deviation_bps":{"type":"number","title":"Deviation Bps"},"dispersion_bps":{"type":"number","title":"Dispersion Bps"},"weighted_price":{"type":"number","title":"Weighted Price"},"total_liquidity":{"type":"number","title":"Total Liquidity"},"score":{"type":"number","title":"Score","description":"0..100, higher = more depeg risk."}},"type":"object","required":["deviation_bps","dispersion_bps","weighted_price","total_liquidity","score"],"title":"DepegModel"},"ExitCostModel":{"properties":{"size":{"type":"number","title":"Size","description":"Sell size in human token units."},"amount_out":{"type":"number","title":"Amount Out","description":"Output-token units received (fee incl.)."},"mid_price":{"type":"number","title":"Mid Price","description":"Marginal price (out per 1 in) at size 0."},"exec_price":{"type":"number","title":"Exec Price","description":"Realized price = amount_out / size."},"total_cost_bps":{"type":"number","title":"Total Cost Bps","description":"Loss vs mid (fee + slippage), bps."},"price_impact_bps":{"type":"number","title":"Price Impact Bps","description":"Slippage only (fee excluded), bps."},"fee_bps":{"type":"number","title":"Fee Bps","description":"Pool fee component, bps."}},"type":"object","required":["size","amount_out","mid_price","exec_price","total_cost_bps","price_impact_bps","fee_bps"],"title":"ExitCostModel"},"ExitCostResponse":{"properties":{"tier":{"type":"string","title":"Tier"},"network":{"type":"string","title":"Network","description":"testnet | mainnet"},"token":{"type":"string","title":"Token"},"size":{"type":"number","title":"Size"},"exit_cost":{"$ref":"#/components/schemas/ExitCostModel"},"route":{"$ref":"#/components/schemas/RouteModel"},"fragility":{"anyOf":[{"$ref":"#/components/schemas/FragilityModel"},{"type":"null"}]},"depeg":{"anyOf":[{"$ref":"#/components/schemas/DepegModel"},{"type":"null"}]},"exit_cost_curve":{"anyOf":[{"items":{"$ref":"#/components/schemas/CurvePoint"},"type":"array"},{"type":"null"}],"title":"Exit Cost Curve"},"max_size_before_cost":{"anyOf":[{"items":{"$ref":"#/components/schemas/MaxSizeEntry"},"type":"array"},{"type":"null"}],"title":"Max Size Before Cost"},"cross_check":{"anyOf":[{"$ref":"#/components/schemas/CrossCheck"},{"type":"null"}]}},"type":"object","required":["tier","network","token","size","exit_cost","route"],"title":"ExitCostResponse"},"FragilityModel":{"properties":{"score":{"type":"number","title":"Score","description":"0..100, higher = more fragile."},"depth_score":{"type":"number","title":"Depth Score"},"concentration_score":{"type":"number","title":"Concentration Score"},"convexity_score":{"type":"number","title":"Convexity Score"},"total_exit_liquidity":{"type":"number","title":"Total Exit Liquidity"},"venues":{"type":"integer","title":"Venues"}},"type":"object","required":["score","depth_score","concentration_score","convexity_score","total_exit_liquidity","venues"],"title":"FragilityModel"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MaxSizeEntry":{"properties":{"max_cost_bps":{"type":"number","title":"Max Cost Bps"},"max_size":{"type":"number","title":"Max Size"}},"type":"object","required":["max_cost_bps","max_size"],"title":"MaxSizeEntry"},"RouteModel":{"properties":{"best":{"$ref":"#/components/schemas/ExitCostModel"},"pool_id":{"type":"string","title":"Pool Id"},"dex":{"type":"string","title":"Dex"},"routed_split":{"type":"boolean","title":"Routed Split","description":"True if cost is split across venues."},"venues_considered":{"type":"integer","title":"Venues Considered"}},"type":"object","required":["best","pool_id","dex","routed_split","venues_considered"],"title":"RouteModel"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"tags":[{"name":"liquidity","description":"Size-aware exit cost, depeg risk, and fragility."},{"name":"discovery","description":"Machine-readable metadata for agent selection: pricing, raw `llms.txt`, OpenAPI."},{"name":"ops","description":"Operational endpoints: health and monitoring metrics."}]}