{"openapi":"3.1.0","info":{"title":"Volta90 API","version":"0.1.0","description":"Public API for Volta90 vault oracle data."},"components":{"schemas":{"OracleSnapshot":{"type":"object","properties":{"_id":{"type":"string"},"timestamp":{"type":"string"},"totalAssets":{"type":"string"},"sharePrice":{"type":"number"}}},"SnapshotsResponse":{"type":"object","properties":{"vaultKey":{"type":"string"},"vaultName":{"type":"string"},"network":{"type":"string"},"count":{"type":"number"},"snapshots":{"type":"array","items":{"$ref":"#/components/schemas/OracleSnapshot"}}},"required":["vaultKey","vaultName","network","count","snapshots"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"LagoonPpsResponse":{"type":"object","properties":{"pricePerShare":{"type":"number","description":"Price per share rounded to 6 decimal places","example":1.023456}},"required":["pricePerShare"]},"LagoonErrorResponse":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"VaultEvent":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"category":{"type":"string"},"label":{"type":"string"},"blockNumber":{"type":"string"},"timestamp":{"type":"number"},"transactionHash":{"type":"string"},"contract":{"type":"string"},"details":{"type":"object","additionalProperties":{"nullable":true}}},"required":["id","type","category","label","blockNumber","timestamp","transactionHash","contract","details"]},"EventsResponse":{"type":"object","properties":{"vaultAddress":{"type":"string"},"count":{"type":"number"},"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"]}},"events":{"type":"array","items":{"$ref":"#/components/schemas/VaultEvent"}}},"required":["vaultAddress","count","categories","events"]},"EventsError":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}},"parameters":{}},"paths":{"/oracle/{vaultKey}/snapshots":{"get":{"tags":["Oracle"],"summary":"Get oracle snapshots for a vault","description":"Returns oracle snapshots from MongoDB for the given vault. The database name matches the vaultKey.","parameters":[{"schema":{"type":"string","description":"Vault key identifier (e.g. VLT90)","example":"VLT90"},"required":true,"name":"vaultKey","in":"path"},{"schema":{"type":"string","description":"Max number of snapshots to return (default 100, max 1000)"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Sort by timestamp (default desc)"},"required":false,"name":"sort","in":"query"},{"schema":{"type":"string","description":"Time interval filter — returns snapshots from the last period. Examples: 1h, 6h, 1d, 7d, 30d, 1y","example":"7d"},"required":false,"name":"interval","in":"query"},{"schema":{"type":"string","description":"Filter by snapshot ObjectId","example":"6650a1c2f1b2c3d4e5f60001"},"required":false,"name":"_id","in":"query"},{"schema":{"type":"string","description":"Filter snapshots by address","example":"0x1234…abcd"},"required":false,"name":"address","in":"query"}],"responses":{"200":{"description":"Oracle snapshots","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotsResponse"}}}},"400":{"description":"Invalid query parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Vault not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/oracle/{vaultKey}/trigger":{"post":{"tags":["Oracle"],"summary":"Trigger an on-demand NAV collection cycle","description":"Forwards trigger to the VPS collector. Requires x-api-key header.","parameters":[{"schema":{"type":"string","description":"Vault key identifier (e.g. VLT90)","example":"VLT90"},"required":true,"name":"vaultKey","in":"path"}],"responses":{"200":{"description":"Cycle triggered","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Collector unreachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/oracle/{vaultKey}/snapshots/{snapshotId}":{"delete":{"tags":["Oracle"],"summary":"Delete a single oracle snapshot","description":"Deletes a snapshot by its MongoDB _id. Requires x-api-key header.","parameters":[{"schema":{"type":"string","description":"Vault key identifier (e.g. VLT90)","example":"VLT90"},"required":true,"name":"vaultKey","in":"path"},{"schema":{"type":"string","example":"6650a1c2f1b2c3d4e5f60001"},"required":true,"name":"snapshotId","in":"path"}],"responses":{"200":{"description":"Snapshot deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"},"_id":{"type":"string"}},"required":["deleted","_id"]}}}},"400":{"description":"Invalid ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Snapshot not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/og":{"get":{"tags":["OG Images"],"summary":"Volta90 Open Graph image","description":"Returns the Volta90 branded OG image (1200x630 PNG). Cached for 1 hour.","responses":{"200":{"description":"PNG image (1200x630)","content":{"image/png":{"schema":{"nullable":true}}}}}}},"/lagoon/pps/{chainId}/{address}":{"get":{"tags":["Lagoon"],"summary":"Get latest price per share for a Lagoon vault","description":"Returns the latest known price per share (PPS) for a Lagoon vault via the Lagoon Finance API. Value is rounded to 6 decimal places.\n\n**Examples:**\n- Volta90 Multi-asset Trading (Arbitrum): `GET /lagoon/pps/42161/0x9e6de1f581d63129aF453fe1ea7253b280B4dcA8`","parameters":[{"schema":{"type":"string","description":"Chain ID (e.g. 1 = Ethereum, 42161 = Arbitrum)","example":"42161"},"required":true,"name":"chainId","in":"path"},{"schema":{"type":"string","description":"Vault contract address","example":"0x9e6de1f581d63129aF453fe1ea7253b280B4dcA8"},"required":true,"name":"address","in":"path"}],"responses":{"200":{"description":"Latest price per share (rounded to 6 decimals)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LagoonPpsResponse"}}}},"400":{"description":"Bad request (invalid chainId or address)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LagoonErrorResponse"}}}},"404":{"description":"Vault not found or no data available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LagoonErrorResponse"}}}},"502":{"description":"Lagoon API query failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LagoonErrorResponse"}}}}}}},"/events/{vaultAddress}":{"get":{"tags":["Events"],"summary":"Get on-chain events for a vault","description":"Queries the Goldsky subgraph for all events emitted by a vault contract.","parameters":[{"schema":{"type":"string","description":"Vault contract address","example":"0x9e6de1f581d63129aF453fe1ea7253b280B4dcA8"},"required":true,"name":"vaultAddress","in":"path"},{"schema":{"type":"string","description":"Number of events per type (default 100, max 1000)"},"required":false,"name":"first","in":"query"},{"schema":{"type":"string","description":"Offset for pagination (default 0)"},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string","description":"Filter by category: deposits, withdrawals, settlements, valuation, governance, transfers, system"},"required":false,"name":"category","in":"query"}],"responses":{"200":{"description":"Vault events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventsError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventsError"}}}}}}}}}