Morpho API

Explore Morpho REST endpoints for Blue markets, vaults, oracles, tokens, positions, and Midnight fixed-rate markets.

API surfaces

SurfaceStart with
Fixed Rate Markets (Midnight)List markets
Variable Rate Markets (Blue)List markets
Vaults V2List V2 vaults
Vaults V1List V1 vaults
OraclesGet oracle state
TokensGet token
ChainsGet chains

Versioning

Endpoint versions appear in the path. Most routes use /v0. Some Vault V2 routes use /v1.

Selectors

Path selectors use the formats described by each operation:

ParameterFormat
Variable Rate Markets (Blue) {market-selector}<chain_id>:<market_id>, for example 1:0xfff1970c0ffae288764186fbb38a9171a17e98676744a1e345809cb8b9e73342
Fixed Rate Markets (Midnight) {market-id}Market ID only, no chain prefix: the same ID never appears on two chains. Example: 0x00bf2a673443d982dc209eac2764ccf8ad7e38b6a11df1ec96e9dc722260812c
{vault-selector}<chain_id>:<vault_address>
{oracle-selector}<chain_id>:<oracle_address>
{token-selector}<chain_id>:<address>
{block-selector}<chain_id>:<block_number>
{user-address}Address of the position owner or requested user

Supported networks

Accepted chain filters differ between the Core and Midnight APIs:

Blue, vaults and periphery (Core REST API)

The Core REST API covers Blue markets, Vault V1 and Vault V2, user positions, and supporting resources such as tokens, oracles, chains, blocks and curators; Midnight has its own REST API.

NetworkChain ID
Ethereum1
Arbitrum42161
Arc5042
Base8453
HyperEVM999
Katana747474
Monad143
OP Mainnet10
Polygon137
Robinhood Chain4663
Unichain130
Stable988
Tempo4217
World Chain480
X Layer196

Midnight API

NetworkChain ID
Ethereum1
Base8453
Arc5042
Robinhood Chain4663
Tempo4217

Morpho API main rules

Pagination

Cursor-paginated operations use limit and cursor as documented. Treat a cursor as opaque and pass it back unchanged. Limits, defaults, and cursor binding vary by endpoint; keep the filters and sort values unchanged when continuing a paginated request.

Response envelope

Successful response schemas place results under a top-level data field. Paginated responses may also include a top-level cursor; the shape of data depends on the endpoint.

Amount units

Amount fields use the units stated in their descriptions. For example, vault total_assets is in underlying token units, and Midnight min_assets is in raw loan-token assets. Blue market lltv_wad is WAD-scaled; the spec defines 1e18 as 100%.

Rate limits and best practices

To ensure reliable API infrastructure for all users and protect against malicious usage, spam, and attacks, the API enforces the following rate limits:

LimitThresholdResponse
Standard750 requests/minute per IP429 Too Many Requests with Retry-After: 600
Severe abuse3,334 requests/10 min per IP (about 20,000/hour)429 Too Many Requests with Retry-After: 604800

These limits apply to api.morpho.org. For higher limits, request an API key.

An IP that goes over the severe-abuse limit is blocked for 7 days. Repeated abuse can lead to a permanent block.

Best practiceRecommendation
Cache responsesCache API query results on your backend to reduce redundant requests and improve your application's performance.
Request only what you needUse the documented filters and pagination to fetch only the data required for your use case.
Avoid excessive pollingDesign your application to fetch data efficiently, respecting API limits to prevent interruptions.

Errors

StatusMeaningExample error codes
400Invalid request parameters, cursor, or limitsINVALID_CURSOR, VALIDATION_FAILED (Midnight)
404Requested position, token, market, or resource was not foundMARKET_NOT_FOUND (Midnight)
413Mempool validation payload is too largePAYLOAD_TOO_LARGE (Midnight)
422Requested quote size cannot be fully satisfiedINSUFFICIENT_LIQUIDITY (Midnight)
429See Rate limits and best practicesTOO_MANY_REQUESTS (Midnight)
500Unexpected server errorINTERNAL_ERROR (Midnight)
503Service unavailableSERVICE_UNAVAILABLE (Midnight)

Midnight error responses expose the machine-readable code as error.code.

