Aggregate trade volume/pressure metrics for a contract window
Returns aggregated volume and buy-pressure metrics for a (provider, contract_id) over
a trailing window, computed from the same deduplicated trade data as /v1/trades.
Two query shapes depending on provider, because the platform cannot generically infer which side of a market is “Yes”:
- Kalshi:
outcome_0is the side whereoutcomeortoken_id(case-insensitive) equals"yes",outcome_1is"no". - All other providers: volumes are grouped by
token_idand the top 2 tokens by volume are reported asoutcome_0/outcome_1— a volume ranking, not a guaranteed Yes/No mapping.
USD volume is always size * price / 100 (price is cents 0–100 for every provider).
outcome_0_volume_share_pct defaults to 50.0 when both outcome volumes are zero.
coverage_pct measures how much of the requested window is actually backed by data
and is 0 when no trades are found in the window.
Rate-limit cost (LIGHT bucket): flat 1 unit per request.
Caching: responses are cached for 10s per replica (with singleflight coalescing) to
absorb duplicate concurrent requests. Cache-Control: private, max-age=5, no ETag —
this route never returns 304.
curl --request GET \
--url https://md.kairos.trade/v1/trades/metrics \
--header 'X-Api-Key: <api-key>' \
--header 'X-Api-Secret: <api-key>' \
--header 'X-Client-Id: <api-key>'import requests
url = "https://md.kairos.trade/v1/trades/metrics"
headers = {
"X-Client-Id": "<api-key>",
"X-Api-Key": "<api-key>",
"X-Api-Secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Client-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'X-Api-Secret': '<api-key>'
}
};
fetch('https://md.kairos.trade/v1/trades/metrics', 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://md.kairos.trade/v1/trades/metrics",
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-Api-Key: <api-key>",
"X-Api-Secret: <api-key>",
"X-Client-Id: <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://md.kairos.trade/v1/trades/metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("X-Api-Secret", "<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://md.kairos.trade/v1/trades/metrics")
.header("X-Client-Id", "<api-key>")
.header("X-Api-Key", "<api-key>")
.header("X-Api-Secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://md.kairos.trade/v1/trades/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Client-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
request["X-Api-Secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"metrics": {
"volume_usd": 184032.55,
"outcome_0_volume_usd": 121004.1,
"outcome_1_volume_usd": 63028.45,
"outcome_0_volume_share_pct": 65.8,
"trade_count": 5123,
"window_seconds": 3600,
"coverage_pct": 97.2
}
}{
"error": {
"code": "invalid_request",
"message": "window_seconds must be an integer in [3600, 86400]"
}
}{
"error": {
"code": "unauthorized",
"message": "valid X-Client-Id, X-Api-Key, and X-Api-Secret headers are required"
}
}{
"error": {
"code": "ip_not_whitelisted",
"message": "source IP not in credential whitelist"
}
}{
"error": {
"code": "rate_limited",
"message": "rate limit exceeded"
}
}{
"error": {
"code": "invalid_request",
"message": "market_ids exceeds maximum 200"
}
}{
"error": {
"code": "rate_limiter_unavailable",
"message": "rate limiter temporarily unavailable"
}
}Authorizations
Credential client id (kairos_ck_...). Must be sent together with X-Api-Key and X-Api-Secret.
64-char hex API key. Must be sent together with X-Client-Id and X-Api-Secret.
64-char hex API secret. Must be sent together with X-Client-Id and X-Api-Key.
Query Parameters
Venue identifier, case-insensitive. kalshi_offchain aliases kalshi; dome aliases polymarket. Whether provider resolves to Kalshi determines which aggregation query runs — see the operation description.
kalshi, kalshi_offchain, polymarket, dome, opinion, predictfun, hyperliquid Venue-scoped contract/token identifier to compute metrics for.
Trailing window, in seconds, measured back from the current server time. Valid range [3600, 86400]; out-of-range or non-integer values are rejected with 400.
3600 <= x <= 86400Response
Aggregated metrics for the window. Present with all-zero volumes (and coverage_pct: 0) rather than a 404 when no trades exist.
Show child attributes
Show child attributes
Was this page helpful?
curl --request GET \
--url https://md.kairos.trade/v1/trades/metrics \
--header 'X-Api-Key: <api-key>' \
--header 'X-Api-Secret: <api-key>' \
--header 'X-Client-Id: <api-key>'import requests
url = "https://md.kairos.trade/v1/trades/metrics"
headers = {
"X-Client-Id": "<api-key>",
"X-Api-Key": "<api-key>",
"X-Api-Secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Client-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'X-Api-Secret': '<api-key>'
}
};
fetch('https://md.kairos.trade/v1/trades/metrics', 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://md.kairos.trade/v1/trades/metrics",
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-Api-Key: <api-key>",
"X-Api-Secret: <api-key>",
"X-Client-Id: <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://md.kairos.trade/v1/trades/metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("X-Api-Secret", "<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://md.kairos.trade/v1/trades/metrics")
.header("X-Client-Id", "<api-key>")
.header("X-Api-Key", "<api-key>")
.header("X-Api-Secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://md.kairos.trade/v1/trades/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Client-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
request["X-Api-Secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"metrics": {
"volume_usd": 184032.55,
"outcome_0_volume_usd": 121004.1,
"outcome_1_volume_usd": 63028.45,
"outcome_0_volume_share_pct": 65.8,
"trade_count": 5123,
"window_seconds": 3600,
"coverage_pct": 97.2
}
}{
"error": {
"code": "invalid_request",
"message": "window_seconds must be an integer in [3600, 86400]"
}
}{
"error": {
"code": "unauthorized",
"message": "valid X-Client-Id, X-Api-Key, and X-Api-Secret headers are required"
}
}{
"error": {
"code": "ip_not_whitelisted",
"message": "source IP not in credential whitelist"
}
}{
"error": {
"code": "rate_limited",
"message": "rate limit exceeded"
}
}{
"error": {
"code": "invalid_request",
"message": "market_ids exceeds maximum 200"
}
}{
"error": {
"code": "rate_limiter_unavailable",
"message": "rate limiter temporarily unavailable"
}
}
