curl --request POST \
--url https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/get-candles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "BTC-USD"
}
'import requests
url = "https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/get-candles"
payload = { "product_id": "BTC-USD" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({product_id: 'BTC-USD'})
};
fetch('https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/get-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.aisa.one/apis/v1/api-exchange-coinbase-com/markets/get-candles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'product_id' => 'BTC-USD'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/get-candles"
payload := strings.NewReader("{\n \"product_id\": \"BTC-USD\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/get-candles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": \"BTC-USD\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/get-candles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_id\": \"BTC-USD\"\n}"
response = http.request(request)
puts response.read_body{
"candles": [
{
"close": 64083.32,
"high": 65762.78,
"low": 63641,
"open": 65051.24,
"time": 1784851200,
"time_iso": "2026-07-24T00:00:00Z",
"volume": 7327.49813634
},
{
"close": 64295.61,
"high": 64387.43,
"low": 63732,
"open": 64083.31,
"time": 1784937600,
"time_iso": "2026-07-25T00:00:00Z",
"volume": 2180.46852205
},
{
"close": 65341.07,
"high": 65511.36,
"low": 64229.6,
"open": 64295.61,
"time": 1785024000,
"time_iso": "2026-07-26T00:00:00Z",
"volume": 2390.56790196
},
{
"close": 63694.43,
"high": 65705.08,
"low": 63545,
"open": 65341.07,
"time": 1785110400,
"time_iso": "2026-07-27T00:00:00Z",
"volume": 5069.45269918
},
{
"close": 63847.12,
"high": 64041.02,
"low": 62645.39,
"open": 63693.44,
"time": 1785196800,
"time_iso": "2026-07-28T00:00:00Z",
"volume": 6232.18054403
},
{
"close": 63896.14,
"high": 64665.3,
"low": 63194.45,
"open": 63847.12,
"time": 1785283200,
"time_iso": "2026-07-29T00:00:00Z",
"volume": 8092.70552294
},
{
"close": 64721.9,
"high": 65118.08,
"low": 63502.91,
"open": 63896.14,
"time": 1785369600,
"time_iso": "2026-07-30T00:00:00Z",
"volume": 8025.87127027
},
{
"close": 62825.9,
"high": 65360,
"low": 62358.96,
"open": 64721.9,
"time": 1785456000,
"time_iso": "2026-07-31T00:00:00Z",
"volume": 8260.37090197
},
{
"close": 62764.2,
"high": 63093,
"low": 62209.81,
"open": 62826.69,
"time": 1785542400,
"time_iso": "2026-08-01T00:00:00Z",
"volume": 3060.55404241
},
{
"close": 63499.49,
"high": 63730.49,
"low": 62743.87,
"open": 62764.2,
"time": 1785628800,
"time_iso": "2026-08-02T00:00:00Z",
"volume": 3283.94724012
},
{
"close": 63466.51,
"high": 64032.43,
"low": 62210.14,
"open": 63499.49,
"time": 1785715200,
"time_iso": "2026-08-03T00:00:00Z",
"volume": 7086.70328594
},
{
"close": 64050.51,
"high": 64497.24,
"low": 63250,
"open": 63466.51,
"time": 1785801600,
"time_iso": "2026-08-04T00:00:00Z",
"volume": 6227.77436334
},
{
"close": 64603.03,
"high": 64988.78,
"low": 63814.8,
"open": 64050.51,
"time": 1785888000,
"time_iso": "2026-08-05T00:00:00Z",
"volume": 6932.34404967
},
{
"close": 64267.3,
"high": 64944.16,
"low": 64087.41,
"open": 64603.02,
"time": 1785974400,
"time_iso": "2026-08-06T00:00:00Z",
"volume": 4520.43206155
},
{
"close": 64891.61,
"high": 65348.97,
"low": 64099.35,
"open": 64267.3,
"time": 1786060800,
"time_iso": "2026-08-07T00:00:00Z",
"volume": 6181.48293213
},
{
"close": 64908.72,
"high": 65150.16,
"low": 64789.89,
"open": 64891.6,
"time": 1786147200,
"time_iso": "2026-08-08T00:00:00Z",
"volume": 2494.26436439
},
{
"close": 64848.69,
"high": 65426,
"low": 64675.22,
"open": 64908.71,
"time": 1786233600,
"time_iso": "2026-08-09T00:00:00Z",
"volume": 3044.21136585
},
{
"close": 63911.88,
"high": 65341.83,
"low": 63733.03,
"open": 64848.68,
"time": 1786320000,
"time_iso": "2026-08-10T00:00:00Z",
"volume": 6197.02944527
},
{
"close": 63531.75,
"high": 64439.38,
"low": 63158,
"open": 63911.88,
"time": 1786406400,
"time_iso": "2026-08-11T00:00:00Z",
"volume": 6020.29333133
},
{
"close": 63411.72,
"high": 64416.3,
"low": 63235.88,
"open": 63531.75,
"time": 1786492800,
"time_iso": "2026-08-12T00:00:00Z",
"volume": 6570.08215862
},
{
"close": 63425.35,
"high": 63949.9,
"low": 62772.84,
"open": 63411.71,
"time": 1786579200,
"time_iso": "2026-08-13T00:00:00Z",
"volume": 5119.66743787
},
{
"close": 62975.19,
"high": 63561.45,
"low": 62468.21,
"open": 63425.35,
"time": 1786665600,
"time_iso": "2026-08-14T00:00:00Z",
"volume": 5116.86738135
},
{
"close": 63018.75,
"high": 63123.68,
"low": 62830.01,
"open": 62975.18,
"time": 1786752000,
"time_iso": "2026-08-15T00:00:00Z",
"volume": 1233.57820711
},
{
"close": 62836.66,
"high": 63318.09,
"low": 62631.18,
"open": 63018.75,
"time": 1786838400,
"time_iso": "2026-08-16T00:00:00Z",
"volume": 1794.19400235
},
{
"close": 64484.18,
"high": 64588,
"low": 62679.42,
"open": 62836.67,
"time": 1786924800,
"time_iso": "2026-08-17T00:00:00Z",
"volume": 6069.64648358
},
{
"close": 64681.33,
"high": 65020,
"low": 63979.36,
"open": 64477.26,
"time": 1787011200,
"time_iso": "2026-08-18T00:00:00Z",
"volume": 5099.57954731
},
{
"close": 69300.01,
"high": 70022.44,
"low": 64112.04,
"open": 64681.33,
"time": 1787097600,
"time_iso": "2026-08-19T00:00:00Z",
"volume": 16917.83327784
},
{
"close": 73011.87,
"high": 73391.43,
"low": 68853.22,
"open": 69300.01,
"time": 1787184000,
"time_iso": "2026-08-20T00:00:00Z",
"volume": 16155.04322781
},
{
"close": 78325.54,
"high": 79500,
"low": 73004.7,
"open": 73010.86,
"time": 1787270400,
"time_iso": "2026-08-21T00:00:00Z",
"volume": 20245.16913846
},
{
"close": 77054.44,
"high": 78828.37,
"low": 76471.7,
"open": 78325.54,
"time": 1787356800,
"time_iso": "2026-08-22T00:00:00Z",
"volume": 5400.20084011
}
],
"count": 30,
"end": "2026-08-22T00:00:00Z",
"expected_buckets": 30,
"granularity": 86400,
"next_start": null,
"observed_at_ms": 1790268751183,
"product_id": "BTC-USD",
"request_count": 1,
"source_url": "https://api.exchange.coinbase.com/products/BTC-USD/candles?granularity=86400&start=2026-07-24T00%3A00%3A00Z&end=2026-08-22T00%3A00%3A00Z",
"start": "2026-07-24T00:00:00Z"
}Get candles
Backtests and price history, e.g. 1-minute BTC-USD candles between two dates: call with granularity: 60, start, end, max_candles: 3000, then follow next_start until it is null.
curl --request POST \
--url https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/get-candles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "BTC-USD"
}
'import requests
url = "https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/get-candles"
payload = { "product_id": "BTC-USD" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({product_id: 'BTC-USD'})
};
fetch('https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/get-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.aisa.one/apis/v1/api-exchange-coinbase-com/markets/get-candles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'product_id' => 'BTC-USD'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/get-candles"
payload := strings.NewReader("{\n \"product_id\": \"BTC-USD\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/get-candles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": \"BTC-USD\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/get-candles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_id\": \"BTC-USD\"\n}"
response = http.request(request)
puts response.read_body{
"candles": [
{
"close": 64083.32,
"high": 65762.78,
"low": 63641,
"open": 65051.24,
"time": 1784851200,
"time_iso": "2026-07-24T00:00:00Z",
"volume": 7327.49813634
},
{
"close": 64295.61,
"high": 64387.43,
"low": 63732,
"open": 64083.31,
"time": 1784937600,
"time_iso": "2026-07-25T00:00:00Z",
"volume": 2180.46852205
},
{
"close": 65341.07,
"high": 65511.36,
"low": 64229.6,
"open": 64295.61,
"time": 1785024000,
"time_iso": "2026-07-26T00:00:00Z",
"volume": 2390.56790196
},
{
"close": 63694.43,
"high": 65705.08,
"low": 63545,
"open": 65341.07,
"time": 1785110400,
"time_iso": "2026-07-27T00:00:00Z",
"volume": 5069.45269918
},
{
"close": 63847.12,
"high": 64041.02,
"low": 62645.39,
"open": 63693.44,
"time": 1785196800,
"time_iso": "2026-07-28T00:00:00Z",
"volume": 6232.18054403
},
{
"close": 63896.14,
"high": 64665.3,
"low": 63194.45,
"open": 63847.12,
"time": 1785283200,
"time_iso": "2026-07-29T00:00:00Z",
"volume": 8092.70552294
},
{
"close": 64721.9,
"high": 65118.08,
"low": 63502.91,
"open": 63896.14,
"time": 1785369600,
"time_iso": "2026-07-30T00:00:00Z",
"volume": 8025.87127027
},
{
"close": 62825.9,
"high": 65360,
"low": 62358.96,
"open": 64721.9,
"time": 1785456000,
"time_iso": "2026-07-31T00:00:00Z",
"volume": 8260.37090197
},
{
"close": 62764.2,
"high": 63093,
"low": 62209.81,
"open": 62826.69,
"time": 1785542400,
"time_iso": "2026-08-01T00:00:00Z",
"volume": 3060.55404241
},
{
"close": 63499.49,
"high": 63730.49,
"low": 62743.87,
"open": 62764.2,
"time": 1785628800,
"time_iso": "2026-08-02T00:00:00Z",
"volume": 3283.94724012
},
{
"close": 63466.51,
"high": 64032.43,
"low": 62210.14,
"open": 63499.49,
"time": 1785715200,
"time_iso": "2026-08-03T00:00:00Z",
"volume": 7086.70328594
},
{
"close": 64050.51,
"high": 64497.24,
"low": 63250,
"open": 63466.51,
"time": 1785801600,
"time_iso": "2026-08-04T00:00:00Z",
"volume": 6227.77436334
},
{
"close": 64603.03,
"high": 64988.78,
"low": 63814.8,
"open": 64050.51,
"time": 1785888000,
"time_iso": "2026-08-05T00:00:00Z",
"volume": 6932.34404967
},
{
"close": 64267.3,
"high": 64944.16,
"low": 64087.41,
"open": 64603.02,
"time": 1785974400,
"time_iso": "2026-08-06T00:00:00Z",
"volume": 4520.43206155
},
{
"close": 64891.61,
"high": 65348.97,
"low": 64099.35,
"open": 64267.3,
"time": 1786060800,
"time_iso": "2026-08-07T00:00:00Z",
"volume": 6181.48293213
},
{
"close": 64908.72,
"high": 65150.16,
"low": 64789.89,
"open": 64891.6,
"time": 1786147200,
"time_iso": "2026-08-08T00:00:00Z",
"volume": 2494.26436439
},
{
"close": 64848.69,
"high": 65426,
"low": 64675.22,
"open": 64908.71,
"time": 1786233600,
"time_iso": "2026-08-09T00:00:00Z",
"volume": 3044.21136585
},
{
"close": 63911.88,
"high": 65341.83,
"low": 63733.03,
"open": 64848.68,
"time": 1786320000,
"time_iso": "2026-08-10T00:00:00Z",
"volume": 6197.02944527
},
{
"close": 63531.75,
"high": 64439.38,
"low": 63158,
"open": 63911.88,
"time": 1786406400,
"time_iso": "2026-08-11T00:00:00Z",
"volume": 6020.29333133
},
{
"close": 63411.72,
"high": 64416.3,
"low": 63235.88,
"open": 63531.75,
"time": 1786492800,
"time_iso": "2026-08-12T00:00:00Z",
"volume": 6570.08215862
},
{
"close": 63425.35,
"high": 63949.9,
"low": 62772.84,
"open": 63411.71,
"time": 1786579200,
"time_iso": "2026-08-13T00:00:00Z",
"volume": 5119.66743787
},
{
"close": 62975.19,
"high": 63561.45,
"low": 62468.21,
"open": 63425.35,
"time": 1786665600,
"time_iso": "2026-08-14T00:00:00Z",
"volume": 5116.86738135
},
{
"close": 63018.75,
"high": 63123.68,
"low": 62830.01,
"open": 62975.18,
"time": 1786752000,
"time_iso": "2026-08-15T00:00:00Z",
"volume": 1233.57820711
},
{
"close": 62836.66,
"high": 63318.09,
"low": 62631.18,
"open": 63018.75,
"time": 1786838400,
"time_iso": "2026-08-16T00:00:00Z",
"volume": 1794.19400235
},
{
"close": 64484.18,
"high": 64588,
"low": 62679.42,
"open": 62836.67,
"time": 1786924800,
"time_iso": "2026-08-17T00:00:00Z",
"volume": 6069.64648358
},
{
"close": 64681.33,
"high": 65020,
"low": 63979.36,
"open": 64477.26,
"time": 1787011200,
"time_iso": "2026-08-18T00:00:00Z",
"volume": 5099.57954731
},
{
"close": 69300.01,
"high": 70022.44,
"low": 64112.04,
"open": 64681.33,
"time": 1787097600,
"time_iso": "2026-08-19T00:00:00Z",
"volume": 16917.83327784
},
{
"close": 73011.87,
"high": 73391.43,
"low": 68853.22,
"open": 69300.01,
"time": 1787184000,
"time_iso": "2026-08-20T00:00:00Z",
"volume": 16155.04322781
},
{
"close": 78325.54,
"high": 79500,
"low": 73004.7,
"open": 73010.86,
"time": 1787270400,
"time_iso": "2026-08-21T00:00:00Z",
"volume": 20245.16913846
},
{
"close": 77054.44,
"high": 78828.37,
"low": 76471.7,
"open": 78325.54,
"time": 1787356800,
"time_iso": "2026-08-22T00:00:00Z",
"volume": 5400.20084011
}
],
"count": 30,
"end": "2026-08-22T00:00:00Z",
"expected_buckets": 30,
"granularity": 86400,
"next_start": null,
"observed_at_ms": 1790268751183,
"product_id": "BTC-USD",
"request_count": 1,
"source_url": "https://api.exchange.coinbase.com/products/BTC-USD/candles?granularity=86400&start=2026-07-24T00%3A00%3A00Z&end=2026-08-22T00%3A00%3A00Z",
"start": "2026-07-24T00:00:00Z"
}Request contract
- Method and path: POST /apis/v1/api-exchange-coinbase-com/markets/get-candles
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/get-candles
{
"operationId": "api-exchange-coinbase-com.markets.get-candles",
"method": "POST",
"path": "/apis/v1/api-exchange-coinbase-com/markets/get-candles",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"provider": {
"summary": "Official provider example; checked against AIsa request constraints",
"value": {
"end": "2026-08-22",
"granularity": 86400,
"product_id": "BTC-USD",
"start": "2026-07-24"
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"end": {
"description": "Inclusive range end, same forms as `start`. Defaults to now.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"granularity": {
"default": 60,
"description": "Bucket length in seconds: 60, 300, 900, 3600, 21600 or 86400.\n\nProvider reference: allowed values [\"60\", \"300\", \"900\", \"3600\", \"21600\", \"86400\"]; default 60.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"oneOf": [
"60",
"300",
"900",
"3600",
"21600",
"86400"
]
}
},
"max_candles": {
"default": 300,
"description": "Upper bound on buckets fetched in this call (300 per upstream request; requests are made sequentially to respect the 10 req/s public limit).\n\nProvider reference: minimum 1; maximum 3000; default 300.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 3000,
"min": 1
}
},
"product_id": {
"description": "Trading pair id `BASE-QUOTE` as listed by `list_products`, e.g. `BTC-USD`, `USELESS-USD`. Case-insensitive; the canonical upper-case id is returned. Pattern: ^[A-Za-z0-9]{1,20}-[A-Za-z0-9]{1,20}$.",
"type": "string"
},
"start": {
"description": "Inclusive range start: RFC 3339 (`2026-07-24T00:00:00Z`) or a date (`2026-07-24`, midnight UTC). Defaults to `end` minus `max_candles` buckets.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
}
},
"required": [
"product_id"
],
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Usage-based pricing. Default request estimate: $0.0005 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.Authorizations
Body
Response
Historical OHLCV candles for one trading pair (GET /products/{product_id}/candles) at 1m, 5m, 15m, 1h, 6h or 1d granularity, oldest first. The exchange serves at most 300 buckets per request, so a wider start..end range is walked in consecutive 300-bucket windows, up to max_candles (default 300, max 3000 = 10 upstream requests) per call; next_start continues where the call stopped. Buckets without trades are omitted by the exchange (thin markets return fewer rows than the window length; a sparse_buckets warning says so). Values are numbers as the exchange sends them.
The response contains the tool result directly.
The provider identifies candles as the primary payload key.
| Documented field | Provider type | Description |
|---|---|---|
close | number | |
high | number | |
low | number | |
open | number | |
time | number | Bucket start, Unix seconds, aligned to the granularity. |
time_iso | string | Bucket start, RFC 3339 UTC (derived from time). |
volume | number | Base-currency volume traded in the bucket. |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.