Get Data
Before Starting
In this tutorial, you might see different ways to fetch data for Morpho Vaults:
- API: Using the Morpho public API (see endpoint below). This is the easiest and most direct way for most applications. Note that only a subset of chains are supported.
- Typescript: Using Typescript snippet. For Developers expecting to perform offchain computation.
- Smart Contract: Fetching data directly onchain. This is best for real-time or trustless data.
- SDK: [Examples Incoming] Using the Morpho SDKs for pre-built abstractions and faster development.
For each topic below, you'll find short guides for each method (where possible). This avoids redundancy and helps you choose the best approach for your use case.
Discovery and Listing
Vaults List
Morpho Vaults V2
query {
vaultV2s(first: 1000, where: { chainId_in: [1, 8453] }) {
items {
address
symbol
name
listed
asset {
id
address
decimals
}
chain {
id
network
}
}
}
}Vault Metrics
Total Deposits & Assets
Morpho Vaults V2
query {
vaultV2ByAddress(
address: "0x04422053aDDbc9bB2759b248B574e3FCA76Bc145"
chainId: 1
) {
address
totalAssets
totalAssetsUsd
totalSupply
liquidity
liquidityUsd
idleAssetsUsd
}
}APY (Native + Rewards)
Morpho Vaults V2
query {
vaultV2ByAddress(
address: "0x04422053aDDbc9bB2759b248B574e3FCA76Bc145"
chainId: 1
) {
address
asset {
yield {
apr
}
}
avgNetApyExcludingRewards
avgNetApy
performanceFee
managementFee
maxRate
rewards {
asset {
address
chain {
id
}
}
supplyApr
}
}
}Share Price (Token Value)
Morpho Vaults V2
query {
vaultV2ByAddress(
address: "0x04422053aDDbc9bB2759b248B574e3FCA76Bc145"
chainId: 1
) {
totalAssets
totalSupply
sharePrice
}
}Allocation & Strategy
Current Allocations
Morpho Vaults V2
query {
vaultV2ByAddress(
address: "0x04422053aDDbc9bB2759b248B574e3FCA76Bc145"
chainId: 1
) {
totalAssetsUsd
totalAssets
totalSupply
adapters {
items {
address
assets
assetsUsd
type
}
}
}
}Configuration & Governance
Vault Parameters
Morpho Vaults V2
query {
vaultV2ByAddress(
address: "0x04422053aDDbc9bB2759b248B574e3FCA76Bc145"
chainId: 1
) {
address
name
listed
metadata {
description
image
}
allocators {
allocator {
address
}
}
owner {
address
}
curators {
items {
addresses {
address
}
}
}
sentinels {
sentinel {
address
}
}
timelocks {
duration
selector
functionName
}
}
}Pending Actions
All governance/configuration changes go through a submit → (wait) → accept/revoke lifecycle enforced by the timelock. The three events to watch are Submit, Revoke, and Accept.
Monitoring & Alerts
To get notified when pending actions are submitted, accepted, or revoked, you have two options:
-
Build your own notification system leveraging the query below (API, TypeScript/viem, or from the smart contract).
-
Off-the-shelf threat monitoring with Hypernative. Offering out-of-the-box threat/monitoring alerts for Morpho vaults.
Morpho Vaults V2
query VaultV2PendingActions {
vaultV2ByAddress(
address: "VAULT_ADDRESS"
chainId: 1
) {
address
name
# pending timelocked actions
pendingConfigs(first: 100) {
items {
validAt
functionName
txHash
decodedData {
__typename
... on VaultV2SetIsAllocatorPendingData {
isAllocator
account { address }
}
... on VaultV2SetReceiveSharesGatePendingData {
receiveSharesGate
}
... on VaultV2SetSendSharesGatePendingData {
sendSharesGate
}
... on VaultV2SetReceiveAssetsGatePendingData {
receiveAssetsGate
}
... on VaultV2SetSendAssetsGatePendingData {
sendAssetsGate
}
... on VaultV2SetAdapterRegistryPendingData {
adapterRegistry
}
... on VaultV2AdapterPendingData {
adapterAddress
}
... on VaultV2TimelockPendingData {
timelock
selector
functionName
}
... on VaultV2SetPerformanceFeePendingData {
performanceFee
}
... on VaultV2SetManagementFeePendingData {
managementFee
}
... on VaultV2SetPerformanceFeeRecipientPendingData {
performanceFeeRecipient
}
... on VaultV2SetManagementFeeRecipientPendingData {
managementFeeRecipient
}
... on VaultV2IncreaseCapPendingData {
cap
config {
id
type
}
}
... on VaultV2SetForceDeallocatePenaltyPendingData {
adapterAddress
forceDeallocatePenalty
}
... on VaultV2AbdicatePendingData {
selector
functionName
}
}
}
}
}
}Risk Indicators
Morpho Vault Warnings
query {
vaultV2s(first: 5) {
items {
name
warnings {
type
level
}
}
}
}Fee Wrapper
FeeWrapper List
query VaultV2ByAddress {
vaultV2ByAddress(
address: "0xd4468EF3745c315949a97090eD27b3F73b9b7C02"
chainId: 8453
) {
type
address
name
}
}FeeWrapper Exposure
query VaultV2ByAddress {
vaultV2ByAddress(
address: "0xd4468EF3745c315949a97090eD27b3F73b9b7C02"
chainId: 8453
) {
type
adapters {
items {
type
address
... on MorphoVaultV2Adapter {
address
innerVault {
address
name
}
}
}
}
historicalState {
sharePrice(options: {
startTimestamp: 1771015645
endTimestamp: 1771915645
interval: HOUR
}) {
x
y
}
}
}
}FeeWrapper Yield
query VaultV2ByAddress {
vaultV2ByAddress(
address: "0xd4468EF3745c315949a97090eD27b3F73b9b7C02"
chainId: 8453
) {
type
apy
avgNetApyExcludingRewards
avgNetApy
performanceFee
performanceFeeRecipient
managementFee
managementFeeRecipient
rewards {
asset {
symbol
address
}
supplyApr
}
}
}Position Tracking
User All Vaults Position
Morpho Vaults V2
query GetUserVaultPositions($address: String!, $chainId: Int!) {
userByAddress(address: $address, chainId: $chainId) {
id
vaultV2Positions {
shares
vault {
address
symbol
}
}
vaultPositions {
state {
shares
}
vault {
address
symbol
}
}
}
}Vault Depositors
Morpho Vaults V2
query {
vaultV2ByAddress(
address: "0x04422053aDDbc9bB2759b248B574e3FCA76Bc145"
chainId: 1
) {
positions(first: 10, skip:0) {
items {
user {
address
}
assets
assetsUsd
shares
}
}
totalSupply
asset {
address
symbol
}
}
}User Earnings
Unique Vault
query {
vaultV2PositionByAddress(
userAddress: "USERADDRESS"
vaultAddress: "MORPHOVAULTV2ADDRESS"
chainId: 1
) {
vault {
name
address
}
assets
assetsUsd
shares
pnl
pnlUsd
roe # time-weighted return since inception (non-annualized)
}
}All Vaults
query {
userByAddress(address: "USERADDRESS", chainId: 1) {
vaultV2Positions {
vault {
name
address
}
assets
assetsUsd
shares
pnl
pnlUsd
roe # time-weighted return since inception (non-annualized)
}
vaultPositions {
vault {
name
address
}
state {
assets
assetsUsd
shares
pnl
pnlUsd
roe # time-weighted return since inception (non-annualized)
}
}
}
}Transaction History
Morpho Vaults V2
query {
vaultV2transactions(
first: 10
skip: 0
where: { vaultAddress_in: "0x04422053aDDbc9bB2759b248B574e3FCA76Bc145" }
) {
items {
vault {
address
}
type
shares
blockNumber
timestamp
txHash
txIndex
}
}
}Historical Data
APY Historical State
Morpho Vaults v2
Coming soon.
