User market position history
A user's historical position in a Morpho Blue market: collateral deposited, supply shares, and borrow shares.
Path Parameters
user-address*string
Position owner address. Example: 0xabcdefabcdefabcdefabcdefabcdefabcdefabcd.
Format
addressmarket-selector*string
Selector formatted as <chain_id>:<market_id>. Example: 1:0xfff1970c0ffae288764186fbb38a9171a17e98676744a1e345809cb8b9e73342.
Format
<chain_id>:<market_id>Query Parameters
lookback?string
Lookback period. Defaults to thirty_days. Historical sampling is selected automatically.
Value in
"one_day" | "seven_days" | "thirty_days" | "ninety_days" | "one_year" | "inception"Response Body
application/json
BASE_URL="${CORE_REST_BASE_URL:-https://api.morpho.org}"MORPHO_API_KEY="<MORPHO_API_KEY>"MARKET_SELECTOR="1:0xfff1970c0ffae288764186fbb38a9171a17e98676744a1e345809cb8b9e73342"USER_ADDRESS="0xabcdefabcdefabcdefabcdefabcdefabcdefabcd"curl -sS "${BASE_URL}/v0/blue/markets/${MARKET_SELECTOR}/users/${USER_ADDRESS}/position/history?lookback=thirty_days" \ -H "accept: application/json" \ -H "x-api-key: ${MORPHO_API_KEY}"{
"params": {
"chain_id": "1",
"market_id": "0xb323495f7e4148be5643a4ea4a8221eef163e4bccfded827a6f46947d7ad9afb",
"user_address": "0x0000000000000000000000000000000000000001"
},
"data": [
{
"timestamp": 1729900800,
"collateral_assets": "1000000000000000000",
"supply_shares": "2000000000000000000",
"borrow_shares": "300000000000000000"
},
{
"timestamp": 1729987200,
"collateral_assets": "1100000000000000000",
"supply_shares": "2000000000000000000",
"borrow_shares": "250000000000000000"
}
],
"last_indexed_block": "19847234"
}