Docs

Get market positions health

Cursor-paginated LTV of every position with debt in one listed Morpho Blue market, for polling liquidation risk.


GET
/v0/blue/markets/{market-selector}/positions/health

Freshness. A position's row is rewritten a few seconds after an event changes its balances (supply, withdraw, borrow, repay, collateral moves, liquidation). Price, interest and other market-level changes come from a per-chain refresh that runs about every 30 seconds, so they can be about two minutes behind chain state. ltv_computed_at is when that per-chain refresh last completed; a stale snapshot is still served, never recomputed live. Returns 503 if the chain's snapshot has never been refreshed.

Accuracy. Debt is computed from the market state at its last indexed event, so it leaves out interest accrued since then and ltv_wad can be understated, most on quiet markets. A row is only rewritten when its health factor moves by more than 0.01% or its ltv_wad crosses the market's LLTV, so other thresholds can trail by that amount. Debt is rounded down, so a position whose debt rounds down to zero is left out. These values are monitoring signals: re-check a position onchain before acting on it.

Pagination. Each page is read from the latest snapshot, so a walk over several pages can span refreshes. A position that starts matching ltv_wad_gte before the cursor's position in that walk shows up on the next walk, not this one.

Coverage. Listed markets only (404 otherwise). A market without an oracle price returns no rows.

Path Parameters

market-selector*string

Selector formatted as <chain_id>:<market_id>. Example: 1:0xfff1970c0ffae288764186fbb38a9171a17e98676744a1e345809cb8b9e73342.

Format<chain_id>:<market_id>

Query Parameters

ltv_wad_gte?string

Minimum ltv_wad, inclusive (1e18 = 100%). Omit to return every position with debt.

Match^\d{1,78}$
limit?integer

Maximum number of positions to return. Default 100, maximum 1000.

Range1 <= value <= 1000
Default100
cursor?string

Opaque pagination cursor from the previous page. It is bound to the market and ltv_wad_gte.

Length1 <= length <= 4096

Response Body

application/json

curl -X GET "https://example.com/v0/blue/markets/1:0xfff1970c0ffae288764186fbb38a9171a17e98676744a1e345809cb8b9e73342/positions/health"
{  "cursor": "string",  "data": [    {      "borrow_shares": "string",      "chain_id": 0,      "collateral_assets": "string",      "ltv_wad": "string",      "market_id": "string",      "user_address": "string"    }  ],  "last_indexed_block": "string",  "ltv_computed_at": 0}