Docs

User V1 vault position

A user's live position in a Morpho Vault V1: shares held and the equivalent value in underlying assets. Returns zero shares/assets for users who have never interacted with the vault.

Vault selector example: 1:0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB (format: <chain_id>:<vault_address>; replace with the target vault).

Path Parameters

user-address*string

Position owner address. Example: 0xabcdefabcdefabcdefabcdefabcdefabcdefabcd.

Formataddress
vault-selector*string

Selector formatted as <chain_id>:<vault_address>. Example: 1:0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB.

Format<chain_id>:<vault_address>

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`);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();
{
  "data": {
    "user_address": "0xABcdEFABcdEFabcdEfAbCdefabcdeFABcDEFabCD",
    "chain_id": 1,
    "vault_address": "0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB",
    "last_indexed_block": "25475347",
    "shares": "0",
    "assets": "0"
  }
}