Get Midnight offer groups by group id
Returns every offer group matching the onchain group id, regardless of lifecycle status. The maker is not required; optional chain_id and maker query parameters can disambiguate the lookup. Distinct chain, maker, and group-id combinations remain separate, and no match returns an empty data array.
The endpoint returns every latest offer revision in each matched group and exposes the current lifecycle as status. Each group exposes the shared offer intent as type, or null when its latest offers have inconsistent buy and reduce_only values. It does not apply Router mempool admission policy: oracle, token, market-triplet, LLTV, RCF threshold, and other mempool-validation policy checks do not gate retrieval.
Each nested offer includes the exact per-offer ratifier_data bytes originally submitted, plus parsed_ratifier_data, a structured view discriminated by ratifier_type. The type is identified by matching ratifier against the chain's known Midnight ratifier deployments: rate_v1 exposes rate_per_second_wad and allowed_taker, price_v1 exposes allowed_taker (the offer-level tick is the ratified price), and ecrecover and setter expose only their type. A zero allowed_taker means any taker may take the offer. An unrecognized ratifier address returns unknown; a recognized address whose ratifier_data cannot be decoded returns invalid with expected_ratifier_type.
Path Parameters
Offer group id.
Query Parameters
Filter by chain id.
0 < value <= 9007199254740991Value in
- 1
- 8453
- 5042
- 4663
Filter by offer maker address.
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v0/midnight/offer-groups/0x0bab51fab64157bc1011ce65b9bf9b2b11f202b8a7ab76b408cf40b8adf069d3"{ "data": [ { "id": "0x0bab51fab64157bc1011ce65b9bf9b2b11f202b8a7ab76b408cf40b8adf069d3", "chain_id": 8453, "status": "active", "type": "buy", "created_at": 1783584485, "expiry": 1784300399, "max_units": "0", "max_assets": "80000000000000", "consumed": "0", "callback": null, "offers": [ { "market_id": "0xcc9418ea594c6e658650aedd205ce4544b266b69493f56fd2adc65c14bd06738", "market": { "loan_token": "0x4200000000000000000000000000000000000006", "maturity": 1784300400, "rcf_threshold": "0", "enter_gate": "0x0000000000000000000000000000000000000000", "liquidator_gate": "0x0000000000000000000000000000000000000000", "collaterals": [ { "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "lltv": "860000000000000000", "liquidation_cursor": "300000000000000000", "oracle": "0xD09048c8B568Dbf5f189302beA26c9edABFC4858" } ] }, "created_at": 1783584485, "buy": true, "maker": "0x958eB498a4172EA513c79b09E7f064070C5b1917", "max_units": "0", "max_assets": "80000000000000", "continuous_fee_cap": "115792089237316195423570985008687907853269984665640564039457584007913129639935", "start": 1783584483, "expiry": 1784300399, "tick": 4408, "callback": "0x0000000000000000000000000000000000000000", "callback_data": "0x", "receiver_if_maker_is_seller": "0x0000000000000000000000000000000000000000", "ratifier": "0xd6e70365C8E8DDa9a4ca662C07bbE663b017755E", "ratifier_data": "0x000000000000000000000000000000000000000000000000000000000000001b3f4a8c6d2e109b7f5c4d8a1e6b3f7092c5d4e8a7b1c6f3092d5e4a8b7c1f60392a7d5c9e4b1f8036d8c2a5e7f1049b3d6c8e2a5f7b1d4093c6e8a2f5b7d1049c8b2f6d4a1c9e7035f8b2d6a4c1e9073f5b8d2a6c4e1f9037b5d8a2c6e4f1093b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000", "parsed_ratifier_data": { "ratifier_type": "ecrecover" }, "reduce_only": false } ] } ]}{ "error": { "code": "VALIDATION_FAILED", "message": "Validation failed", "details": [ { "code": "invalid_string", "message": "Invalid offer group id", "path": [ "group-id" ] } ], "request_id": "f0e1d2c3-b4a5-4968-8728-1c0d1e2f3a4b" }}{ "error": { "code": "INTERNAL_ERROR", "message": "Internal server error", "details": null, "request_id": "f0e1d2c3-b4a5-4968-8728-1c0d1e2f3a4b" }}