Batch Get Market Candlesticks
curl --request GET \
--url https://external-api.kalshi.com/trade-api/v2/markets/candlesticksimport requests
url = "https://external-api.kalshi.com/trade-api/v2/markets/candlesticks"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://external-api.kalshi.com/trade-api/v2/markets/candlesticks', 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://external-api.kalshi.com/trade-api/v2/markets/candlesticks",
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://external-api.kalshi.com/trade-api/v2/markets/candlesticks"
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://external-api.kalshi.com/trade-api/v2/markets/candlesticks")
.asString();require 'uri'
require 'net/http'
url = URI("https://external-api.kalshi.com/trade-api/v2/markets/candlesticks")
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{
"markets": [
{
"market_ticker": "<string>",
"candlesticks": [
{
"end_period_ts": 123,
"yes_bid": {
"open_dollars": "0.5600",
"low_dollars": "0.5600",
"high_dollars": "0.5600",
"close_dollars": "0.5600"
},
"yes_ask": {
"open_dollars": "0.5600",
"low_dollars": "0.5600",
"high_dollars": "0.5600",
"close_dollars": "0.5600"
},
"price": {
"open_dollars": "0.5600",
"low_dollars": "0.5600",
"high_dollars": "0.5600",
"close_dollars": "0.5600",
"mean_dollars": "0.5600",
"previous_dollars": "0.5600",
"min_dollars": "0.5600",
"max_dollars": "0.5600"
},
"volume_fp": "10.00",
"open_interest_fp": "10.00"
}
]
}
]
}market
Batch Get Market Candlesticks
Endpoint for retrieving candlestick data for multiple markets.
- Accepts up to 100 market tickers per request
- Returns up to 10,000 candlesticks total across all markets
- Returns candlesticks grouped by market_id
- Optionally includes a synthetic initial candlestick for price continuity (see
include_latest_before_startparameter)
GET
/
markets
/
candlesticks
Batch Get Market Candlesticks
curl --request GET \
--url https://external-api.kalshi.com/trade-api/v2/markets/candlesticksimport requests
url = "https://external-api.kalshi.com/trade-api/v2/markets/candlesticks"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://external-api.kalshi.com/trade-api/v2/markets/candlesticks', 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://external-api.kalshi.com/trade-api/v2/markets/candlesticks",
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://external-api.kalshi.com/trade-api/v2/markets/candlesticks"
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://external-api.kalshi.com/trade-api/v2/markets/candlesticks")
.asString();require 'uri'
require 'net/http'
url = URI("https://external-api.kalshi.com/trade-api/v2/markets/candlesticks")
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{
"markets": [
{
"market_ticker": "<string>",
"candlesticks": [
{
"end_period_ts": 123,
"yes_bid": {
"open_dollars": "0.5600",
"low_dollars": "0.5600",
"high_dollars": "0.5600",
"close_dollars": "0.5600"
},
"yes_ask": {
"open_dollars": "0.5600",
"low_dollars": "0.5600",
"high_dollars": "0.5600",
"close_dollars": "0.5600"
},
"price": {
"open_dollars": "0.5600",
"low_dollars": "0.5600",
"high_dollars": "0.5600",
"close_dollars": "0.5600",
"mean_dollars": "0.5600",
"previous_dollars": "0.5600",
"min_dollars": "0.5600",
"max_dollars": "0.5600"
},
"volume_fp": "10.00",
"open_interest_fp": "10.00"
}
]
}
]
}Query Parameters
Comma-separated list of market tickers (maximum 100)
Start timestamp in Unix seconds
End timestamp in Unix seconds
Candlestick period interval in minutes
Required range:
x >= 1If true, prepends the latest candlestick available before the start_ts. This synthetic candlestick is created by:
- Finding the most recent real candlestick before start_ts
- Projecting it forward to the first period boundary (calculated as the next period interval after start_ts)
- Setting all OHLC prices to null, and
previous_priceto the close price from the real candlestick
Response
Market candlesticks retrieved successfully
Array of market candlestick data, one entry per requested market.
Show child attributes
Show child attributes