curl --request GET \
--url https://whitebit.com/api/v1/public/klineimport requests
url = "https://whitebit.com/api/v1/public/kline"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://whitebit.com/api/v1/public/kline', 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://whitebit.com/api/v1/public/kline",
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://whitebit.com/api/v1/public/kline"
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://whitebit.com/api/v1/public/kline")
.asString();require 'uri'
require 'net/http'
url = URI("https://whitebit.com/api/v1/public/kline")
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{
"success": true,
"message": null,
"result": [
[
1631440800,
"45865.62",
"45958.14",
"45981.3",
"45750.23",
"15.327634",
"703140.24230131"
]
]
}{
"success": false,
"message": "ERROR MESSAGE",
"params": []
}Get candlestick (OHLCV) chart data for a trading pair at a specified interval via the V4 API.
curl --request GET \
--url https://whitebit.com/api/v1/public/klineimport requests
url = "https://whitebit.com/api/v1/public/kline"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://whitebit.com/api/v1/public/kline', 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://whitebit.com/api/v1/public/kline",
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://whitebit.com/api/v1/public/kline"
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://whitebit.com/api/v1/public/kline")
.asString();require 'uri'
require 'net/http'
url = URI("https://whitebit.com/api/v1/public/kline")
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{
"success": true,
"message": null,
"result": [
[
1631440800,
"45865.62",
"45958.14",
"45981.3",
"45750.23",
"15.327634",
"703140.24230131"
]
]
}{
"success": false,
"message": "ERROR MESSAGE",
"params": []
}Rate limit
Query Parameters
Available market. Example: BTC_USDT
"BTC_USDT"
Start time in seconds, default value is one week earlier from the current time. Cannot be greater than end parameter. Example: 1596848400
1596848400
End time in seconds, default value is current time. Cannot be less than start parameter. Example: 1596927600
1596927600
Possible values - 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M. By default in case start and end parameters were not specified, for minutes intervals the server will return candlesticks for a period of 1 day. For hours intervals will return candlesticks for 1 week, for days and week intervals will return candlesticks for 1 month and for month interval will return candlesticks for 1 year. Default value is 1h.
1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M "1h"
Possible values from 1 to 1440. Default value is 1440
1 <= x <= 1440100
Was this page helpful?