> For the complete documentation index, see [llms.txt](https://docs.chamberfi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chamberfi.com/build/data-api.md).

# Data API

Chamber runs a hosted GraphQL API that exposes vault-level and protocol-wide data. It's separate from the [subgraph](/build/subgraph.md), which runs per-chain Graph Protocol indexes.

Use this API when you want a single cross-chain endpoint for vault lists, token prices, and aggregate analytics without running your own indexer.

The endpoint is live, in production use (app backend, internal analytics), and introspection is enabled, so the full schema is self-describing. This page covers the common queries; use introspection (below) for the exhaustive list.

## Endpoint

```
POST https://api-v2.dhedge.org/graphql
```

* GraphQL over HTTPS, POST only
* `Content-Type: application/json`
* No authentication required. The endpoint is public. Rate limits may apply.

## Known queries

Use [introspection](#schema-introspection) for the full list and field-level types.

### Example: list vaults on a chain

**`allFundsByBlockchainCode(blockchainCode: String!)`** returns vaults on a given chain.

Response fields include: `address`, `managerLogicAddress`, `name`, `managerName`, `totalValue` (wei-scale integer string, 18-decimal USD).

```bash
curl -X POST https://api-v2.dhedge.org/graphql \
  -H "Content-Type: application/json" \
  -d '{"query":"{ allFundsByBlockchainCode(blockchainCode: \"POLYGON\") { address name managerName totalValue } }"}'
```

`blockchainCode` is an untyped string; confirmed working values include `POLYGON`, `OPTIMISM`, `ARBITRUM`, `BASE`, `MAINNET` (Ethereum), and `HYPEREVM`. The value is case-insensitive. Unrecognised codes may silently fall back to a default response rather than erroring, so validate the response before assuming a chain is wired in.

## Schema introspection

To get the full list of available queries, run schema introspection:

```bash
curl -X POST https://api-v2.dhedge.org/graphql \
  -H "Content-Type: application/json" \
  -d '{"query":"{__schema{queryType{fields{name description}}}}"}'
```

Introspection is enabled in production. This is the same API powering the Chamber app. For targeted schema exploration, a GraphQL client (GraphiQL, Insomnia, Apollo Sandbox) pointed at the endpoint gives you autocomplete and type info.

## When to use which

| Need                                                          | Use                                           |
| ------------------------------------------------------------- | --------------------------------------------- |
| List vaults across chains, single endpoint                    | Data API                                      |
| Deep per-chain indexed history (events, transfers, fee mints) | [Subgraph](/build/subgraph.md)                |
| Live vault state (current composition, NAV)                   | [SDK](/build/sdk.md) or direct contract calls |
| Prepare a deposit/withdraw tx                                 | [SDK](/build/sdk.md) or direct contract calls |

The Data API is the lightest read surface and covers the most chains (including HyperEVM). Reach for the subgraph when you need event-level history or custom GraphQL joins beyond what's exposed here, and the SDK / direct contracts when you need authoritative onchain reads (e.g. per-block NAV).

## See also

* [Subgraph](/build/subgraph.md): per-chain indexes via The Graph
* [SDK](/build/sdk.md): live onchain reads
