Step 1: Get Your API Key

Create a free account at kwery.xyz/dashboard and generate an API key. Copy it immediately — the full key is only shown once.

Keys are prefixed with kwery_live_ (production) or kwery_test_ (development). Use the X-API-Key header in production; you can also pass the key as the api_key query parameter for quick browser or script tests. The Free plan includes 150K credits/month and 15 requests/minute.

Step 2: Make Your First Request

Fetch the 5 most recent 1-hour BTC/USDT candles from Binance:

cURL

curl "https://kwery-api.com/v1/candles?symbol=BTCUSDT&source=binance&interval=1h&limit=5" \
  -H "X-API-Key: kwery_live_YOUR_KEY"

Python

import requests

response = requests.get(
    "https://kwery-api.com/v1/candles",
    headers={"X-API-Key": "kwery_live_YOUR_KEY"},
    params={
        "symbol": "BTCUSDT",
        "source": "binance",
        "interval": "1h",
        "limit": 5,
    },
)

data = response.json()
print(data)

TypeScript

const response = await fetch(
  "https://kwery-api.com/v1/candles?symbol=BTCUSDT&source=binance&interval=1h&limit=5",
  {
    headers: {
      "X-API-Key": "kwery_live_YOUR_KEY",
    },
  }
);
const data = await response.json();
console.log(data);

Step 3: Understand the Response

Every successful response follows the same envelope:

{
  "data": [
    {
      "open_time": "2025-01-15T12:00:00Z",
      "open": 99250.10,
      "high": 99480.00,
      "low": 99100.55,
      "close": 99350.75,
      "volume": 1234.5678
    },
    {
      "open_time": "2025-01-15T11:00:00Z",
      "open": 99050.00,
      "high": 99300.20,
      "low": 98980.30,
      "close": 99250.10,
      "volume": 987.6543
    }
  ],
  "meta": {
    "symbol": "BTCUSDT",
    "source": "binance",
    "interval": "1h",
    "count": 2,
    "next_cursor": null
  }
}
  • data — Array of results in descending chronological order.
  • meta.count — Number of rows returned in this response.
  • meta.next_cursor — Opaque cursor for pagination. null when there are no more results. Pass as ?cursor= to fetch the next page.

Response Headers

Every response includes headers that report your plan, credit usage, and request metadata:

HeaderDescription
X-PlanYour current plan (basic, pro, business, enterprise)
X-Credits-UsedCredits consumed by this request
X-Credits-RemainingCredits remaining in your current billing period
X-Rows-ReturnedNumber of data rows in the response
X-Rows-Cappedtrue if the result set was truncated by your plan's row limit
X-Process-Time-MsServer-side processing time in milliseconds
X-Request-IDUnique request identifier for debugging and support

Next Steps

  • Plans & Pricing — Compare plan limits, credit costs, and rate limits.
  • Authentication — API key validation, security best practices, and error handling.
  • API Reference — Full parameter and response documentation for all endpoints.