Skip to main content

GET /v1/oracle

Retrieve Chainlink on-chain oracle data with candle and per-round granularity.

Min Tier: Free (candles) / Business (rounds) | Credits: 50 base + 3 per row returned

Parameters

ParameterTypeRequiredDefaultDescription
api-keystringYesYour API key.
symbolstringYesPrice feed symbol (e.g. BTC, ETH, LINK).
granularitystringNocandlesResponse granularity. One of candles, rounds.
intervalstringNo1hCandle interval. One of 5m, 15m, 1h, 4h, 1d. Only used when granularity=candles.
startstringNoISO 8601 start time (inclusive).
endstringNoISO 8601 end time (exclusive).
limitintegerNo100Number of rows to return. Range: 1–1000.
afterstringNoCursor for pagination. Pass meta.next_cursor from a previous response.

Response (candles)

Returned when granularity=candles (default).

FieldTypeDescription
timestampstringISO 8601 candle open time.
symbolstringPrice feed symbol.
sourcestringAlways chainlink.
intervalstringCandle interval.
opennumberOpening price (first oracle update in the interval).
highnumberHighest reported price.
lownumberLowest reported price.
closenumberClosing price (last oracle update in the interval).
volumenullAlways null. Chainlink is an oracle feed, not an exchange.

Response (rounds)

Returned when granularity=rounds. Requires Business tier.

FieldTypeDescription
timestampstringISO 8601 time of the oracle answer.
symbolstringPrice feed symbol.
sourcestringAlways chainlink.
round_idstringChainlink aggregator round ID.
answered_in_roundstringThe round in which the answer was computed.
pricenumberReported price for this round.
update_timestampstringISO 8601 on-chain update timestamp.
tx_hashstringTransaction hash of the on-chain update.
block_numberintegerEthereum block number containing the update.
gas_price_gweinumberGas price of the transaction in gwei.

Response Headers

HeaderDescription
X-Credits-UsedCredits consumed by this request.
X-Credits-RemainingCredits remaining in your billing cycle.
X-Rows-ReturnedNumber of rows in the response.
X-Rows-Cappedtrue if the result set was truncated by your plan's row limit.

Example

cURL (candles)

curl "https://kwery-api.com/v1/oracle?api-key=YOUR_KEY&symbol=ETH&granularity=candles&interval=15m&start=2026-03-08T12:00:00Z&end=2026-03-08T14:00:00Z&limit=8"

cURL (rounds)

curl "https://kwery-api.com/v1/oracle?api-key=YOUR_KEY&symbol=ETH&granularity=rounds&start=2026-03-08T12:00:00Z&end=2026-03-08T12:30:00Z&limit=5"

Python

import requests

resp = requests.get("https://kwery-api.com/v1/oracle", params={
    "api-key": "YOUR_KEY",
    "symbol": "ETH",
    "granularity": "candles",
    "interval": "15m",
    "start": "2026-03-08T12:00:00Z",
    "end": "2026-03-08T14:00:00Z",
    "limit": 8,
})
data = resp.json()

TypeScript

const params = new URLSearchParams({
  "api-key": "YOUR_KEY",
  "symbol": "ETH",
  "granularity": "candles",
  "interval": "15m",
  "start": "2026-03-08T12:00:00Z",
  "end": "2026-03-08T14:00:00Z",
  "limit": "8",
});
const res = await fetch(`https://kwery-api.com/v1/oracle?${params}`);
const data = await res.json();

Example Response (candles)

{
  "data": [
    {
      "timestamp": "2026-03-08T12:00:00Z",
      "symbol": "ETH",
      "source": "chainlink",
      "interval": "15m",
      "open": 3425.18,
      "high": 3428.92,
      "low": 3423.05,
      "close": 3427.60,
      "volume": null
    },
    {
      "timestamp": "2026-03-08T12:15:00Z",
      "symbol": "ETH",
      "source": "chainlink",
      "interval": "15m",
      "open": 3427.60,
      "high": 3431.44,
      "low": 3426.10,
      "close": 3430.85,
      "volume": null
    }
  ],
  "meta": {
    "symbol": "ETH",
    "source": "chainlink",
    "granularity": "candles",
    "interval": "15m",
    "returned": 8,
    "next_cursor": null,
    "has_more": false
  }
}

Example Response (rounds)

{
  "data": [
    {
      "timestamp": "2026-03-08T12:00:12Z",
      "symbol": "ETH",
      "source": "chainlink",
      "round_id": "36893488147419140985",
      "answered_in_round": "36893488147419140985",
      "price": 3425.18000000,
      "update_timestamp": "2026-03-08T12:00:12Z",
      "tx_hash": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
      "block_number": 21847392,
      "gas_price_gwei": 12.4
    },
    {
      "timestamp": "2026-03-08T12:03:48Z",
      "symbol": "ETH",
      "source": "chainlink",
      "round_id": "36893488147419140986",
      "answered_in_round": "36893488147419140986",
      "price": 3426.42000000,
      "update_timestamp": "2026-03-08T12:03:48Z",
      "tx_hash": "0x2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c",
      "block_number": 21847411,
      "gas_price_gwei": 11.8
    }
  ],
  "meta": {
    "symbol": "ETH",
    "source": "chainlink",
    "granularity": "rounds",
    "returned": 5,
    "next_cursor": "eyJ0IjoiMjAyNi0wMy0wOFQxMjoxNToyMFoifQ",
    "has_more": true
  }
}

Source-Specific Behavior

Candle granularity — Only 5m and 15m intervals are available at the Free and Pro tiers. 1h, 4h, and 1d are available on all tiers. Chainlink oracle feeds do not have volume data, so the volume field is always null. Prices are derived from the Chainlink aggregator's latestAnswer across all reporting rounds within the interval.

Round granularity — Each row represents a single Chainlink aggregator round (one on-chain price update). Round data includes the transaction hash and block metadata, which is useful for verifying data on-chain or analyzing oracle latency. Rounds are only available on the Business tier. The interval parameter is ignored when granularity=rounds.

Tier Access

PlanCandlesRounds
Free14 days, 5m/15m/1h/4h/1dNot available — returns 403.
Pro30 days, 5m/15m/1h/4h/1dNot available — returns 403.
BusinessFull history, all intervalsFull history

Errors

StatusCodeWhen
400invalid_symbolThe symbol parameter is missing or not a supported Chainlink price feed.
400invalid_granularityThe granularity parameter is not one of candles, rounds.
400invalid_intervalThe requested interval is not supported for Chainlink candles.
400invalid_time_rangestart is after end, or the range exceeds your plan's history depth.
401unauthorizedMissing or invalid api-key.
403tier_restrictedYour plan does not support round-level data or the requested history depth.
429rate_limitedYou have exceeded your plan's request rate. Retry after the Retry-After header value.