Pull a vault’s APY and market allocations with one Morpho GraphQL query, then verify its asset totals against the vault contract. This query shape is for Vault V1; include the chain ID because the same address can identify different deployments on Ethereum and Base.
Morpho vaults are single-asset pools that place deposits across lending markets and other yield sources. This article focuses on retrieving their performance and allocation state; Morpho vaults covers the vault concept and how its markets and allocation strategy fit together.
How do you query a Vault V1’s APY and market allocation?
Send a POST request to Morpho’s public GraphQL endpoint, morpho.org The GraphQL API is documented in Morpho’s API docs. Pass the vault address and chain ID as variables, then ask for the APY fields and allocation details in the same request:
query VaultMetrics($address: String!, $chainId: Int!) { vaultByAddress(address: $address, chainId: $chainId) { address state { apy netApy allocation { market { uniqueKey } supplyAssets supplyCap } } } }
For variables, provide the checksummed or lowercase vault address and its numeric EVM chain ID: 1 for Ethereum, 8453 for Base. The response’s state object contains the requested metrics. Treat rates as fractions: 0.05 represents 5%.
- state.apy is the base vault yield reported by the API.
- state.netApy includes rewards and fees, so it can differ from base APY.
- allocation.market.uniqueKey identifies each Morpho market in the allocation.
- allocation.supplyAssets reports the vault’s supplied amount for that allocation.
- allocation.supplyCap reports the supply limit; it is capacity, not the amount currently supplied.
APY and net APY are related but not interchangeable. The first describes base yield; the second incorporates rewards and fees. Display the one that matches your product’s definition of return, and label it clearly. Adding reward APR to net APY again would double-count rewards.
Compare two requests for the same address, changing only chainId: one queries Ethereum and the other Base. Each returns state for that chain’s deployment, so the records can have different APYs and allocations. A feed that omits chain ID can silently associate the wrong state with a vault.
There is an important version boundary. This allocation shape is for Vault V1. Vault V2 routes capital through Adapters, which can target Morpho markets or other supported yield sources; its allocation schema is different. Check the V2 schema rather than assuming that V1’s market and supply fields describe every adapter allocation.
How do you interpret allocation totals and verify the result?
An allocation row shows a vault’s position in a market, but the sum of rows may not represent only actively deployed capital. Many V1 vaults use an idle market, with no collateral, to account for unallocated funds. That row can increase the apparent “allocated” total even though the assets are idle.
For portfolio percentages, decide whether idle funds belong in the denominator. If you want market exposure, filter the idle market or label it “idle” and show it separately. If you want a breakdown of all vault assets, keep it in the total but distinguish it from lending-market exposure. Otherwise, users may read idle cash as collateral-backed market allocation.
Cross-check the indexed response against the on-chain ERC-4626 vault. EIP-4626, maintained through the Ethereum Improvement Proposals process, defines the tokenized-vault interface: in this setting, totalAssets() returns the underlying assets managed by the vault, and convertToAssets(shares) converts a share amount into an estimated asset amount. Read those view functions on the same chain and compare them with the API’s total and share data where available.
The check catches stale or mismatched data. It does not make the API and contract reads atomic: the indexed snapshot and your RPC call can land at different blocks. Record the chain and observation time, and compare values with that timing difference in mind.
As of November 2026, Morpho’s documentation says the GraphQL API is scheduled to shut down on January 29, 2027. It is useful for understanding an existing V1 integration, but for new work use the documented Read API routes. V1 state and allocation are separate requests there; V2 has its own state and allocation routes.
Related questions
How do you get historical APY for a Morpho vault?
Use Morpho’s APY history data for the relevant vault version, and choose the lookback period supported by that interface. Historical averages describe past performance, not a guaranteed future rate. Check the current API documentation for the route and available windows.
Is the Morpho API free to use?
Morpho documents its public data API as requiring no API key. Private API access uses a key. Check the current API reference for access details and any endpoint-specific requirements.
Morpho API vs reading vault contracts on-chain
The API gathers indexed state into convenient responses; direct contract reads give you on-chain values at the block queried. Use the API for a feed and contract calls to cross-check totals or when you need a specific block’s state.
More integration questions
How often does the API data refresh?
Use the returned state as indexed data, not as a live contract read. Morpho’s documentation does not give one universal refresh interval for every field, so show an observation time and cross-check on-chain when freshness matters.
How do I show rewards APR separately?
Read the reward campaign data separately and present reward APR as its own component. Align the measurement period and allocation basis before combining it with base yield; don’t add it again when the selected net APY already includes rewards.
How do I map market uniqueKey to collateral names?
Use each uniqueKey to look up the corresponding market in Morpho’s market data, then read that market’s collateral asset and token metadata. Keep the uniqueKey in your records because symbols and display names can be ambiguous.