Skip to main content

API Reference

The Kwery REST API is versioned at /v1. All endpoints require an X-API-Key header. The authoritative spec is the OpenAPI 3.1 document — this reference tracks that spec.

Base URL: https://kwery-api.com

Endpoint Groups

Discovery

EndpointDescription
GET /v1/sourcesList all available data sources
GET /v1/symbolsList all available symbols per source
GET /v1/limitsInspect your plan limits and current usage

Markets

EndpointDescription
GET /v1/marketsSearch and filter prediction markets across Polymarket and Kalshi
Platform routesSource-scoped shortcuts (/v1/polymarket/*, /v1/kalshi/*, etc.)

OHLCV & Prices

EndpointDescription
GET /v1/candlesOHLCV candles — Binance, Hyperliquid, Chainlink, Polymarket, Kalshi
GET /v1/ticker1-second ticker snapshots (Pro+)
GET /v1/candles?source=chainlinkChainlink oracle OHLCV
GET /v1/derivedDerived metrics (basis, spread, ratios)

Microstructure

EndpointDescription
GET /v1/snapshotsOrder book snapshots across sources
GET /v1/orderbookHistorical order book depth
GET /v1/tradesIndividual trade executions
GET /v1/flowDirectional buy/sell flow — Binance spot

Derivatives

EndpointDescription
GET /v1/fundingFunding rates — Binance Futures and Hyperliquid
GET /v1/open-interestOpen interest history
GET /v1/liquidationsLiquidation events

Account & Operations

EndpointDescription
GET /v1/statusAPI and ingestion pipeline status
GET /v1/healthHealth check — uptime monitoring

Authentication

Pass your API key as a request header:

curl https://kwery-api.com/v1/candles \
  -H "X-API-Key: your_api_key_here" \
  -G -d "symbol=BTC&interval=1h&source=binance"

You can also pass ?api-key=your_api_key_here as a query parameter, but the header is recommended. Get a key at kwery.xyz/dashboard.

Response Envelope

Every endpoint returns the same envelope:

{
  "data": [...],
  "meta": {
    "total": 500,
    "next_cursor": "abc123"
  }
}

Paginate with ?after=<next_cursor>. See Pagination for details.

Error Codes

StatusMeaning
401Missing or invalid API key
403Plan limit exceeded — upgrade at kwery.xyz/pricing
422Invalid parameters — check the field errors in the response body
429Rate limited — back off and retry

Full error reference: Error Codes.