{"openapi":"3.1.0","info":{"title":"Dark Factory Yield Scan","version":"1.0.0","description":"Documentation for the paid unified yield scan endpoint and the Yield Scan Pro API key tier."},"servers":[{"url":"https://yield-scan-x402-production.rushabhdabhi404.workers.dev"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"}}},"paths":{"/":{"get":{"summary":"Landing page","description":"Minimal HTML pricing page for the $99/month Yield Scan Pro tier with a Stripe payment link.","responses":{"200":{"description":"HTML landing page.","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/yield-scan":{"get":{"summary":"Yield scan over GET","description":"The GET operation returns the latest verified unified yield scan across Base, Ethereum, Monad and HyperEVM. The payload includes a generation timestamp, verification state, chain health and adapter results.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"eip155:8453","payTo":"0xA1359563B9B16670186eA8BD97cC87D06955D181"},"protocols":[{"x402":{}}],"protocol":"x402","protocolVersion":2},"responses":{"200":{"description":"A verified yield scan payload.","content":{"application/json":{"schema":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"verified":{"type":"boolean"},"report":{"type":"object","properties":{"health":{"type":"array","description":"Chain health records for Base, Ethereum, Monad and HyperEVM.","items":{"type":"object","properties":{"chain":{"type":"string","enum":["base","ethereum","monad","hyperevm"]},"ok":{"type":"boolean"},"expected":{"type":"integer"},"observed":{"type":"integer"}}}},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"chain":{"type":"string","enum":["base","ethereum","monad","hyperevm"]},"status":{"type":"string"},"marketsChecked":{"type":"integer"},"reason":{"type":"string"}}}},"yields":{"type":"array","description":"Yield opportunities indexed by covered chain.","items":{"type":"object","properties":{"chain":{"type":"string","enum":["base","ethereum","monad","hyperevm"]},"protocol":{"type":"string"},"market":{"type":"string"},"apy":{"type":"number"}}}}}}}}}}},"402":{"description":"Payment was absent or did not satisfy the published terms.","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"Yield scan over POST","description":"The POST operation returns the same yield scan payload after an attached payment is verified. Settlement follows the configured dry-run setting.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"eip155:8453","payTo":"0xA1359563B9B16670186eA8BD97cC87D06955D181"},"protocols":[{"x402":{}}],"protocol":"x402","protocolVersion":2},"responses":{"200":{"description":"A verified yield scan payload.","content":{"application/json":{"schema":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"verified":{"type":"boolean"},"report":{"type":"object","properties":{"health":{"type":"array","description":"Chain health records for Base, Ethereum, Monad and HyperEVM.","items":{"type":"object","properties":{"chain":{"type":"string","enum":["base","ethereum","monad","hyperevm"]},"ok":{"type":"boolean"},"expected":{"type":"integer"},"observed":{"type":"integer"}}}},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"chain":{"type":"string","enum":["base","ethereum","monad","hyperevm"]},"status":{"type":"string"},"marketsChecked":{"type":"integer"},"reason":{"type":"string"}}}},"yields":{"type":"array","description":"Yield opportunities indexed by covered chain.","items":{"type":"object","properties":{"chain":{"type":"string","enum":["base","ethereum","monad","hyperevm"]},"protocol":{"type":"string"},"market":{"type":"string"},"apy":{"type":"number"}}}}}}}}}}},"402":{"description":"Payment was absent or did not satisfy the published terms.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/validate":{"get":{"summary":"Bazaar metadata audit","description":"Checks a public x402 resource for the discovery metadata agent clients require. Returns missing fields and a $0.50 USDC remediation quote when the listing is incomplete.","parameters":[{"name":"resource","in":"query","required":true,"schema":{"type":"string","format":"uri"}}],"responses":{"200":{"description":"Audit result, missing fields and optional remediation quote.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Missing resource parameter."},"502":{"description":"Resource could not be fetched or is not public HTTPS."}}}},"/api/yield-scan/pro":{"get":{"summary":"Yield Scan Pro","description":"Requires an X-API-Key header issued by the Stripe webhook. Returns the top 50 yields, 30-day history and an aggregate risk score.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Pro yield scan payload.","content":{"application/json":{"schema":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"verified":{"type":"boolean"},"plan":{"type":"string","const":"pro"},"yields":{"type":"array","items":{"type":"object"}},"top50":{"type":"array","items":{"type":"object"}},"history30d":{"type":"array","items":{"type":"object"}},"riskScore":{"type":"number"}}}}}},"401":{"description":"Missing or invalid API key."},"503":{"description":"Verified report unavailable."}}}},"/px/{chain}/{token}":{"get":{"summary":"Median-of-3 token price","description":"Median-of-3 token price with signed attestation. USDC per call, no key.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"eip155:8453","payTo":"0xA1359563B9B16670186eA8BD97cC87D06955D181"},"protocols":[{"x402":{}}],"protocol":"x402","protocolVersion":2},"parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string"}},{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Token price payload.","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment required.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/px/batch":{"get":{"summary":"Batch token prices","description":"Batch token price lookup for 25 or more tokens with median-of-3 pricing.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"eip155:8453","payTo":"0xA1359563B9B16670186eA8BD97cC87D06955D181"},"protocols":[{"x402":{}}],"protocol":"x402","protocolVersion":2},"responses":{"200":{"description":"Batch price payload.","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment required.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/screen":{"get":{"summary":"Token screening","description":"Liquidity-weighted token screening using the v2 cohort-normalized index.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.350000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"eip155:8453","payTo":"0xA1359563B9B16670186eA8BD97cC87D06955D181"},"protocols":[{"x402":{}}],"protocol":"x402","protocolVersion":2},"responses":{"200":{"description":"Screening payload.","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment required.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/index/{chain}/{token}":{"get":{"summary":"Liquidity-weighted safety index","description":"Liquidity-weighted safety index (0-1000). Normalizes token liquidity, volume and dispersion against a mock cohort and returns the index, z-score, percentile, cohort size and formula version.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"eip155:8453","payTo":"0xA1359563B9B16670186eA8BD97cC87D06955D181"},"protocols":[{"x402":{}}],"protocol":"x402","protocolVersion":2},"parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string"}},{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Liquidity-weighted safety index.","content":{"application/json":{"schema":{"type":"object","properties":{"idx":{"type":"integer","minimum":0,"maximum":1000},"z_liq":{"type":"number"},"p_liq":{"type":"number"},"cohort_n":{"type":"integer"},"formula":{"type":"string","const":"v2"}},"required":["idx","z_liq","p_liq","cohort_n","formula"]}}}},"402":{"description":"Payment was absent or did not satisfy the published terms.","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}