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
}
}
}
}Morpho Vaults V1
query {
vaults(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
}
}On Morpho Vaults V1
query {
vaultByAddress(
address: "0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB"
chainId: 1
) {
address
state {
totalAssets
totalAssetsUsd
totalSupply
}
liquidity {
underlying
usd
}
}
}APY (Native + Rewards)
Morpho Vaults V2
query {
vaultV2ByAddress(
address: "0x04422053aDDbc9bB2759b248B574e3FCA76Bc145"
chainId: 1
) {
address
asset {
yield {
apr
}
}
avgApy
avgNetApy
performanceFee
managementFee
maxRate
rewards {
asset {
address
chain {
id
}
}
supplyApr
yearlySupplyTokens
}
}
}Morpho Vaults V1
query {
vaultByAddress(
address: "0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB"
chainId: 1
) {
address
asset {
yield {
apr
}
}
state {
apy
netApy
netApyWithoutRewards
avgApy
avgNetApy
dailyApy
dailyNetApy
weeklyApy
weeklyNetApy
monthlyApy
monthlyNetApy
rewards {
asset {
address
chain {
id
}
}
supplyApr
yearlySupplyTokens
}
allocation {
supplyAssets
supplyAssetsUsd
market {
uniqueKey
state {
rewards {
asset {
address
chain {
id
}
}
supplyApr
borrowApr
}
}
}
}
}
}
}Share Price (Token Value)
Morpho Vaults V2
query {
vaultV2ByAddress(
address: "0x04422053aDDbc9bB2759b248B574e3FCA76Bc145"
chainId: 1
) {
totalAssets
totalSupply
}
}Morpho Vaults V1
query {
vaultByAddress(
address: "0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB"
chainId: 1
) {
address
state {
sharePrice
sharePriceUsd
}
}
}Allocation & Strategy
Current Allocations
Morpho Vaults V2
query {
vaultV2ByAddress(
address: "0x04422053aDDbc9bB2759b248B574e3FCA76Bc145"
chainId: 1
) {
totalAssetsUsd
totalAssets
totalSupply
adapters {
items {
address
assets
assetsUsd
type
}
}
}
}Morpho Vaults V1
query {
vaultByAddress(
address: "0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB"
chainId: 1
) {
address
state {
allocation {
market {
uniqueKey
loanAsset {
name
}
collateralAsset {
name
}
oracleAddress
irmAddress
lltv
}
supplyCap
supplyAssets
supplyAssetsUsd
}
}
}
}Vault Queues
query {
vaultByAddress(
address: "0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB"
chainId: 1
) {
address
state {
totalAssets
lastTotalAssets
allocation {
supplyQueueIndex
withdrawQueueIndex
market {
uniqueKey
}
}
}
}
}Configuration & Governance
Vault Parameters
Morpho Vaults V2
query {
vaultV2ByAddress(
address: "0x04422053aDDbc9bB2759b248B574e3FCA76Bc145"
chainId: 1
) {
address
name
listed
metadata {
description
forumLink
image
}
allocators {
allocator {
address
}
}
owner {
address
}
curators {
items {
addresses {
address
}
}
}
sentinels {
sentinel {
address
}
}
timelocks {
duration
selector
functionName
}
}
}Morpho Vaults V1
query {
vaultByAddress(
address: "0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB"
chainId: 1
) {
address
name
listed
metadata {
description
}
allocators {
address
}
state {
owner
curator
guardian
timelock
curators {
name
socials {
type
url
}
image
}
}
}
}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
}
}
}
}
}
}Morpho Vaults V1
query VaultV1PendingActions {
vaultByAddress(
address: "VAULT_ADDRESS"
chainId: 1
) {
address
name
state {
# pending owner transfer (separate from pendingConfigs)
pendingOwner
# pending timelocked actions
pendingConfigs(first: 50) {
items {
validAt
functionName
txHash
decodedData {
__typename
... on VaultSetCapPendingData {
supplyCap
market {
uniqueKey
loanAsset { symbol }
collateralAsset { symbol }
}
}
... on VaultSetTimelockPendingData {
timelock
}
... on VaultSetGuardianPendingData {
guardian { address }
}
... on VaultRemoveMarketPendingData {
caller { address }
market {
uniqueKey
loanAsset { symbol }
collateralAsset { symbol }
}
}
}
}
}
}
}
}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 & V1
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
}
}
}Morpho Vaults V1
query {
vaultPositions(
first: 10
orderBy: Shares
orderDirection: Desc
where: { vaultAddress_in: ["0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB"] }
) {
items {
user {
address
}
state {
shares
assets
assetsUsd
}
}
}
}Transaction History
Morpho Vaults V2
query {
vaultV2transactions(
first: 10
skip: 0
where: { vaultAddress_in: "0x04422053aDDbc9bB2759b248B574e3FCA76Bc145" }
) {
items {
vault {
address
}
type
shares
blockNumber
timestamp
txHash
txIndex
}
}
}Morpho Vaults V1
query {
transactions(
first: 10
orderBy: Timestamp
orderDirection: Desc
where: { vaultAddress_in: ["0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB"] }
) {
items {
blockNumber
hash
type
user {
address
}
}
}
}Historical Data
APY Historical State
Morpho Vaults v2
Coming soon.
Morpho Vaults V1
query VaultApys($options: TimeseriesOptions) {
vaultByAddress(address: "0x73e65DBD630f90604062f6E02fAb9138e713edD9") {
address
historicalState {
apy(options: $options) {
x
y
}
netApy(options: $options) {
x
y
}
}
}
}With those variables:
{
"options": {
"startTimestamp": 1740000000,
"endTimestamp": 1742564817,
"interval": "DAY"
}
}