List active Midnight offer groups for a user
Cursor-paginated list of a user's active offer groups with nested active offers.
Active offers have started, have not passed their offer expiry or market maturity, and still have remaining group capacity. Asset-capped offers are considered fully consumed when consumed >= max_assets; unit-capped offers are fully consumed when consumed >= max_units. Fully consumed offers are excluded, and a group is omitted entirely when no active offers remain in it. Each group returns the max expiry across all unexpired and unmatured offers in the whole group, including future-start offers, one deterministic representative offer limit (max_units, max_assets), the latest group-level consumed value, and all active offers in that group matching the request filters. Each offer includes both market_id and the immutable market config used to derive it, because uncreated markets cannot be decoded from market_id alone.
Filters. chain_ids, market_ids, loan_assets, and groups filter both the group page and nested offers. loan_assets matches loan token addresses across all chains unless chain_ids is also provided. The group-level expiry is computed for the whole offer group and is not narrowed by market_ids or loan_assets. created_at_gte and created_at_lte filter by the first active matching offer created in each group. market_ids, loan_assets, and groups are capped at 20 values.
Pagination. Response follows the list envelope: { cursor, data }. Pagination is over groups; nested offers are not split across pages. Sort groups with sort_by=id|created_at and sort_direction=asc|desc.
Path Parameters
User address whose active offer groups should be listed.
Query Parameters
Filter by chain ids. Supported chains: Base (8453).
items <= 100Filter nested active offers by Midnight market ids. Combined with groups using AND semantics.
items <= 20Filter nested active offers by loan token addresses. Combined with market_ids and groups using AND semantics.
items <= 20Filter by offer group ids. Combined with market_ids and loan_assets using AND semantics.
items <= 20Filter for group created_at greater than or equal to this unix timestamp.
Filter for group created_at less than or equal to this unix timestamp.
Sort field for group cursor pagination.
"id""id" | "created_at"Sort direction for group cursor pagination.
"asc""asc" | "desc"Maximum number of groups to return.
1001 <= value <= 100Opaque cursor from a previous page response.
1 <= length <= 4096Response Body
application/json
application/json
curl -X GET "https://api.morpho.org/v0/midnight/users/{user-address}/offer-groups"{
"cursor": "eyJjaGFpbklkIjo4NDUzLCJncm91cCI6IjB4YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYSJ9",
"data": [
{
"id": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"chain_id": 8453,
"created_at": 1760000000,
"expiry": 1761000000,
"max_units": "1000000",
"max_assets": "0",
"consumed": "42",
"offers": [
{
"market_id": "0xd92de5e7fbbde5a5e161787426982f7e1b01fb53a7060f95c021236d74447614",
"market": {
"loan_token": "0x4200000000000000000000000000000000000006",
"maturity": 1781276400,
"rcf_threshold": "0",
"enter_gate": "0x0000000000000000000000000000000000000000",
"liquidator_gate": "0x0000000000000000000000000000000000000000",
"collaterals": [
{
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"lltv": "860000000000000000",
"liquidation_cursor": "1000000000000000000",
"oracle": "0xD09048c8B568Dbf5f189302beA26c9edABFC4858"
}
]
},
"created_at": 1760000000,
"buy": true,
"maker": "0x1111111111111111111111111111111111111111",
"max_units": "1000000",
"max_assets": "0",
"continuous_fee_cap": "1000000000000000000",
"start": 1760000000,
"expiry": 1761000000,
"tick": 520,
"callback": "0x0000000000000000000000000000000000000000",
"callback_data": "0x",
"receiver_if_maker_is_seller": "0x0000000000000000000000000000000000000000",
"ratifier": "0x2222222222222222222222222222222222222222",
"reduce_only": false
}
]
}
]
}{
"error": {
"code": "INVALID_CURSOR",
"message": "Invalid user group cursor",
"details": null,
"request_id": "f0e1d2c3-b4a5-4968-8728-1c0d1e2f3a4b"
}
}