List markets
Cursor-paginated list of Midnight markets.
Use this to discover markets. For a given user's positions on those markets, follow up with GET /v0/midnight/users/{user-address}/positions.
Filters. Address filters (loan_assets, collateral_assets, oracle_addresses, enter_gates, liquidator_gates) must be combined with chain_ids — an address alone is not chain-unique. Lowercase addresses are checksummed server-side. Pass active_only=true to exclude markets past maturity.
Pagination. Response follows the list envelope: { cursor, data }. Pass back cursor verbatim on the next call. A null cursor means the last page.
Cache. public, max-age=5, stale-while-revalidate=2.
Query Parameters
Filter by chain ids. Required when any address filter is provided.
Filter by Midnight market ids. These ids are globally unique.
Filter by loan token addresses. Combine with chain_ids; lowercase input is checksummed.
Filter by collateral token addresses. Combine with chain_ids; lowercase input is checksummed.
Filter by collateral oracle addresses. Combine with chain_ids; lowercase input is checksummed.
Filter by enter gate addresses. Combine with chain_ids; lowercase input is checksummed.
Filter by liquidator gate addresses. Combine with chain_ids; lowercase input is checksummed.
Filter by exact maturity timestamps, in unix seconds.
When true, enforces maturity strictly after the current timestamp.
"true" | "false"Filter for maturities greater than or equal to this unix timestamp.
Filter for maturities less than or equal to this unix timestamp.
Filter for total units greater than or equal to this value.
^-?\d+$Filter for total units less than or equal to this value.
^-?\d+$Filter by listing status. When true, returns only markets surfaced by the app trust layer; when false, only unlisted markets. Omit to return both.
"true" | "false"Sort field for cursor pagination.
"total_units""total_units" | "maturity"Sort direction for cursor pagination.
"desc""asc" | "desc"Maximum number of items to return.
1001 <= value <= 1000Opaque cursor from a previous page response.
1 <= lengthResponse Body
application/json
application/json
curl -X GET "https://api.morpho.org/v0/midnight/markets"{
"cursor": "eyJzIjoidG90YWxfdW5pdHMiLCJkIjoiZGVzYyIsInYiOiIxMDAwMzAxMDkwNjI4MjgwIiwidk51bGwiOmZhbHNlLCJpIjpbODQ1MywiMHhkOTJkZTVlN2ZiYmRlNWE1ZTE2MTc4NzQyNjk4MmY3ZTFiMDFmYjUzYTcwNjBmOTVjMDIxMjM2ZDc0NDQ3NjE0Il19",
"data": [
{
"chain_id": 8453,
"collaterals": [
{
"liquidation_cursor": "1000000000000000000",
"lltv": "860000000000000000",
"oracle": "0xD09048c8B568Dbf5f189302beA26c9edABFC4858",
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
],
"continuous_fee_rate": "0",
"current_settlement_fee_cbp": "0",
"current_settlement_fee_wad": "0",
"enter_gate": "0x0000000000000000000000000000000000000000",
"liquidator_gate": "0x0000000000000000000000000000000000000000",
"listed": true,
"loan_token": "0x4200000000000000000000000000000000000006",
"market_id": "0xd92de5e7fbbde5a5e161787426982f7e1b01fb53a7060f95c021236d74447614",
"maturity": 1781276400,
"settlement_fee_schedule": [
{
"fee_cbp": "0",
"time_to_maturity_days": 0
},
{
"fee_cbp": "0",
"time_to_maturity_days": 1
},
{
"fee_cbp": "0",
"time_to_maturity_days": 7
},
{
"fee_cbp": "0",
"time_to_maturity_days": 30
},
{
"fee_cbp": "0",
"time_to_maturity_days": 90
},
{
"fee_cbp": "0",
"time_to_maturity_days": 180
},
{
"fee_cbp": "0",
"time_to_maturity_days": 360
}
],
"tick_granularity": 4,
"total_units": "1000301090628280"
}
]
}{
"error": {
"code": "INVALID_CURSOR",
"details": null,
"message": "cursor sort/direction does not match request sort/direction",
"request_id": "f0e1d2c3-b4a5-4968-8728-1c0d1e2f3a4b"
}
}