Check how current the Perpl data is
/v1/chains/{chain}/perpl/statusCall this to see whether Sona has a snapshot and how old it is. The record holds:
exchange: the address of the Perpl exchange proxy that is read.implementationandimplementation_changed: the address behind the proxy (the ERC-1967 implementation slot), which Sona reads on every refresh, and whether it differs from the address Sona was configured to expect. Atruemeans that the exchange was upgraded and its formulas should be checked again before the numbers are trusted.implementationisnulluntil the first read.snapshot: theblockandtimeof the latest snapshot and its age in whole seconds, ornullbefore the first one.marketsandpositions: how many priced markets and open positions the snapshot holds (0 before the first snapshot).liquidations_indexed: how manyPositionLiquidatedevents the database holds.backfill:completewhen the history reaches back to the deployment block,runningwhile it is being read,pendingbefore it starts,retryingwhile it waits to try a failed read again, anddisabledwhen Sona has no key for the history source and keeps only what it has seen since it started.paid_rpc_calls: how many chain reads the RPC router billed to a paid provider since the start. It is 0 in normal operation.coverage: the five limits of the data, each with its code and a sentence, always in the same order. The other routes list the codes that apply to their answer in their owncoverage.
The route answers 200 also before the first snapshot exists, then with snapshot null and meta.finality none. It needs the database for liquidations_indexed.
Path parameters
| Name | Type | Description |
|---|---|---|
chainRequired | string | The chain, as a CAIP-2 chain ID. Only Monad, |
Response
The answer, wrapped in the {data, meta, links} envelope. data.kind is perpl_status. meta.finality is none.
| Field | Type | Description |
|---|---|---|
| backfill | string | The state of the liquidation history. |
| chain | string | The CAIP-2 id of the chain. |
| coverage | array of objects | The five limits of the data, always in the same order. |
| exchange | string | The Perpl exchange proxy that is read. |
| implementation | string | null | The address behind the proxy at the last read, |
| implementation_changed | boolean | Whether the implementation differs from the one Sona expects. A |
| kind | string | perpl_status |
| liquidations_indexed | integer | The number of liquidation events in the database. |
| markets | integer | The number of priced markets in the snapshot. |
| paid_rpc_calls | integer | Chain reads that the RPC router billed to a paid provider since the start. |
| positions | integer | The number of open positions in the snapshot. |
| snapshot | object | null | The latest snapshot, |
Cost
1 credit. The time limit is 5 seconds.
Errors
| Status | Code |
|---|---|
| 400 | invalid_idinvalid_query |
| 404 | unsupported_chain |
| 429 | rate_limitedcredits_exhausted |
| 500 | internal |
| 503 | upstream_unavailable |
| 504 | deadline_exceeded |
400 for a query parameter (this route takes none) or a chain that is no CAIP-2 id, 404 unsupported_chain, 503 upstream_unavailable when the database does not answer, and 504 deadline_exceeded when the budget runs out.