GET /api/ohlc
curl --request GET \
--url https://public-api.binibit.com/api/ohlcimport requests
url = "https://public-api.binibit.com/api/ohlc"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://public-api.binibit.com/api/ohlc', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.binibit.com/api/ohlc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.binibit.com/api/ohlc"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.binibit.com/api/ohlc")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.binibit.com/api/ohlc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"date": "<string>",
"open": 123,
"max": 123,
"min": 123,
"close": 123,
"volume": 123,
"volumeBase": 123
}Market Data
GET /api/ohlc
OHLCV candle data with multiple intervals.
GET
/
api
/
ohlc
GET /api/ohlc
curl --request GET \
--url https://public-api.binibit.com/api/ohlcimport requests
url = "https://public-api.binibit.com/api/ohlc"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://public-api.binibit.com/api/ohlc', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.binibit.com/api/ohlc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.binibit.com/api/ohlc"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.binibit.com/api/ohlc")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.binibit.com/api/ohlc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"date": "<string>",
"open": 123,
"max": 123,
"min": 123,
"close": 123,
"volume": 123,
"volumeBase": 123
}Description
Returns OHLC (open, high, low, close) candles with volume for a trading pair over a specified date range and interval.Parameters
string
required
Pair code in
{base}_{target} format. Example: BTC_USDT.string
required
Candle interval. Allowed values:
minuteminutes3minutes5minutes15minutes30hourhour4daymonthyear
string
required
Range start, ISO 8601 (UTC, no offset). Example:
2026-04-28T00:00:00.string
required
Range end, ISO 8601 (UTC, no offset). Example:
2026-04-29T00:00:00.Response
Array of candle objects, sorted bydate ascending.
string
required
Candle start time, ISO 8601.
decimal
required
Opening price of the candle.
decimal
required
Highest price during the candle.
decimal
required
Lowest price during the candle.
decimal
required
Closing price of the candle.
decimal
required
Volume during the candle in target (quote) currency.
decimal
required
Volume during the candle in base currency.
Example request
curl "https://public-api.binibit.com/api/ohlc?currencyPairCode=BTC_USDT&interval=hour&start=2026-04-28T00:00:00&end=2026-04-29T00:00:00"
Example response
[
{
"date": "2026-04-28T00:03:06.897888",
"open": 77936.97829703,
"max": 78007.06513881,
"min": 76834.95847644,
"close": 77251.3976702,
"volume": 3791.33318336,
"volumeBase": 0.048878
},
{
"date": "2026-04-28T01:04:55.385552",
"open": 77251.3976702,
"max": 77941.52434376,
"min": 76416.4096695,
"close": 76416.4096695,
"volume": 3027.26830741,
"volumeBase": 0.039149
}
]
Notes
- Field naming is
max/min(nothigh/low). - The
dateis approximate — within a few seconds of the canonical interval boundary, depending on when the first trade of the period was matched. - For very long ranges and small intervals, paginate manually by issuing multiple calls with non-overlapping
start/end.
