For the complete documentation index, see llms.txt. This page is also available as Markdown.

Mystic Morpho GraphQL API

Read real-time Morpho data on the chains Mystic is on, including vaults and markets data, APYs, TVL, liquidity, rewards and much more.

Introduction

The Mystic Morpho API lets you read all kinds of Morpho data in real-time on the chains Morpho is on. Track your positions, liquidate, manage risk or build your own Morpho-powered app using Mystic's Morpho API. Note that to use it, you will need your own API Key. Please contact us to get an API Key and get started -> Contact us.

Base URL

https://api.mysticfinance.xyz/graphql
https://staging-api.mysticfinance.xyz/graphql

Authentication

To call the API, you need to an API Key. API Key usage is billed monthly and the Key will expire if payment fails. An expired key returns 401.

Making a Request

GraphQL is POST + a JSON body, you must send Content-Type: application/json and a body containing query (and optionally variables).

curl "https://api.mysticfinance.xyz/graphql" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "query": "query Markets($ids: [ChainId!]) { morphoMarkets(where: { chainId_in: $ids }, limit: 2) { items { marketId name supplyApy { total } } } }",
    "variables": { "ids": [98866] }
  }'

What you can Query

Query
Returns

morphoMarkets(where, limit, skip)

Returns Data for Markets

morphoVaults(where, limit, skip)

Returns Data for Vaults

marketHistory(marketId!, chainId)

Daily history for one market

vaultHistory(vaultAddress!, chainId)

Daily history for one vault

openPositions(chainId, …, page)

Paginated list of open borrow positions and their risk of liquidation (LTVs, HFs and more).

liquidatedPositions(chainId, …, page)

Past liquidations, newest first (paginated).

Example Queries

Markets

Vaults

Market and Vaults History

Open Positions

Liquidated Positions

Last updated