curl "https://api.arcus.xyz/v1/candles?market=BTC-USD&timeframe=1m&to=1700000000000000&countback=200"import requests
r = requests.get(
"https://api.arcus.xyz/v1/candles",
params={"market": "BTC-USD", "timeframe": "1m", "to": 1700000000000000, "countback": 200},
)
print(r.json())
const url = new URL("https://api.arcus.xyz/v1/candles");
url.searchParams.set("market", "BTC-USD");
url.searchParams.set("timeframe", "1m");
url.searchParams.set("to", "1700000000000000");
url.searchParams.set("countback", "200");
const res = await fetch(url);
console.log(await res.json());
const options = {method: 'GET'};
fetch('https://api.arcus.xyz/v1/candles', 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.arcus.xyz/v1/candles",
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://api.arcus.xyz/v1/candles"
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://api.arcus.xyz/v1/candles")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.arcus.xyz/v1/candles")
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{
"candles": [
{
"marketDisplayName": "BTC-USD",
"marketId": 32767,
"timeframe": "1m",
"openTime": 1712345640000000,
"open": "94500.00",
"high": "94510.00",
"low": "94490.00",
"close": "94505.00",
"volume": "12.34",
"takerBuyVolume": "7.50",
"notionalVolume": "1165170.00",
"takerBuyNotionalVolume": "708450.00",
"tradeCount": 42,
"isFinal": false
}
],
"total": 123
}{
"error": "Invalid request body",
"code": "GEO_RESTRICTED",
"errorSource": "Order",
"errorType": "Tick",
"rejectionReason": "POST_ONLY_WOULD_CROSS"
}{
"error": "rate limited",
"reason": "account_empty",
"retryAfterMs": 850,
"clientId": "my-order-42"
}{
"error": "Invalid request body",
"code": "GEO_RESTRICTED",
"errorSource": "Order",
"errorType": "Tick",
"rejectionReason": "POST_ONLY_WOULD_CROSS"
}Get OHLCV candles
Returns OHLCV candlestick bars for a market and timeframe.
curl "https://api.arcus.xyz/v1/candles?market=BTC-USD&timeframe=1m&to=1700000000000000&countback=200"import requests
r = requests.get(
"https://api.arcus.xyz/v1/candles",
params={"market": "BTC-USD", "timeframe": "1m", "to": 1700000000000000, "countback": 200},
)
print(r.json())
const url = new URL("https://api.arcus.xyz/v1/candles");
url.searchParams.set("market", "BTC-USD");
url.searchParams.set("timeframe", "1m");
url.searchParams.set("to", "1700000000000000");
url.searchParams.set("countback", "200");
const res = await fetch(url);
console.log(await res.json());
const options = {method: 'GET'};
fetch('https://api.arcus.xyz/v1/candles', 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.arcus.xyz/v1/candles",
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://api.arcus.xyz/v1/candles"
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://api.arcus.xyz/v1/candles")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.arcus.xyz/v1/candles")
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{
"candles": [
{
"marketDisplayName": "BTC-USD",
"marketId": 32767,
"timeframe": "1m",
"openTime": 1712345640000000,
"open": "94500.00",
"high": "94510.00",
"low": "94490.00",
"close": "94505.00",
"volume": "12.34",
"takerBuyVolume": "7.50",
"notionalVolume": "1165170.00",
"takerBuyNotionalVolume": "708450.00",
"tradeCount": 42,
"isFinal": false
}
],
"total": 123
}{
"error": "Invalid request body",
"code": "GEO_RESTRICTED",
"errorSource": "Order",
"errorType": "Tick",
"rejectionReason": "POST_ONLY_WOULD_CROSS"
}{
"error": "rate limited",
"reason": "account_empty",
"retryAfterMs": 850,
"clientId": "my-order-42"
}{
"error": "Invalid request body",
"code": "GEO_RESTRICTED",
"errorSource": "Order",
"errorType": "Tick",
"rejectionReason": "POST_ONLY_WOULD_CROSS"
}isFinal: false.
Bar prices (open/high/low/close) are derived from the market’s oracle price feed, not from executed trades. volume, takerBuyVolume, the notional volumes, and tradeCount remain trade-derived statistics for the bucket. Buckets in which the oracle price did not move are flat at the previous oracle close.Query Parameters
Market identifier, e.g. "BTC-USD".
"BTC-USD"
Candle interval.
1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d, 3d, 1w "1m"
Upper bound of the requested window, expressed as a Unix timestamp in microseconds. The returned bars cover the half-open interval [from, to) or the countback bars ending at this point. Seconds- or milliseconds-scale values are rejected (the server requires at least 1e14, which any microseconds timestamp after ~1973 satisfies).
x >= 1000000000000001700000000000000
Lower bound of the requested window in Unix microseconds. Mutually exclusive with countback; if both are omitted the most recent bars up to to are returned (up to the server maximum). Seconds- or milliseconds-scale values are rejected (the server requires at least 1e14).
x >= 1000000000000001699900000000000
Number of closed bars to return, counting backwards from to. Mutually exclusive with from; if both are omitted the server returns the most recent bars ending at to. Values above 1500 are clamped to the server maximum.
1 <= x <= 1500200
Was this page helpful?