{"openapi":"3.1.0","info":{"title":"RGX Pricing-Truth API","description":"Request-time on-chain **price and liquidity integrity** for DeFi tokens on Base, Ethereum and Arbitrum. Answers the question a trading agent must ask before it swaps and that TVL numbers get wrong: *is this liquidity real, and is this price trustworthy?* Every number comes from a live on-chain quote, not a model.","version":"1.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/{chain}/token/{address}/depth":{"get":{"tags":["token"],"summary":"Real tradeable depth vs nominal TVL","description":"Largest trade that fills within 1% / 2% / 5% price impact, from real quotes across every hub pool, against the pool's headline TVL. Use before sizing a swap or trusting a TVL figure.","operationId":"depth_v1__chain__token__address__depth_get","parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","title":"Chain"}},{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{chain}/token/{address}/corroboration":{"get":{"tags":["token"],"summary":"Depth-weighted price corroboration","description":"Derives the token's price independently from every deep pool and checks they agree. Returns a consensus price only when >=2 pools with real depth concur; flags single-source or disagreeing tokens. Use as a price sanity gate before quoting or valuing a position.","operationId":"corroboration_v1__chain__token__address__corroboration_get","parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","title":"Chain"}},{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{chain}/token/{address}/honeypot":{"get":{"tags":["token"],"summary":"Honeypot / transfer-tax check","description":"Quotes a small buy then an immediate sell on the deepest pool. Flags a honeypot when the sell returns nothing, and reports unexplained round-trip loss (transfer tax or sell restriction) beyond pool fees.","operationId":"honeypot_v1__chain__token__address__honeypot_get","parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","title":"Chain"}},{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{chain}/vault/{address}/redeem-spread":{"get":{"tags":["vault"],"summary":"ERC-4626 redeem value vs market price","description":"Compares an ERC-4626 vault share's on-chain redemption value (previewRedeem / convertToAssets) to its live market quote. Use to spot share mispricing or a stale vault.","operationId":"redeem_spread_v1__chain__vault__address__redeem_spread_get","parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","title":"Chain"}},{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{chain}/token/{address}/report":{"get":{"tags":["token"],"summary":"Full pricing-truth report (flagship)","description":"depth + corroboration + honeypot in one call sharing one pool read. The single call an agent makes before trading an unfamiliar token.","operationId":"report_v1__chain__token__address__report_get","parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","title":"Chain"}},{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools/select":{"post":{"tags":["snap-router"],"summary":"Snap Router — pick the right x402 service / MCP tool for a task","description":"Snap Router. Given an agent's task in plain language, returns the ranked shortlist of x402 services and MCP tools that serve it, from the merged x402 Bazaar + MCP Registry catalog, plus a 'works well with' hint. One fast pass over the whole catalog (~200ms), no LLM call, no keyword-only fallback. Call this before loading tools into context.","operationId":"tools_select_v1_tools_select_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSelectReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/{chain}/anomalies":{"get":{"tags":["screener"],"summary":"What changed on-chain right now (anomaly screener)","description":"Tokens on this chain that just broke: a corroboration break (deep pools started disagreeing), a depth collapse (real fillable liquidity dropped >50%), or a new honeypot. Poll this instead of scanning tokens yourself. Optional ?signal= to filter, ?since_s= window (default 3600), ?limit=.","operationId":"anomalies_v1__chain__anomalies_get","parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","title":"Chain"}},{"name":"signal","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signal"}},{"name":"since_s","in":"query","required":false,"schema":{"type":"integer","default":3600,"title":"Since S"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Envelope":{"properties":{"ok":{"type":"boolean","title":"Ok"},"chain":{"type":"string","title":"Chain"},"address":{"type":"string","title":"Address"},"endpoint":{"type":"string","title":"Endpoint"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"retryable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Retryable"},"meta":{"additionalProperties":true,"type":"object","title":"Meta"}},"type":"object","required":["ok","chain","address","endpoint","meta"],"title":"Envelope"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ToolSelectReq":{"properties":{"task":{"type":"string","title":"Task"},"registries":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Registries"},"k":{"type":"integer","title":"K","default":8},"max_price_usdc":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Price Usdc"},"compose":{"type":"boolean","title":"Compose","default":false}},"type":"object","required":["task"],"title":"ToolSelectReq"},"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"}}}}