Skip to content

Search API documentation

Metrics, companies & guides

Start here

Quickstart Authentication API plans & access Bitcoin prices & OHLCV data
Try

Bitcoin Price & OHLCV Data API

Live Bitcoin prices, historical prices and Bitcoin OHLCV data.

Parameters & responses
Query params

Authorization: Bearer YOUR_TOKEN (required) — your 24 character API key (also accepted: the X-API-Key header or the api_token query parameter).

Optional query

currency — supported fiat currency code (for example EUR).

include — /api/v2/price/historical only. definition wraps the response as {"definition": …, "data": …} and returns the btc_daily_price record below; see Definitions.

Responses

200 on success, 400 for an unknown include value, 401 for missing/invalid token, 404 when the provided currency is not found, 429 when the monthly limit is reached.

Plan and quota refusals keep their error texts and add code, required_plan, current_plan, feature, upgrade_url, limit and resets_at where they apply. The 429 for a used-up monthly allowance carries Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset. A Pro token whose history window removed points also gets the X-Newhedge-History-Truncated headers, and for a Pro token X-Newhedge-Available-From is the start of the window. See Errors and plan limits.

Every 404 and 400 also carries a machine code and, where a list of valid names exists, up to 3 did_you_mean spellings, catalog_url and docs_url. Two different keys in one request are a 400 with code: conflicting_credentials. Only a successful response spends one call from the monthly allowance. A refused or failed call (any 4xx or 5xx, a conflict between credentials, an unknown path) spends nothing, and the request-rate limits are unchanged. The full list of codes is under Errors on the introduction page.

Available currencies (164)

AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GGP, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, IMP, INR, IQD, IRR, ISK, JEP, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LVL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, STD, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, UYU, UZS, VES, VND, VUV, WST, XAF, XAG, XAU, XCD, XDR, XOF, XPF, YER, ZAR, ZMW, ZWG, ZWL

Bitcoin Historical Price

Returns daily BTC price history as an array of [timestamp, price] pairs.

Endpoint
curl -H "Authorization: Bearer YOUR_TOKEN" "https://newhedge.io/api/v2/price/historical"

Optional conversion: append &currency=EUR. Replace YOUR_TOKEN with your API token.

Example response
200 Historical · 2025-01-01
[
  [1735516800000,92643.2146040146],
  [1735603200000,93429.2028113992],
  [1735689600000,94419.7575054903]
]
Definition & units Definition

Every point is one btc_daily_price sample.

Value: Daily Bitcoin reference price in US dollars, sampled once per day at 00:00 UTC from the Newhedge spot price aggregate.

Units: usd (before any currency conversion)

Timestamp: Labelled 00:00 UTC of the day of the sample. Missing days are backfilled; a stored day is never overwritten.

Calendar: calendar_daily

Revision policy: append_only. A stored day is never overwritten.

Universe: Major spot exchanges.

Methodology version: 2026-09-06

Bitcoin Live Price

Returns the latest available BTC price. The price refreshes every few seconds.

The web chart bitcoin-live-price is not served by /api/v2/metrics. Use /api/v2/price/live for the live price.

Endpoint
curl -H "Authorization: Bearer YOUR_TOKEN" "https://newhedge.io/api/v2/price/live"

Optional conversion: append &currency=EUR.

Optional source: append &source=binance. One of aggregate, binance, coinbase, kraken. Default aggregate.

Example response
200 Fictional example
{
  "price": 94500.0
}

With currency=EUR:

{
  "price": 85050.0
}
Errors

Price endpoint errors

Parameters & responses
400

{"error":"include must be one of definition"} when include carries any other value.

401

{"error":"Token is required"} or {"error":"Invalid token"}.

404

{"error":"Currency not found"} when currency does not match a saved currency code. Live also returns {"error":"Price unavailable for source=<source>"} when the chosen source has no price.

422

{"error":"Invalid source. Use aggregate, binance, coinbase, or kraken."} when the live source is not in the list above.

429

