> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ironflow.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytics

> Aggregated market intelligence — net flows, liquidation heatmaps, order flow, vault rankings.

Analytics endpoints provide aggregated insights beyond raw event data.

**Tier gating:**

* **All tiers** (Free, Explorer, Builder, Enterprise): `net-flows`, `funding-stats`.
* **Builder+** only: `liquidation-levels`, `order-flow`, `vault-leaderboard`.

<Note>
  Analytics endpoints enforce the same per-request window cap as the raw data endpoints (Free 1h, Explorer 24h, Builder 7d, Enterprise unlimited — see [Rate Limits & Errors](/concepts/rate-limits)). Unbounded or wide-window calls return `400 QUERY_WINDOW_EXCEEDED`. For `order-flow` without a `market` or `address` filter, the window is capped at 4 hours regardless of tier — add a filter or pass explicit `from`/`to` parameters.
</Note>

## Net flows

Track capital inflows and outflows over time:

<CodeGroup>
  ```typescript TypeScript theme={null}
  const flows = await client.netFlows({ interval: "1d", limit: 7 });

  for (const f of flows) {
    const date = new Date(f.timestamp).toLocaleDateString();
    console.log(`${date}: +$${f.deposits} -$${f.withdrawals} = $${f.net}`);
  }
  ```

  ```python Python theme={null}
  flows = await client.net_flows(interval="1d", limit=7)

  for f in flows:
      print(f"{f.timestamp}: +${f.deposits} -${f.withdrawals} = ${f.net}")
  ```
</CodeGroup>

## Liquidation heatmap

See where liquidations cluster by price level — useful for identifying support/resistance:

```typescript TypeScript theme={null}
const levels = await client.liquidationLevels("BTC-PERP", {
  bucket_size: 100,
});

for (const l of levels) {
  console.log(`$${l.price_bucket}: ${l.count} liquidations, ${l.total_size} total`);
}
```

## Order flow

Analyze fill rates and cancel rates per market — works across perps, spot, and HIP-4 prediction markets:

```typescript TypeScript theme={null}
const flow = await client.orderFlow();

for (const f of flow) {
  console.log(`${f.market}: ${f.fills} fills, ${f.cancels} cancels, ${f.fill_rate} fill rate`);
}
```

Cancel-to-fill ratios on HIP-4 outcome markets are a useful liquidity-quality signal at launch — a binary trading at high cancel rates with low fill counts indicates illiquid markets that may not settle reliably.

## Vault leaderboard

See which vaults are attracting the most capital:

```typescript TypeScript theme={null}
const vaults = await client.vaultLeaderboard({ limit: 10 });

for (const v of vaults) {
  console.log(`${v.vault}: $${v.net_deposits} net (${v.deposit_count} in, ${v.withdraw_count} out)`);
}
```

## Funding rate statistics

Track funding rate trends with annualized rates:

```typescript TypeScript theme={null}
const stats = await client.fundingStats("BTC-PERP", {
  interval: "1d",
  limit: 30,
});

for (const s of stats) {
  console.log(`${new Date(s.timestamp).toLocaleDateString()}: ${s.rate} (${s.annualized} annualized)`);
}
```

## MCP (AI agents)

All analytics are available as MCP tools for AI agents:

```
get_net_flows — capital flow analysis
get_liquidation_levels — liquidation heatmap data
get_order_flow — execution quality metrics
get_vault_leaderboard — vault capital rankings
get_funding_stats — funding rate trends
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.