OHLC
curl --request GET \
--url https://api.invezo.com/v1/market/ohlc \
--header 'x-invezo-api-key: <api-key>'import requests
url = "https://api.invezo.com/v1/market/ohlc"
headers = {"x-invezo-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-invezo-api-key': '<api-key>'}};
fetch('https://api.invezo.com/v1/market/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://api.invezo.com/v1/market/ohlc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-invezo-api-key: <api-key>"
],
]);
$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://api.invezo.com/v1/market/ohlc"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-invezo-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.invezo.com/v1/market/ohlc")
.header("x-invezo-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.invezo.com/v1/market/ohlc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-invezo-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "OK",
"request_id": "",
"pair": "BTC-USD",
"result_count": 5000,
"data": [
{
"t": 1608854400,
"o": 23480.43491,
"h": 24786.33409,
"l": 23428.86903,
"c": 24710.55866
},
{
"t": 1608940800,
"o": 24711.22226,
"h": 26854.21774,
"l": 24496.99906,
"c": 26488.46616
},
...
]
}
Market
OHLC
Historical open, high, low, close price for an asset during a given period.
GET
/
v1
/
market
/
ohlc
OHLC
curl --request GET \
--url https://api.invezo.com/v1/market/ohlc \
--header 'x-invezo-api-key: <api-key>'import requests
url = "https://api.invezo.com/v1/market/ohlc"
headers = {"x-invezo-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-invezo-api-key': '<api-key>'}};
fetch('https://api.invezo.com/v1/market/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://api.invezo.com/v1/market/ohlc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-invezo-api-key: <api-key>"
],
]);
$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://api.invezo.com/v1/market/ohlc"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-invezo-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.invezo.com/v1/market/ohlc")
.header("x-invezo-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.invezo.com/v1/market/ohlc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-invezo-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "OK",
"request_id": "",
"pair": "BTC-USD",
"result_count": 5000,
"data": [
{
"t": 1608854400,
"o": 23480.43491,
"h": 24786.33409,
"l": 23428.86903,
"c": 24710.55866
},
{
"t": 1608940800,
"o": 24711.22226,
"h": 26854.21774,
"l": 24496.99906,
"c": 26488.46616
},
...
]
}
Query Parameters
string
required
asset symbol with base currency (example: btc-usd)
int
required
start of the aggregate time window as a timestamp (example: 1168300800)
int
required
end of the aggregate time window as a timestamp (example: 1652486400)
string
required
size of the time window (valid intervals: 5m, 1h, 1d, 1w, 1mo)
string
sort the results by timestamp. asc will return results in ascending order
(oldest to newest), desc will return results in descending order (newest to
oldest). default value is asc
int
limit the number of results returned, default is 5000 and max is 50000
{
"status": "OK",
"request_id": "",
"pair": "BTC-USD",
"result_count": 5000,
"data": [
{
"t": 1608854400,
"o": 23480.43491,
"h": 24786.33409,
"l": 23428.86903,
"c": 24710.55866
},
{
"t": 1608940800,
"o": 24711.22226,
"h": 26854.21774,
"l": 24496.99906,
"c": 26488.46616
},
...
]
}
⌘I