{"error":"Monthly API calls limit reached"} when the token has used its monthly allowance. The response carries Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset; the count resets on the first day of each month, 00:00 UTC.

Bitcoin OHLCV data

Open, high, low, close and volume data for Binance spot BTC/USDT, at 5-minute, hourly and daily intervals.

History from 2017-08-17. Only closed candles are stored and served. Prices and quote volume are quoted in USDT, not USD.

Request

GET
curl -H "Authorization: Bearer YOUR_TOKEN" "https://newhedge.io/api/v2/candles/btc?interval=1d"
curl -H "Authorization: Bearer YOUR_TOKEN" "https://newhedge.io/api/v2/candles/btc?interval=1h"
curl -H "Authorization: Bearer YOUR_TOKEN" "https://newhedge.io/api/v2/candles/btc?interval=5m"
Parameters & responses
Query params

Authorization: Bearer YOUR_TOKEN (required): your 24 character API key (also accepted: the X-API-Key header or the api_token query parameter). interval (required): one of 5m, 1h, 1d.

Optional query

venue: default and only value today is binance. before: exclusive epoch-ms cursor. limit: page size, default 1000, maximum 1000.

include: definition wraps the response as {"definition": …, "data": …} and returns the record for the requested interval; see Definitions.

Responses

200 on success, 400 for an invalid interval or an unknown include value, 401 for missing/invalid token or an unpermitted interval, 404 for an unknown venue, 429 when the monthly limit is reached.

Plan and quota refusals keep their error texts and add code, required_plan, current_plan, feature, upgrade_url, limit and resets_at where they apply. The 429 for a used-up monthly allowance carries Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset. A Pro token whose history window removed points also gets the X-Newhedge-History-Truncated headers, and for a Pro token X-Newhedge-Available-From is the start of the window. See Errors and plan limits.

1d is available to any authenticated token. 5m and 1h require an Advanced or enterprise token.

Candle semantics

Gaps and early closes

  • A missing row means the exchange halted or had an outage. Gaps are never filled.
  • A close_time earlier than open_time plus the interval length minus 1 ms means an exchange halt cut the candle short. The candle is still valid.
  • Zero volume or zero trade_count is a valid no-trade bar reported by the venue.
  • Rows with zero duration (close_time equal to open_time) are excluded.

BTC/USDT OHLCV: 5m

Rows are [open_time, open, high, low, close, volume, close_time, quote_volume, trade_count], ascending by open_time.

Endpoint
curl -H "Authorization: Bearer YOUR_TOKEN" "https://newhedge.io/api/v2/candles/btc?interval=5m"

Replace YOUR_TOKEN with your API token.

Example response
200 Fictional example
[
  [1735689000000,94000.0,95000.0,93000.0,94500.0,100.0,1735689299999,9450000.0,1000],
  [1735689300000,94000.0,95000.0,93000.0,94500.0,100.0,1735689599999,9450000.0,1000],
  [1735689600000,94000.0,95000.0,93000.0,94500.0,100.0,1735689899999,9450000.0,1000]
]
Definition & units Definition

Value: OHLCV candle for the Binance spot BTC/USDT market: open, high, low, and close in USDT, base volume in BTC, quote volume in USDT, and trade count. Row order: [open_time_ms, open, high, low, close, volume_btc, close_time_ms, quote_volume_usdt, trade_count].

Units: usdt. Quote currency is USDT, not USD; no USD conversion is applied to this series

Timestamp: open_time is the candle's opening instant in UTC milliseconds; close_time is the last millisecond of the candle, or earlier when an exchange halt cut the candle short (the candle is still valid). A missing row means the exchange halted or had an outage; gaps are never filled. Zero volume or zero trades is a valid no-trade bar reported by the venue. Rows with zero duration (close_time equal to open_time) are excluded. Only closed candles are stored and served.

Calendar: intraday

Revision policy: never. A stored candle is never overwritten. Zero-duration placeholder rows were removed once in October 2026.

Universe: Binance spot BTC/USDT; history from 2017-08-17.

Methodology version: 2026-09-06

