{"openapi":"3.1.0","servers":[{"url":"https://api402x.com"}],"info":{"title":"apix402 — Onchain Governance, Vesting, Oracle and Treasury-Risk Data","version":"1.0.0","description":"Per-call onchain governance, vesting, oracle and treasury-risk data for autonomous agents. Base, USDC, no key and no subscription.","x-guidance":"Seven paid GET endpoints, in three groups: DAO governance, vesting, and (added 2026-08-13) treasury/oracle/lending risk. /dao-proposals returns active DAO governance proposals cross-checked between Snapshot (off-chain signal) and each DAO's own Governor smart contract (source of truth) — the discrepancy field flags when a public tracker is silent about something real happening onchain. /proposal-status checks whether one already-known proposal_id actually got executed onchain (queued/executed/expired/canceled), not just left as 'succeeded' forever — pass a proposal_id from /dao-proposals or any other source. /vesting-status reads one known vesting plan/stream directly from an on-chain contract on Base (Hedgey TokenVestingPlans or Sablier SablierLockup, selected via the required provider query parameter) — total amount, claimed/unclaimed balance, remaining lockup, current owner/recipient — verified against the contract on every call instead of trusting a dashboard's cached view. /insider-early-sale-check composes the same plan/stream lookup (same provider query parameter) with a full onchain scan of the beneficiary for outgoing transfers of the vested token, flagging any that happened before the plan's cliff date (the only fully onchain-provable early-sale signal) — a heavy, deep check (cold runs typically take 60-150+ seconds), priced and rate-limited accordingly. /safe-signer-drift reads a Gnosis Safe's current spending authority (owners, threshold, enabled modules, guard) and compares it against the same Safe's configuration at an earlier block read from chain history, flagging added/removed owners, added/removed modules and threshold changes — no stored baseline and no subscription, so the first request already answers 'has this changed'. /oracle-staleness reports how stale Chainlink's and Pyth's prices actually are on Base and whether a standard consumer guard would reject them, judged against each feed's own measured cadence rather than one global threshold. /lending-depeg-exposure measures an Aave V3 position against a risk Aave's published health factor structurally cannot show: Aave prices wstETH with stETH pinned to ETH at 1:1, so a stETH depeg does not move that number at all — this route independently recomputes the health factor and answers at what depeg level the position becomes liquidatable. Free /preview variant on each paid route (no payment) returns real, non-fabricated example output for inspection before paying. GET /echo is a protocol smoke test only, no real data.","contact":{"email":"junkalwaysshine@gmail.com"}},"paths":{"/proposal-state-check":{"get":{"operationId":"proposalStateCheck","summary":"Cheap poll: has this proposal's state changed since your last check","tags":["Governance"],"parameters":[{"name":"dao","in":"query","required":true,"schema":{"type":"string"},"description":"DAO name from the supported list."},{"name":"proposal_id","in":"query","required":true,"schema":{"type":"string"},"description":"Decimal proposal id from that DAO's Governor."},{"name":"state","in":"query","required":false,"schema":{"type":"string"},"description":"The state returned last time. Omit for a baseline."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Comparison result: baseline / unchanged / changed. The terminal flag marks states that can never change again (executed, defeated, canceled, expired); when it is true the response says so and tells you to stop polling.","content":{"application/json":{"schema":{"type":"object","properties":{"dao":{"type":"string"},"proposal_id":{"type":"string"},"status":{"type":"string","enum":["baseline","unchanged","changed"]},"state":{"type":"string"},"presented":{"type":["string","null"]},"terminal":{"type":"boolean"},"detail":{"type":["string","null"]},"next":{"type":["string","null"]},"checked_at":{"type":"string","format":"date-time"}},"required":["dao","proposal_id","status","state","terminal","checked_at"]}}}},"400":{"description":"invalid_input — dao or proposal_id missing/unknown"},"402":{"description":"Payment Required"},"404":{"description":"proposal_not_found"}}}},"/x402-listing-drift-check":{"get":{"operationId":"x402ListingDriftCheck","summary":"Does a catalogue listing still match what the origin serves","tags":["Catalogue"],"parameters":[{"name":"resource","in":"query","required":true,"schema":{"type":"string"},"description":"Absolute http(s) URL of the listed resource. Public hosts only."},{"name":"advertised_price","in":"query","required":false,"schema":{"type":"string"},"description":"What the catalogue claims, e.g. \"$0.005\". Omit to just read the live terms."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Comparison between the catalogue's claim and the price the origin states in its own 402, which is the authoritative side. Demand for this route is not measured; it exists because the defect it reports was measured on our own surface first.","content":{"application/json":{"schema":{"type":"object","properties":{"resource":{"type":"string"},"status":{"type":"string","enum":["matches","price_drift","dead","unbuyable_headers","not_x402","indeterminate"]},"advertised_price_usd":{"type":["string","null"]},"live":{"type":"object","properties":{"http_status":{"type":["integer","null"]},"price_usd":{"type":["string","null"]},"network":{"type":["string","null"]},"pay_to":{"type":["string","null"]},"header_bytes":{"type":["integer","null"]},"latency_ms":{"type":"integer"}}},"actionable":{"type":"boolean"},"detail":{"type":"string"},"checked_at":{"type":"string"}}}}}},"400":{"description":"resource missing, malformed, or resolving to a non-public address."},"402":{"description":"Payment required."}}}},"/vesting-plan-control-check":{"get":{"operationId":"vestingPlanControlCheck","summary":"Cheap poll: can anyone other than you take this vesting plan","tags":["Vesting"],"parameters":[{"name":"provider","in":"query","required":true,"schema":{"type":"string","enum":["hedgey"]},"description":"Only hedgey in this version."},{"name":"plan_id","in":"query","required":true,"schema":{"type":"string"},"description":"Hedgey plan id (ERC-721 token id) on Base."},{"name":"fingerprint","in":"query","required":false,"schema":{"type":"string"},"description":"The fingerprint returned last time. Omit for a baseline."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Comparison result. plan_closed is deliberately distinct from changed: Hedgey burns the plan NFT on full redemption, and measured over a year 90.4 percent of fingerprint changes are a finished plan rather than an authority change.","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["hedgey"]},"plan_id":{"type":"string"},"status":{"type":"string","enum":["baseline","unchanged","changed","plan_closed","indeterminate"]},"fingerprint":{"type":["string","null"]},"presented":{"type":["string","null"]},"covers":{"type":["object","null"],"properties":{"vesting_admin":{"type":"string"},"admin_transfer_obo":{"type":"boolean"},"owner":{"type":["string","null"]}}},"terminal":{"type":"boolean"},"detail":{"type":["string","null"]},"checked_at":{"type":"string","format":"date-time"}},"required":["provider","plan_id","status","fingerprint","presented","terminal","checked_at"]}}}},"400":{"description":"invalid_input — provider or plan_id missing/malformed"},"402":{"description":"Payment Required"},"404":{"description":"plan_not_found"}}}},"/safe-authority-check":{"get":{"operationId":"safeAuthorityCheck","summary":"Cheap poll: has spending authority over this Safe changed since your last check","tags":["Safe"],"parameters":[{"name":"chain_id","in":"query","required":true,"schema":{"type":"string"},"description":"Numeric chain id, e.g. 1 or 8453."},{"name":"address","in":"query","required":true,"schema":{"type":"string"},"description":"Safe address on that chain."},{"name":"fingerprint","in":"query","required":false,"schema":{"type":"string"},"description":"The fingerprint this route returned last time. Omit to get a baseline. You hold the baseline: nothing is stored server-side, so there is no account and no subscription."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Comparison result. status is one of baseline / unchanged / changed / indeterminate / not_a_safe. indeterminate means the authority walk was truncated or the presented fingerprint is of an older version — it is NOT an all-clear and must not be treated as unchanged.","content":{"application/json":{"schema":{"type":"object","properties":{"chain_id":{"type":"integer"},"address":{"type":"string"},"status":{"type":"string","enum":["baseline","unchanged","changed","indeterminate","not_a_safe"]},"fingerprint":{"type":["string","null"]},"presented":{"type":["string","null"]},"covers":{"type":["object","null"],"description":"What the fingerprint is computed over: owners, threshold, guard, module_guard, singleton, graph_nodes, nested_safes. The nonce is deliberately excluded so ordinary transactions do not read as an authority change."},"detail":{"type":["string","null"]},"next":{"type":["string","null"]},"checked_at":{"type":"string","format":"date-time"}},"required":["chain_id","address","status","checked_at"]}}}},"400":{"description":"invalid_input — chain_id or address missing/malformed"},"402":{"description":"Payment Required"}}}},"/echo":{"get":{"operationId":"echo","summary":"Protocol smoke test — confirms payment, returns a timestamp","tags":["Protocol"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"ts":{"type":"string","format":"date-time"}},"required":["ok","ts"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/dao-proposals":{"get":{"operationId":"getDaoProposals","summary":"Active DAO governance proposals, cross-checked against each Governor contract","tags":["Governance"],"parameters":[{"name":"dao","in":"query","required":false,"schema":{"type":"string","enum":["ENS","Arbitrum","Uniswap","Compound","Optimism","Lido","Curve (Ownership)","Curve (Parameter)","Aave"]},"description":"Filter to a single DAO: ENS, Arbitrum, Uniswap, Compound, Optimism, Lido, Curve (Ownership), Curve (Parameter), Aave. Omit for all."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"dao":{"type":"string","enum":["ENS","Arbitrum","Uniswap","Compound","Optimism","Lido","Curve (Ownership)","Curve (Parameter)","Aave"],"description":"Query parameter. Filter to a single DAO: ENS, Arbitrum, Uniswap, Compound, Optimism, Lido, Curve (Ownership), Curve (Parameter), Aave. Omit for all."}},"additionalProperties":false}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"generated_at":{"type":"string","format":"date-time"},"degraded":{"type":"boolean"},"sources_status":{"type":"object","additionalProperties":{"type":"object","properties":{"snapshot":{"type":"string","enum":["ok","degraded","unavailable","not_applicable"]},"onchain":{"type":"string","enum":["ok","degraded","unavailable","not_applicable"]}},"required":["snapshot","onchain"],"additionalProperties":false}},"proposals":{"type":"array","items":{"type":"object","properties":{"dao":{"type":"string"},"proposal_id":{"type":"string"},"sources":{"type":"array","items":{"type":"string","enum":["snapshot","onchain"]}},"title":{"type":"string"},"vote_type":{"type":"string","enum":["offchain_signal","onchain_binding"]},"status":{"type":"string","enum":["pending","active","closed_advisory","defeated","succeeded","queued","executed","expired","canceled"]},"opens_at":{"type":["string","null"],"format":"date-time"},"closes_at":{"type":["string","null"],"format":"date-time"},"time_remaining_seconds":{"type":["number","null"]},"votes":{"type":["object","null"],"properties":{"for":{"type":"string"},"against":{"type":"string"},"abstain":{"type":"string"},"unit":{"type":"string"}},"required":["for","against","abstain","unit"],"additionalProperties":false},"quorum_required":{"type":["string","null"]},"after_close":{"type":"object","properties":{"code":{"type":"string","enum":["offchain_advisory","onchain_timelock","onchain_direct_execution","closed"]},"detail":{"type":"string"}},"required":["code","detail"],"additionalProperties":false},"proposer":{"type":["string","null"]},"chain":{"type":["string","null"]},"links":{"type":"object","properties":{"snapshot":{"type":"string"},"explorer":{"type":"string"}},"additionalProperties":false},"onchain_verified_at":{"type":["string","null"],"format":"date-time"},"discrepancy":{"type":["string","null"]},"discrepancy_check":{"type":"object","properties":{"status":{"type":"string","enum":["checked","not_applicable"]},"detail":{"type":"string"}},"required":["status","detail"],"additionalProperties":false},"fetched_at":{"type":"string","format":"date-time"}},"required":["dao","proposal_id","sources","title","vote_type","status","opens_at","closes_at","after_close","links","onchain_verified_at","discrepancy","discrepancy_check","fetched_at"],"additionalProperties":false}}},"required":["count","generated_at","degraded","sources_status","proposals"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/proposal-status":{"get":{"operationId":"getProposalStatus","summary":"Execution finality of one already-known proposal — did a passed vote actually execute","tags":["Governance"],"parameters":[{"name":"dao","in":"query","required":true,"schema":{"type":"string","enum":["ENS","Arbitrum","Uniswap","Compound"]},"description":"One of: ENS, Arbitrum, Uniswap, Compound. Optimism not yet supported — event-schema mismatch on that DAO's Governor fork, tracked separately, not silently dropped."},{"name":"proposal_id","in":"query","required":true,"schema":{"type":"string"},"description":"Decimal proposal_id from that DAO's Governor contract, e.g. from /dao-proposals."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dao":{"type":"string","enum":["ENS","Arbitrum","Uniswap","Compound"],"description":"Query parameter."},"proposal_id":{"type":"string","description":"Query parameter. Decimal proposal_id."}},"required":["dao","proposal_id"],"additionalProperties":false}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dao":{"type":"string"},"proposal_id":{"type":"string"},"status":{"type":"string","enum":["pending","active","defeated","succeeded","queued","executed","expired","canceled"]},"execution_eta":{"type":["string","null"],"format":"date-time"},"detail":{"type":"string"},"chain":{"type":"string"},"links":{"type":"object","properties":{"explorer":{"type":"string"}},"required":["explorer"],"additionalProperties":false},"checked_at":{"type":"string","format":"date-time"}},"required":["dao","proposal_id","status","execution_eta","detail","chain","links","checked_at"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/vesting-status":{"get":{"operationId":"getVestingStatus","summary":"Vesting plan/stream status (Hedgey or Sablier) — direct on-chain read of one known plan_id/stream_id, verified every call","tags":["Vesting"],"parameters":[{"name":"provider","in":"query","required":true,"schema":{"type":"string","enum":["hedgey","sablier"]},"description":"REQUIRED. Which contract to read: hedgey (TokenVestingPlans) or sablier (SablierLockup V2/v4). No default — plan_id/stream_id ranges overlap between the two contracts on Base (the same numeric id can be a real, distinct record on both at once), so an ambiguous or missing provider is rejected with 400, never guessed."},{"name":"plan_id","in":"query","required":true,"schema":{"type":"string"},"description":"Hedgey plan_id (ERC-721 token id) when provider=hedgey, or Sablier stream_id when provider=sablier. Both on Base."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["hedgey","sablier"],"description":"Query parameter. REQUIRED. hedgey or sablier — no default, see parameters above."},"plan_id":{"type":"string","description":"Query parameter. Hedgey plan_id or Sablier stream_id (depending on provider), on Base."}},"required":["provider","plan_id"],"additionalProperties":false}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"protocol":{"type":"string"},"plan_id":{"type":"string"},"chain":{"type":"string"},"contract":{"type":"string"},"token":{"type":"string"},"beneficiary":{"type":["string","null"]},"status":{"type":"string","enum":["not_started","cliff_pending","vesting","fully_vested","canceled"]},"amounts":{"type":"object","properties":{"total":{"type":"string"},"claimable_now":{"type":"string"},"unvested_remainder":{"type":"string"},"already_withdrawn":{"type":["string","null"]},"refunded":{"type":["string","null"]},"unit":{"type":"string"},"raw":{"type":"object","properties":{"total":{"type":"string"},"claimable_now":{"type":"string"},"unvested_remainder":{"type":"string"},"already_withdrawn":{"type":["string","null"]},"refunded":{"type":["string","null"]}},"required":["total","claimable_now","unvested_remainder"],"additionalProperties":false}},"required":["total","claimable_now","unvested_remainder","unit","raw"],"additionalProperties":false},"starts_at":{"type":"string","format":"date-time"},"cliff_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"discrepancy":{"type":["string","null"]},"onchain_verified_at":{"type":"string","format":"date-time"},"fetched_at":{"type":"string","format":"date-time"}},"required":["protocol","plan_id","chain","contract","token","beneficiary","status","amounts","starts_at","cliff_at","ends_at","discrepancy","onchain_verified_at","fetched_at"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/insider-early-sale-check":{"get":{"operationId":"getInsiderEarlySaleCheck","summary":"Did a vesting plan/stream's beneficiary sell tokens before the cliff unlocked anything? Heavy, deep onchain scan","tags":["Vesting"],"parameters":[{"name":"provider","in":"query","required":true,"schema":{"type":"string","enum":["hedgey","sablier"]},"description":"REQUIRED. Same meaning and same rejection rule as GET /vesting-status's provider parameter: hedgey (TokenVestingPlans) or sablier (SablierLockup V2/v4), no default, ambiguous or missing provider is rejected with 400."},{"name":"plan_id","in":"query","required":true,"schema":{"type":"string"},"description":"Hedgey plan_id or Sablier stream_id (depending on provider), on Base -- same value GET /vesting-status accepts."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["hedgey","sablier"],"description":"Query parameter. REQUIRED. hedgey or sablier — no default, see parameters above."},"plan_id":{"type":"string","description":"Query parameter. Hedgey plan_id or Sablier stream_id (depending on provider), on Base."}},"required":["provider","plan_id"],"additionalProperties":false}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.050000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"plan_id":{"type":"string"},"protocol":{"type":"string"},"plan_status":{"type":"string","enum":["not_started","cliff_pending","vesting","fully_vested"]},"insider_check":{"type":"object","properties":{"beneficiary":{"type":"string"},"token":{"type":"string"},"chain":{"type":"string"},"vesting_reference":{"type":["object","null"],"properties":{"starts_at":{"type":"string","format":"date-time"},"cliff_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"}},"required":["starts_at","cliff_at","ends_at"],"additionalProperties":false},"outgoing_transfers":{"type":"array","items":{"type":"object","properties":{"hash":{"type":"string"},"block_number":{"type":"number"},"timestamp":{"type":"string","format":"date-time"},"from":{"type":"string"},"to":{"type":"string"},"amount":{"type":"string"},"amount_raw":{"type":"string"},"asset_symbol":{"type":["string","null"]},"early_flag":{"type":"string","enum":["before_cliff","unknown","after_vesting_end"]}},"required":["hash","block_number","timestamp","from","to","amount","amount_raw","asset_symbol","early_flag"],"additionalProperties":false}},"transfer_count":{"type":"number"},"before_cliff_count":{"type":"number"},"unknown_window_count":{"type":"number"},"earliest_before_cliff_at":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["clean","flagged","no_transfers","no_vesting_reference"]},"onchain_verified_at":{"type":"string","format":"date-time"},"fetched_at":{"type":"string","format":"date-time"}},"required":["beneficiary","token","chain","vesting_reference","outgoing_transfers","transfer_count","before_cliff_count","unknown_window_count","earliest_before_cliff_at","status","onchain_verified_at","fetched_at"],"additionalProperties":false}},"required":["plan_id","protocol","plan_status","insider_check"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/safe-signer-drift":{"get":{"operationId":"getSafeSignerDrift","summary":"Who can move this Safe's funds now, and what changed since an earlier block -- read from chain history, no stored baseline","tags":["Treasury"],"parameters":[{"name":"chain_id","in":"query","required":true,"schema":{"type":"string","enum":["1","8453","42161","10"]},"description":"REQUIRED, and never guessed. A Safe proxy is routinely deployed at the SAME address on several chains, and those are DIFFERENT Safes with different owners. 1 Ethereum, 8453 Base, 42161 Arbitrum, 10 Optimism."},{"name":"address","in":"query","required":true,"schema":{"type":"string"},"description":"REQUIRED. The Safe proxy address on that chain (0x + 40 hex), either all-lowercase or carrying a correct EIP-55 checksum. A checksum that does not match is refused with 400 rather than answered about whatever contract happens to sit at the mistyped address."},{"name":"lookback_blocks","in":"query","required":false,"schema":{"type":"string"},"description":"Optional. How far back the earlier configuration is read, in blocks. Defaults to roughly 30 days for the given chain."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chain_id":{"type":"string","enum":["1","8453","42161","10"],"description":"Query parameter. REQUIRED. See parameters above -- same address on another chain is another Safe."},"address":{"type":"string","description":"Query parameter. REQUIRED. Safe proxy address on that chain."},"lookback_blocks":{"type":"string","description":"Query parameter. Optional. Baseline distance in blocks; defaults to about 30 days."}},"required":["chain_id","address"],"additionalProperties":false}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.030000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string"},"chain_id":{"type":"integer"},"address":{"type":"string"},"address_status":{"type":"string","enum":["safe","contract_but_not_safe","no_code"]},"current":{"anyOf":[{"type":"object","properties":{"block_number":{"type":"string"},"block_timestamp":{"type":["string","null"],"format":"date-time"},"owners":{"type":"array","items":{"type":"string"}},"owner_count":{"type":"integer"},"threshold":{"type":"integer"},"nonce":{"type":"string"},"modules":{"type":"array","items":{"type":"string"}},"module_count":{"type":"integer"},"guard":{"type":"object","properties":{"status":{"type":"string","enum":["none","set","not_applicable"]},"address":{"type":["string","null"]},"note":{"type":["string","null"]}},"required":["status","address","note"],"additionalProperties":false},"version":{"type":["string","null"]},"singleton":{"type":["string","null"]}},"required":["block_number","block_timestamp","owners","owner_count","threshold","nonce","modules","module_count","guard","version","singleton"],"additionalProperties":false},{"type":"null"}]},"baseline":{"anyOf":[{"type":"object","properties":{"block_number":{"type":"string"},"block_timestamp":{"type":["string","null"],"format":"date-time"},"owners":{"type":"array","items":{"type":"string"}},"owner_count":{"type":"integer"},"threshold":{"type":"integer"},"nonce":{"type":"string"},"modules":{"type":"array","items":{"type":"string"}},"module_count":{"type":"integer"},"guard":{"type":"object","properties":{"status":{"type":"string","enum":["none","set","not_applicable"]},"address":{"type":["string","null"]},"note":{"type":["string","null"]}},"required":["status","address","note"],"additionalProperties":false},"version":{"type":["string","null"]},"singleton":{"type":["string","null"]}},"required":["block_number","block_timestamp","owners","owner_count","threshold","nonce","modules","module_count","guard","version","singleton"],"additionalProperties":false},{"type":"null"}]},"drift":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["unchanged","changed","not_deployed_at_from_block","not_a_safe_at_from_block"]},"owners_added":{"type":"array","items":{"type":"string"}},"owners_removed":{"type":"array","items":{"type":"string"}},"threshold_before":{"type":["integer","null"]},"threshold_after":{"type":["integer","null"]},"modules_enabled":{"type":"array","items":{"type":"string"}},"modules_disabled":{"type":"array","items":{"type":"string"}},"guard_before":{"type":["string","null"]},"guard_after":{"type":["string","null"]},"version_before":{"type":["string","null"]},"version_after":{"type":["string","null"]},"changed_to_current_at":{"anyOf":[{"type":"object","properties":{"block_number":{"type":"string"},"block_timestamp":{"type":["string","null"],"format":"date-time"}},"required":["block_number","block_timestamp"],"additionalProperties":false},{"type":"null"}]},"change_block_method":{"type":"string","enum":["binary_search_verified","not_searched","search_exhausted"]},"change_block_search_calls":{"type":"integer"}},"required":["status","owners_added","owners_removed","threshold_before","threshold_after","modules_enabled","modules_disabled","guard_before","guard_after","version_before","version_after","changed_to_current_at","change_block_method","change_block_search_calls"],"additionalProperties":false},{"type":"null"}]},"spending_authority":{"anyOf":[{"type":"object","properties":{"owners":{"type":"array","items":{"type":"string"}},"threshold":{"type":"integer"},"owner_count":{"type":"integer"},"unilateral_modules":{"type":"array","items":{"type":"string"}},"threshold_is_bypassable_by_module":{"type":"boolean"},"guard":{"type":"object","properties":{"status":{"type":"string","enum":["none","set","not_applicable"]},"address":{"type":["string","null"]},"note":{"type":["string","null"]}},"required":["status","address","note"],"additionalProperties":false}},"required":["owners","threshold","owner_count","unilateral_modules","threshold_is_bypassable_by_module","guard"],"additionalProperties":false},{"type":"null"}]},"archive_proof":{"anyOf":[{"type":"object","properties":{"endpoint":{"type":"string"},"canary_present_block":{"type":"string"},"canary_absent_block":{"type":"string"},"verified_at":{"type":"string","format":"date-time"}},"required":["endpoint","canary_present_block","canary_absent_block","verified_at"],"additionalProperties":false},{"type":"null"}]},"discrepancy":{"type":["string","null"]},"onchain_verified_at":{"type":"string","format":"date-time"},"fetched_at":{"type":"string","format":"date-time"},"power_graph":{"type":["object","null"],"description":"Who can actually move funds: modules expanded recursively, EIP-1167 minimal proxies unwrapped, and modules that are themselves Safes reported with their own threshold. The canonical Safe tx-service returns 404 for a module address, so nothing below the first level is available from it. No verdicts: a module is not an alarm by itself. null means the walk did not run or failed — not that there are no modules.","properties":{"root":{"type":"string"},"maxDepthReached":{"type":"integer"},"truncated":{"type":"boolean","description":"The walk was cut short, so the picture is incomplete."},"nestedSafeCount":{"type":"integer","description":"Modules that are themselves Safes — the part a flat module list cannot show."},"nodes":{"type":"array","items":{"type":"object"}}}}},"required":["chain","chain_id","address","address_status","current","baseline","drift","spending_authority","archive_proof","discrepancy","onchain_verified_at","fetched_at"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/oracle-staleness":{"get":{"operationId":"getOracleStaleness","summary":"How stale each oracle price is on Base right now, judged per feed rather than by one global threshold","tags":["Oracles"],"parameters":[{"name":"assets","in":"query","required":false,"schema":{"type":"string"},"description":"Optional. Comma-separated: ETH/USD, BTC/USD, USDC/USD. Omit for all three. An unsupported asset is refused with 400 rather than served against a generic threshold -- each feed carries its own measured cadence, and on this chain those cadences differ by more than an order of magnitude."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assets":{"type":"string","description":"Query parameter. Optional. Comma-separated asset list; omit for all supported feeds."}},"required":[],"additionalProperties":false}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"generated_at":{"type":"string","format":"date-time"},"degraded":{"type":"boolean"},"asset_status":{"type":"object","additionalProperties":{"type":"string","enum":["ok","partial","unavailable"]}},"assets":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"string"},"chain":{"type":"string"},"observed_at_block":{"type":"string"},"observed_at_block_time":{"type":"string","format":"date-time"},"chainlink":{"type":["object","null"],"properties":{"proxy":{"type":"string"},"aggregator":{"type":"string"},"phase_id":{"type":"number"},"description":{"type":"string"},"decimals":{"type":"number"},"proxy_verified":{"type":"boolean"},"round_id":{"type":"string"},"price":{"type":"string"},"price_raw":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"age_seconds":{"type":"number"},"heartbeat_seconds":{"type":"number"},"stale_after_seconds":{"type":"number"},"would_standard_guard_reject":{"type":"boolean"},"guard_rule":{"type":"string"},"naive_uniform_guard_would_reject":{"type":"boolean"},"naive_uniform_guard_seconds":{"type":"number"}},"required":["proxy","aggregator","phase_id","description","decimals","proxy_verified","round_id","price","price_raw","updated_at","age_seconds","heartbeat_seconds","stale_after_seconds","would_standard_guard_reject","guard_rule","naive_uniform_guard_would_reject","naive_uniform_guard_seconds"],"additionalProperties":false},"pyth":{"type":["object","null"],"properties":{"contract":{"type":"string"},"implementation":{"type":"string"},"implementation_matches_pinned":{"type":"boolean"},"feed_id":{"type":"string"},"price":{"type":"string"},"price_raw":{"type":"string"},"expo":{"type":"number"},"publish_time":{"type":"string","format":"date-time"},"age_seconds":{"type":"number"},"valid_time_period_seconds":{"type":"number"},"would_standard_guard_reject":{"type":"boolean"},"guard_rule":{"type":"string"},"would_revert_with_selector":{"type":["string","null"]},"would_revert_with_error":{"type":["string","null"]},"confidence_raw":{"type":"string"},"confidence":{"type":"string"}},"required":["contract","implementation","implementation_matches_pinned","feed_id","price","price_raw","expo","publish_time","age_seconds","valid_time_period_seconds","would_standard_guard_reject","guard_rule","would_revert_with_selector","would_revert_with_error","confidence_raw","confidence"],"additionalProperties":false},"sources_status":{"type":"object","properties":{"chainlink":{"type":"string","enum":["ok","degraded","unavailable"]},"pyth":{"type":"string","enum":["ok","degraded","unavailable"]}},"required":["chainlink","pyth"],"additionalProperties":false},"spread":{"type":"object","properties":{"bps":{"type":["number","null"]},"pyth_confidence_bps":{"type":["number","null"]},"exceeds_pyth_confidence":{"type":["boolean","null"]},"unavailable_reason":{"type":["string","null"]},"interpretation":{"type":"string"}},"required":["bps","pyth_confidence_bps","exceeds_pyth_confidence","unavailable_reason","interpretation"],"additionalProperties":false},"any_source_would_be_rejected":{"type":"boolean"},"verdict":{"type":"string"},"fetched_at":{"type":"string","format":"date-time"}},"required":["asset","chain","observed_at_block","observed_at_block_time","chainlink","pyth","sources_status","spread","any_source_would_be_rejected","verdict","fetched_at"],"additionalProperties":false}}},"required":["count","generated_at","degraded","asset_status","assets"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/lending-depeg-exposure":{"get":{"operationId":"getLendingDepegExposure","summary":"At what stETH depeg does this Aave V3 position get liquidated -- the risk Aave's own health factor structurally cannot show","tags":["Lending"],"parameters":[{"name":"chain","in":"query","required":true,"schema":{"type":"string","enum":["ethereum","base"]},"description":"REQUIRED. A chain KEY, not a numeric chain id: ethereum or base."},{"name":"borrower","in":"query","required":true,"schema":{"type":"string"},"description":"REQUIRED. The borrower address (0x + 40 hex) whose Aave V3 position is analysed. A position holding no wstETH is reported as not exposed rather than forced into a score."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string","enum":["ethereum","base"],"description":"Query parameter. REQUIRED. Chain key, not a chain id."},"borrower":{"type":"string","description":"Query parameter. REQUIRED. Borrower address whose Aave V3 position is analysed."}},"required":["chain","borrower"],"additionalProperties":false}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"protocol":{"type":"string","enum":["aave-v3"]},"chain":{"type":"string"},"pool":{"type":"string"},"borrower":{"type":"string"},"block_number":{"type":"string"},"block_timestamp":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["wsteth_exposed","no_wsteth_collateral","no_debt","no_position"]},"emode_category_id":{"type":"number"},"emode_label":{"type":["string","null"]},"aave_reported":{"type":"object","properties":{"total_collateral_base":{"type":"string"},"total_debt_base":{"type":"string"},"available_borrows_base":{"type":"string"},"current_liquidation_threshold_bps":{"type":"number"},"ltv_bps":{"type":"number"},"health_factor":{"type":["string","null"]},"health_factor_is_max_uint":{"type":"boolean"}},"required":["total_collateral_base","total_debt_base","available_borrows_base","current_liquidation_threshold_bps","ltv_bps","health_factor","health_factor_is_max_uint"],"additionalProperties":false},"independent_recompute":{"type":"object","properties":{"matches_aave_exactly":{"type":"boolean"},"total_collateral_base":{"type":"string"},"total_debt_base":{"type":"string"},"available_borrows_base":{"type":"string"},"current_liquidation_threshold_bps":{"type":"number"},"ltv_bps":{"type":"number"},"health_factor":{"type":["string","null"]}},"required":["matches_aave_exactly","total_collateral_base","total_debt_base","available_borrows_base","current_liquidation_threshold_bps","ltv_bps","health_factor"],"additionalProperties":false},"collateral":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"string"},"symbol":{"type":["string","null"]},"decimals":{"type":"number"},"balance_raw":{"type":"string"},"balance":{"type":"string"},"price_base":{"type":"string"},"value_base":{"type":"string"},"is_wsteth":{"type":"boolean"},"liquidation_threshold_bps":{"type":"number"},"asset_liquidation_threshold_bps":{"type":"number"},"emode_override_applied":{"type":"boolean"}},"required":["asset","symbol","decimals","balance_raw","balance","price_base","value_base","is_wsteth","liquidation_threshold_bps","asset_liquidation_threshold_bps","emode_override_applied"],"additionalProperties":false}},"debt":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"string"},"symbol":{"type":["string","null"]},"decimals":{"type":"number"},"balance_raw":{"type":"string"},"balance":{"type":"string"},"price_base":{"type":"string"},"value_base":{"type":"string"},"is_wsteth":{"type":"boolean"}},"required":["asset","symbol","decimals","balance_raw","balance","price_base","value_base","is_wsteth"],"additionalProperties":false}},"wsteth_pricing":{"type":["object","null"],"properties":{"asset":{"type":"string"},"oracle_adapter":{"type":"string"},"adapter_description":{"type":"string"},"ratio":{"type":"string"},"ratio_decimals":{"type":"number"},"ratio_provider":{"type":"string"},"eth_usd_base":{"type":"string"},"wsteth_usd_base":{"type":"string"},"decomposition_exact":{"type":"boolean"},"steth_priced_at_par_with_eth":{"type":"boolean"}},"required":["asset","oracle_adapter","adapter_description","ratio","ratio_decimals","ratio_provider","eth_usd_base","wsteth_usd_base","decomposition_exact","steth_priced_at_par_with_eth"],"additionalProperties":false},"wsteth_collateral_share_bps":{"type":["number","null"]},"liquidation_depeg_bps":{"type":["number","null"]},"liquidation_depeg_unreachable":{"type":"boolean"},"scenarios":{"type":"array","items":{"type":"object","properties":{"steth_depeg_bps":{"type":"number"},"wsteth_price_base":{"type":"string"},"health_factor":{"type":"string"},"liquidatable":{"type":"boolean"}},"required":["steth_depeg_bps","wsteth_price_base","health_factor","liquidatable"],"additionalProperties":false}},"blind_spot":{"type":"string"},"onchain_verified_at":{"type":"string","format":"date-time"},"fetched_at":{"type":"string","format":"date-time"}},"required":["protocol","chain","pool","borrower","block_number","block_timestamp","status","emode_category_id","emode_label","aave_reported","independent_recompute","collateral","debt","wsteth_pricing","wsteth_collateral_share_bps","liquidation_depeg_bps","liquidation_depeg_unreachable","scenarios","blind_spot","onchain_verified_at","fetched_at"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}}},"x-x402-payTo":"0xE606AE66542D4F1A56AA551841db41e3ECd26816","x-x402-network":"eip155:8453"}