> For the complete documentation index, see [llms.txt](https://y2k-finance.gitbook.io/y2k-finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://y2k-finance.gitbook.io/y2k-finance/products/earthquake/contracts/subgraph.md).

# Subgraph

**Playground**:&#x20;

{% embed url="<https://subgraph.satsuma-prod.com/y2k-finance/v2-prod/playground>" %}

**GraphQL API (HTTP):**

request access via discord

## Example Queries:

List Markets:

```
{
markets {
    marketName
    depositAsset
    strikePrice
    token
    marketIndex
    premiumVault
    collateralVault
  }
  }
```

List Epochs:&#x20;

```
{
epoches{
  startEpoch
  endEpoch
  epochEnded
  isDepegged
  marketName
  marketIndex
  collateralVault
  premiumVault
  withdrawalFee
  COLLAT_finalTVL
  PREM_finalTVL
}
}
```

List Positions:&#x20;

```
{
epochPositions {
  id
  address
  balance
  isFarming
  marketName
  marketIndex
  epochId
  type
}
}
```
