Get market

GET
/v0/midnight/markets/{market-id}

Detail lookup for a single market. :market-id is the stable Midnight market id and is unique across supported chains, so no chain id is required.

Returns the immutable market configuration inside a data envelope. Use GET /v0/midnight/markets/{market-id}/state for dynamic market state. 404s when the id is unknown.

Path Parameters

market-id*string

Midnight market id.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v0/midnight/markets/0xcc9418ea594c6e658650aedd205ce4544b266b69493f56fd2adc65c14bd06738"
{  "data": {    "chain_id": 8453,    "market_id": "0xcc9418ea594c6e658650aedd205ce4544b266b69493f56fd2adc65c14bd06738",    "market_family_id": "0x9a6ece688006fb810141501154acfd1aa29ae7ac3753452f4931a092f2653f1f",    "loan_token": "0x4200000000000000000000000000000000000006",    "maturity": 1784300400,    "rcf_threshold": "0",    "enter_gate": "0x0000000000000000000000000000000000000000",    "liquidator_gate": "0x0000000000000000000000000000000000000000",    "collaterals": [      {        "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",        "lltv": "860000000000000000",        "liquidation_cursor": "300000000000000000",        "oracle": "0xD09048c8B568Dbf5f189302beA26c9edABFC4858"      }    ]  }}
{  "error": {    "code": "VALIDATION_FAILED",    "message": "Validation failed",    "details": [      {        "code": "invalid_string",        "message": "Invalid input",        "path": [          "market-id"        ]      }    ],    "request_id": "f0e1d2c3-b4a5-4968-8728-1c0d1e2f3a4b"  }}
{  "error": {    "code": "MARKET_NOT_FOUND",    "message": "Market 0x0000000000000000000000000000000000000000000000000000000000000000 not found",    "details": null,    "request_id": "f0e1d2c3-b4a5-4968-8728-1c0d1e2f3a4b"  }}
{  "error": {    "code": "INTERNAL_ERROR",    "message": "Internal server error",    "details": null,    "request_id": "f0e1d2c3-b4a5-4968-8728-1c0d1e2f3a4b"  }}