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. Supported chains: Base (8453). Required when any address filter is provided.
items <= 100Filter by Midnight market ids. These ids are globally unique.
items <= 100Filter by loan token addresses. Combine with chain_ids; lowercase input is checksummed.
items <= 100Filter by collateral token addresses. Combine with chain_ids; lowercase input is checksummed.
items <= 100Filter by collateral oracle addresses. Combine with chain_ids; lowercase input is checksummed.
items <= 100Filter by enter gate addresses. Combine with chain_ids; lowercase input is checksummed.
items <= 100Filter by liquidator gate addresses. Combine with chain_ids; lowercase input is checksummed.
items <= 100Filter by exact maturity timestamps, in unix seconds.
items <= 100When 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{1,78}$Filter for total units less than or equal to this value.
^\d{1,78}$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 <= length <= 4096Response Body
application/json
application/json
curl -X GET "https://api.morpho.org/v0/midnight/markets"{
"cursor": "eyJzIjoidG90YWxfdW5pdHMiLCJkIjoiZGVzYyIsInYiOiIxMDAwMzAxMDkwNjI4MjgwIiwidk51bGwiOmZhbHNlLCJpIjpbODQ1MywiMHhkOTJkZTVlN2ZiYmRlNWE1ZTE2MTc4NzQyNjk4MmY3ZTFiMDFmYjUzYTcwNjBmOTVjMDIxMjM2ZDc0NDQ3NjE0Il19",
"data": [
{
"chain_id": 8453,
"market_id": "0xd92de5e7fbbde5a5e161787426982f7e1b01fb53a7060f95c021236d74447614",
"loan_token": "0x4200000000000000000000000000000000000006",
"maturity": 1781276400,
"enter_gate": "0x0000000000000000000000000000000000000000",
"liquidator_gate": "0x0000000000000000000000000000000000000000",
"total_units": "1000301090628280",
"tick_granularity": 4,
"settlement_fee_schedule": [
{
"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,
"fee_cbp": "0"
}
],
"current_settlement_fee_wad": "0",
"current_settlement_fee_cbp": "0",
"continuous_fee_rate": "0",
"listed": true,
"collaterals": [
{
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"lltv": "860000000000000000",
"liquidation_cursor": "1000000000000000000",
"oracle": "0xD09048c8B568Dbf5f189302beA26c9edABFC4858"
}
]
}
]
}{
"error": {
"code": "INVALID_CURSOR",
"message": "cursor sort/direction does not match request sort/direction",
"details": null,
"request_id": "f0e1d2c3-b4a5-4968-8728-1c0d1e2f3a4b"
}
}