Morpho API
Explore Morpho REST endpoints for Blue markets, vaults, oracles, tokens, positions, and Midnight fixed-rate markets.
API surfaces
| Surface | Start with |
|---|---|
| Fixed Rate Markets (Midnight) | List markets |
| Variable Rate Markets (Blue) | List markets |
| Vaults V2 | List V2 vaults |
| Vaults V1 | List V1 vaults |
| Oracles | Get oracle state |
| Tokens | Get token |
| Chains | Get 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:
| Parameter | Format |
|---|---|
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.
| Network | Chain ID |
|---|---|
| Ethereum | 1 |
| Arbitrum | 42161 |
| Arc | 5042 |
| Base | 8453 |
| HyperEVM | 999 |
| Katana | 747474 |
| Monad | 143 |
| OP Mainnet | 10 |
| Polygon | 137 |
| Robinhood Chain | 4663 |
| Unichain | 130 |
| Stable | 988 |
| Tempo | 4217 |
| World Chain | 480 |
| X Layer | 196 |
Midnight API
| Network | Chain ID |
|---|---|
| Ethereum | 1 |
| Base | 8453 |
| Arc | 5042 |
| Robinhood Chain | 4663 |
| Tempo | 4217 |
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:
| Limit | Threshold | Response |
|---|---|---|
| Standard | 750 requests/minute per IP | 429 Too Many Requests with Retry-After: 600 |
| Severe abuse | 3,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 practice | Recommendation |
|---|---|
| Cache responses | Cache API query results on your backend to reduce redundant requests and improve your application's performance. |
| Request only what you need | Use the documented filters and pagination to fetch only the data required for your use case. |
| Avoid excessive polling | Design your application to fetch data efficiently, respecting API limits to prevent interruptions. |
Errors
| Status | Meaning | Example error codes |
|---|---|---|
| 400 | Invalid request parameters, cursor, or limits | INVALID_CURSOR, VALIDATION_FAILED (Midnight) |
| 404 | Requested position, token, market, or resource was not found | MARKET_NOT_FOUND (Midnight) |
| 413 | Mempool validation payload is too large | PAYLOAD_TOO_LARGE (Midnight) |
| 422 | Requested quote size cannot be fully satisfied | INSUFFICIENT_LIQUIDITY (Midnight) |
| 429 | See Rate limits and best practices | TOO_MANY_REQUESTS (Midnight) |
| 500 | Unexpected server error | INTERNAL_ERROR (Midnight) |
| 503 | Service unavailable | SERVICE_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.
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.