BTC/USDT OHLCV: 1h

Rows are [open_time, open, high, low, close, volume, close_time, quote_volume, trade_count], ascending by open_time.

Endpoint
curl -H "Authorization: Bearer YOUR_TOKEN" "https://newhedge.io/api/v2/candles/btc?interval=1h"

Replace YOUR_TOKEN with your API token.

Example response
200 Fictional example
[
  [1735682400000,94000.0,95000.0,93000.0,94500.0,100.0,1735685999999,9450000.0,1000],
  [1735686000000,94000.0,95000.0,93000.0,94500.0,100.0,1735689599999,9450000.0,1000],
  [1735689600000,94000.0,95000.0,93000.0,94500.0,100.0,1735693199999,9450000.0,1000]
]
Definition & units Definition

Value: OHLCV candle for the Binance spot BTC/USDT market: open, high, low, and close in USDT, base volume in BTC, quote volume in USDT, and trade count. Row order: [open_time_ms, open, high, low, close, volume_btc, close_time_ms, quote_volume_usdt, trade_count].

Units: usdt. Quote currency is USDT, not USD; no USD conversion is applied to this series

Timestamp: open_time is the candle's opening instant in UTC milliseconds; close_time is the last millisecond of the candle, or earlier when an exchange halt cut the candle short (the candle is still valid). A missing row means the exchange halted or had an outage; gaps are never filled. Zero volume or zero trades is a valid no-trade bar reported by the venue. Rows with zero duration (close_time equal to open_time) are excluded. Only closed candles are stored and served.

Calendar: intraday

Revision policy: never. A stored candle is never overwritten. Zero-duration placeholder rows were removed once in October 2026.

Universe: Binance spot BTC/USDT; history from 2017-08-17.

Methodology version: 2026-09-06

BTC/USDT OHLCV: 1d

Rows are [open_time, open, high, low, close, volume, close_time, quote_volume, trade_count], ascending by open_time.

Endpoint
curl -H "Authorization: Bearer YOUR_TOKEN" "https://newhedge.io/api/v2/candles/btc?interval=1d"

Replace YOUR_TOKEN with your API token.

Example response
200 Fictional example
[
  [1735516800000,94000.0,95000.0,93000.0,94500.0,100.0,1735603199999,9450000.0,1000],
  [1735603200000,94000.0,95000.0,93000.0,94500.0,100.0,1735689599999,9450000.0,1000],
  [1735689600000,94000.0,95000.0,93000.0,94500.0,100.0,1735775999999,9450000.0,1000]
]
Definition & units Definition

Value: OHLCV candle for the Binance spot BTC/USDT market: open, high, low, and close in USDT, base volume in BTC, quote volume in USDT, and trade count. Row order: [open_time_ms, open, high, low, close, volume_btc, close_time_ms, quote_volume_usdt, trade_count].

Units: usdt. Quote currency is USDT, not USD; no USD conversion is applied to this series

Timestamp: open_time is the candle's opening instant in UTC milliseconds; close_time is the last millisecond of the candle, or earlier when an exchange halt cut the candle short (the candle is still valid). A missing row means the exchange halted or had an outage; gaps are never filled. Zero volume or zero trades is a valid no-trade bar reported by the venue. Rows with zero duration (close_time equal to open_time) are excluded. Only closed candles are stored and served.

Calendar: calendar_daily

Revision policy: never. A stored candle is never overwritten. Zero-duration placeholder rows were removed once in October 2026.

Universe: Binance spot BTC/USDT; history from 2017-08-17.

Methodology version: 2026-09-06

Errors

Error responses

Parameters & responses
400

{"error":"interval must be one of 5m, 1h, 1d"}

401

{"error":"Token is required"}, {"error":"Invalid token"}, or {"error":"interval 5m requires an Advanced or enterprise token"}.

404

{"error":"Venue not found"} when venue is not binance.

429

{"error":"Monthly API calls limit reached"} when the token has used its monthly allowance. The response carries Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset; the count resets on the first day of each month, 00:00 UTC.