Find the REST endpoint for a task

REST at https://api.morpho.org is the recommended default for reads. Each route below links to its API reference, including parameters and response fields.

Replace {vault-selector}, {oracle-selector}, and {token-selector} with <chainId>:<address> (for example, 8453:0x... for Base). Replace {market-selector} with <chainId>:<marketId> for Blue. Midnight uses its own {market-id}; {user-address} is a wallet address.

Read taskREST route
List and paginate Blue markets/v0/blue/markets (cursor, limit, optional chain_id)
Read Blue market state/v0/blue/markets/{market-selector}/state
Read Blue market state history/v0/blue/markets/{market-selector}/state/history
Read Blue market APY history/v0/blue/markets/{market-selector}/apy/history
Read Blue market APY averages/v0/blue/markets/{market-selector}/apy-averages
Read market liquidity, including Public Allocator liquidity/v0/blue/markets/{market-selector}/liquidity
Read the current oracle price/v0/oracles/{oracle-selector}/state
List and paginate Vault V1 instances/v0/vaults-v1
List and paginate Vault V2 instances/v0/vaults-v2
Read Vault V1 state, including total assets and share price/v0/vaults-v1/{vault-selector}/state
Read Vault V2 state, including total assets and share price/v1/vaults-v2/{vault-selector}/state
Read Vault V1 state history/v0/vaults-v1/{vault-selector}/state/history
Read Vault V2 state history/v0/vaults-v2/{vault-selector}/state/history
Read Vault V1 APY history/v0/vaults-v1/{vault-selector}/apy/history
Read Vault V2 APY history/v0/vaults-v2/{vault-selector}/apy/history
Read Vault V1 APY averages/v0/vaults-v1/{vault-selector}/apy-averages
Read Vault V2 APY averages/v1/vaults-v2/{vault-selector}/apy-averages
Read Vault V1 allocations/v0/vaults-v1/{vault-selector}/allocations
Read Vault V2 allocations/v0/vaults-v2/{vault-selector}/allocations
Read Vault V1 pending governance actions/v0/vaults-v1/{vault-selector}/pending-governance-actions
Read Vault V2 pending governance actions/v0/vaults-v2/{vault-selector}/pending-governance-actions
Read V2 withdrawal options/v0/vaults-v2/{vault-selector}/withdrawal-options
List a user's Vault V1 positions across chains/v0/vaults-v1/users/{user-address}/positions
List a user's Vault V2 positions across chains/v0/vaults-v2/users/{user-address}/positions
Read a user's Vault V1 position activity/v0/vaults-v1/{vault-selector}/users/{user-address}/position/activity
Read a user's Vault V2 position activity/v0/vaults-v2/{vault-selector}/users/{user-address}/position/activity
Read a user's Vault V1 position history/v0/vaults-v1/{vault-selector}/users/{user-address}/position/history
Read a user's Vault V2 position history/v0/vaults-v2/{vault-selector}/users/{user-address}/position/history
Read a user's Vault V1 performance (PnL)/v0/vaults-v1/{vault-selector}/users/{user-address}/position/performance
Read a user's Vault V2 performance (PnL)/v0/vaults-v2/{vault-selector}/users/{user-address}/position/performance
Read a user's Blue market position/v0/blue/markets/{market-selector}/users/{user-address}/position
Read a user's Blue position history/v0/blue/markets/{market-selector}/users/{user-address}/position/history
Read a user's Blue position performance/v0/blue/markets/{market-selector}/users/{user-address}/position/performance
List Midnight books/v0/midnight/books
Read one Midnight book/v0/midnight/books/{market-id}
Quote a Midnight book/v0/midnight/books/{market-id}/{side}/quote (side: asks or bids; provide exactly one of assets or units)
List a user's Midnight positions/v0/midnight/users/{user-address}/positions
Read the current USD token price/v0/tokens/{token-selector}/price
List supported chains/v0/chains

History routes use a lookback query parameter; check each reference for supported windows. Vault position lists default to every exposed chain when chain_ids is omitted; the V2 list excludes fee wrappers. Vault performance returns net_earnings_assets and return_on_capital, not USD PnL.

For product-specific examples, see the Earn, Borrow, and Midnight Get data tutorials.