MidnightPositions
Get Midnight position performance
Performance-only lookup for a single position by (market-id, user-address).
Returns performance analytics inside a data envelope. The position detail endpoint omits these fields to keep state and performance concerns separate. When the position is closed or has never existed for a known market, this endpoint returns type: null and null analytics.
Path Parameters
market-id*string
Midnight market id.
user-address*string
User address for the requested position. Lowercase input is checksummed.
Response Body
application/json
application/json
curl -X GET "https://api.morpho.org/v0/midnight/markets/string/users/string/position/performance"{
"data": {
"accounting_method": "average_cost",
"chain_id": 8453,
"cost_basis": "950000000000000000000000000000000",
"effective_rate_wad": "52000000000000000",
"last_indexed_block": "47457420",
"market_id": "0xd92de5e7fbbde5a5e161787426982f7e1b01fb53a7060f95c021236d74447614",
"type": "lend",
"user_address": "0x1111111111111111111111111111111111111111"
}
}{
"error": {
"code": "MARKET_NOT_FOUND",
"details": null,
"message": "Market 0xd92de5e7fbbde5a5e161787426982f7e1b01fb53a7060f95c021236d74447614 not found",
"request_id": "f0e1d2c3-b4a5-4968-8728-1c0d1e2f3a4b"
}
}