Skip to main content

Endpoint

All history GraphQL traffic goes to a single endpoint:
POST /api/sol/graphql
Available on every regional host: ca.raze.sh, ny.raze.sh, de.raze.sh, nl.raze.sh, sg.raze.sh. Regional haproxy routes the request to the nearest ClickHouse mirror.

Authentication

Same API key as the REST endpoints. Send it in the x-api-key header (or as Authorization: Bearer sk_...):
curl -X POST https://ca.raze.sh/api/sol/graphql \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk_your_key_here" \
  -d '{"query":"query { solPrice { solPrice } }"}'

Interactive Playground (GraphiQL)

Each regional host serves a GraphiQL playground on GET /api/sol/graphql — open it directly in a browser: The UI is unauthenticated (static HTML only). To run queries, paste your API key into the Headers panel at the bottom:
{ "x-api-key": "sk_your_key_here" }
Schema introspection, autocomplete, inline docs, and query history are all built in.

When to use GraphQL vs. REST

You want…Use
A single wallet’s trades, token OHLCV, or simple lookupsREST — lower overhead, cached per-URL
Many inputs merged into one response (e.g. trades across 500 signers)GraphQL — one round trip, one merged result
To fetch multiple resources in one requestGraphQL — multi-root queries
Only a subset of fieldsGraphQL — pick exactly what you need

Available Queries

The schema mirrors the REST surface. Top-level query fields include:
  • tradesByMint(mint, limit?, sort?, cursor?) — trades for one token mint
  • tradesBySigner(signer?, signers?, limit?, sort?, cursor?) — trades for one or many signers
  • tradesBySignerAndMint(signer, mint, limit?, sort?, cursor?) — trades for a wallet on a specific token
  • solPrice — current SOL/USD price
  • signerCounts(signer) — trade-count aggregates per wallet
  • …and every other field visible in the GraphiQL schema explorer.
See each query’s dedicated page in this section for the full argument list and return shape.

Pagination

All ...Connection return types use opaque cursor pagination identical to the REST endpoints. A response with hasMore: true includes a nextCursor string — pass it back as the cursor argument on the next call. Cursors encode (timestamp, signature) so pages are stable even when new rows arrive.

Errors

GraphQL always returns HTTP 200 when the request parses. Application errors appear under an errors array:
{
  "data": null,
  "errors": [{ "message": "Invalid signer address" }]
}
Auth errors still return HTTP 401 with the standard JSON body before the GraphQL layer is reached.