Perpl
Risk on Perpl, the perpetual futures exchange on Monad: where its open positions would be liquidated, what a price move would do to each market, how concentrated its positions, volume and liquidators are, which liquidations happened, the funding of a market and the risk card of one wallet. Sona reads every open position of every market from the exchange contract and computes each position's liquidation price with the published formula. Only Monad, eip155:143, is covered.
Snapshots. Positions come from a snapshot that Sona takes every 30 seconds, a few blocks behind the head. meta.as_of names its block and meta.finality is confirmed, because the snapshot's block is not checked for finality. The status route is not about a block, so its meta.finality is none. Liquidations and funding come from stored history, and their meta.as_of still names the snapshot, not the events.
Coverage. Every data ends with coverage, the codes of the limits that apply to that answer, such as perpl_snapshot_only (positions are read at one block), perpl_bad_debt_is_floor (a bad debt figure is a lower bound), perpl_history_partial (the liquidation history is still being read), perpl_funding_from_snapshots, perpl_oi_from_snapshots (open interest history starts when Sona began recording), perpl_leaderboard_figures (the leaderboard figures are Perpl's own) and perpl_snapshot_stale (refreshes are failing, so the numbers describe an earlier block). The status route explains each code in a sentence.
Markets and amounts. A market is named by its symbol in any case or by its decimal perp id. A USD amount, a price and a size are decimal strings, and a share or a distance is a number. Addresses are lowercase. The status, market, liquidation map, stress and account routes read the latest snapshot and may be up to 5 seconds old on top of that. The concentration, liquidations and funding routes may be up to 30 seconds old, and the market history and leaderboard routes up to a minute.
Endpoints
| Endpoint | Request |
|---|---|
| Markets | GET/v1/chains/{chain}/perpl/markets |
| Market | GET/v1/chains/{chain}/perpl/markets/{market} |
| Market history | GET/v1/chains/{chain}/perpl/markets/{market}/history |
| Liquidation map | GET/v1/chains/{chain}/perpl/markets/{market}/liquidation-map |
| Market stress | GET/v1/chains/{chain}/perpl/markets/{market}/stress |
| Stress all markets | GET/v1/chains/{chain}/perpl/stress |
| Concentration | GET/v1/chains/{chain}/perpl/concentration |
| Liquidations | GET/v1/chains/{chain}/perpl/liquidations |
| Liquidations by day | GET/v1/chains/{chain}/perpl/liquidations/daily |
| Funding | GET/v1/chains/{chain}/perpl/funding |
| Leaderboard | GET/v1/chains/{chain}/perpl/leaderboard |
| Account | GET/v1/chains/{chain}/perpl/accounts/{address} |
| Status | GET/v1/chains/{chain}/perpl/status |