Bitcoin Price API

Live prices, historical prices, and OHLC candles.

Fetch daily historical BTC prices or the latest live price. Add an optional currency query parameter to convert USD values to supported fiat currencies.

How to call

Request format

GET only
curl -X GET "https://newhedge.io/api/v2/price/historical?api_token=YOUR_TOKEN"
curl -X GET "https://newhedge.io/api/v2/price/historical?api_token=YOUR_TOKEN&currency=GBP"
curl -X GET "https://newhedge.io/api/v2/price/live?api_token=YOUR_TOKEN"
curl -X GET "https://newhedge.io/api/v2/price/live?api_token=YOUR_TOKEN&currency=EUR"
Query params

api_token (required) — 24 character API token.

Optional query

currency — fiat currency code from your CurrencyRate.name list (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 or monthly limit reached, 404 when the provided currency is not found.

Plan and quota refusals keep these statuses and error texts and add code, required_plan, current_plan, feature, upgrade_url, limit and resets_at where they apply. 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.

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

Endpoint

Bitcoin Historical Price

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

Endpoint
https://newhedge.io/api/v2/price/historical?api_token=YOUR_TOKEN

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

Sample response
200 Successful response
[
  [
    1792886400000,
    80744.32
  ],
  [
    1792972800000,
    80060.24
  ],
  [
    1793059200000,
    79996.33
  ],
  [
    1793145600000,
    80740.11
  ],
  [
    1793232000000,
    81278.56
  ]
]
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

Endpoint

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
https://newhedge.io/api/v2/price/live?api_token=YOUR_TOKEN

Optional conversion: append &currency=EUR.

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

Sample response
200 Successful response
{
  "price": 80169.78
}

With currency=EUR:

{
  "price": 71965.04
}
Errors

Price endpoint errors

400

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

401

{"error":"Token is required"}, {"error":"Invalid token"}, or {"error":"Monthly API calls limit reached"}.

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.

OHLC candles

Binance spot BTC/USDT OHLCV candles: 5 minute, 1 hour, and 1 day.

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

How to call

Request format

GET only
curl -X GET "https://newhedge.io/api/v2/candles/btc?interval=1d&api_token=YOUR_TOKEN"
curl -X GET "https://newhedge.io/api/v2/candles/btc?interval=1h&api_token=YOUR_TOKEN"
curl -X GET "https://newhedge.io/api/v2/candles/btc?interval=5m&api_token=YOUR_TOKEN"
Query params

api_token (required): 24 character API token. 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 and max 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, an unpermitted interval, or monthly limit reached, 404 for an unknown venue.

Plan and quota refusals keep these statuses and error texts and add code, required_plan, current_plan, feature, upgrade_url, limit and resets_at where they apply. 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.
Endpoint

BTC/USDT Candles: 5m

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

Endpoint
https://newhedge.io/api/v2/candles/btc?interval=5m&api_token=YOUR_TOKEN

Replace YOUR_TOKEN with your API token.

Sample response
200 Successful response
[
  [
    1793263800000,
    79970.85,
    79970.86,
    79866.0,
    79930.0,
    29.03069,
    1793264099999,
    2319819.1459804,
    8526
  ],
  [
    1793264100000,
    79930.01,
    80118.71,
    79930.0,
    80070.01,
    55.8837,
    1793264399999,
    4473416.0161648,
    23712
  ],
  [
    1793264400000,
    80070.01,
    80142.26,
    80062.04,
    80066.01,
    33.77448,
    1793264699999,
    2705536.6598141,
    13763
  ]
]
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

Endpoint

BTC/USDT Candles: 1h

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

Endpoint
https://newhedge.io/api/v2/candles/btc?interval=1h&api_token=YOUR_TOKEN

Replace YOUR_TOKEN with your API token.

Sample response
200 Successful response
[
  [
    1793253600000,
    80234.14,
    80283.55,
    79900.0,
    79968.94,
    370.48828,
    1793257199999,
    29667346.1211051,
    80463
  ],
  [
    1793257200000,
    79968.93,
    79986.01,
    79830.01,
    79861.89,
    424.50887,
    1793260799999,
    33917208.0718639,
    60560
  ],
  [
    1793260800000,
    79861.89,
    80146.81,
    79852.35,
    80070.01,
    671.29848,
    1793264399999,
    53712326.6117276,
    116711
  ]
]
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

Endpoint

BTC/USDT Candles: 1d

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

Endpoint
https://newhedge.io/api/v2/candles/btc?interval=1d&api_token=YOUR_TOKEN

Replace YOUR_TOKEN with your API token.

Sample response
200 Successful response
[
  [
    1792972800000,
    80154.09,
    80844.7,
    79368.67,
    80150.56,
    15371.34784,
    1793059199999,
    1230994078.859839,
    3292323
  ],
  [
    1793059200000,
    80150.56,
    81300.0,
    79506.0,
    80909.77,
    13230.64597,
    1793145599999,
    1062256600.128881,
    2450945
  ],
  [
    1793145600000,
    80909.77,
    81823.0,
    80397.14,
    81343.5,
    13109.37484,
    1793231999999,
    1062453459.754595,
    2544713
  ]
]
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

400

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

401

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

404

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