User V1 vault position history
A user's historical position in a Morpho Vault V1: shares held and the equivalent value in underlying assets.
Vault selector example: 1:0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB (format: <chain_id>:<vault_address>; replace with the target vault).
Enterprise API access
For enterprise access, use https://private.api.morpho.org as the base URL and send your API key in the x-api-key header. Request an API key.
Path Parameters
user-address*string
Position owner address. Example: 0xabcdefabcdefabcdefabcdefabcdefabcdefabcd.
Format
addressvault-selector*string
Selector formatted as <chain_id>:<vault_address>. Example: 1:0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB.
Format
<chain_id>:<vault_address>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
const baseUrl = process.env.CORE_REST_BASE_URL ?? "https://api.morpho.org";const apiKey = process.env.MORPHO_API_KEY ?? "<MORPHO_API_KEY>";const vaultSelector = "1:0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB";const userAddress = "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd";const url = new URL(`${baseUrl}/v0/vaults-v1/${vaultSelector}/users/${userAddress}/position/history`);url.searchParams.set("lookback", "thirty_days");const response = await fetch(url, { headers: { accept: "application/json", "x-api-key": apiKey, },});if (!response.ok) throw new Error(await response.text());const body = await response.json();{
"params": {
"chain_id": "1",
"vault_address": "0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB",
"user_address": "0x0000000000000000000000000000000000000001"
},
"data": [
{
"timestamp": 1729900800,
"shares": "1000000000000000000000",
"assets": "1012000000"
},
{
"timestamp": 1729987200,
"shares": "1200000000000000000000",
"assets": "1221000000"
}
],
"last_indexed_block": "19847234"
}