List Time Series Metrics
curl --request GET \
--url https://api.whop.com/api/v1/stats/time_series \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.whop.com/api/v1/stats/time_series"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.whop.com/api/v1/stats/time_series', 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.whop.com/api/v1/stats/time_series",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.whop.com/api/v1/stats/time_series"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.whop.com/api/v1/stats/time_series")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/stats/time_series")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"description": "The average wait from a runner claiming and keeping an ad campaign to its first result of the kind it is set to get, by the day it was claimed. Campaigns set to get no result are left out. breakdown_by=result_type splits it by that kind. Campaigns with no result yet are left out, so a recent day's average can still rise. The total is the average over every campaign in the range.",
"key": "ad_xxxxxxxxxxxxxx_average_result_seconds",
"name": "Average seconds to an ad campaign getting a first result",
"properties": [
"runner_ids"
],
"unit": "count",
"breakdowns": [
"result_type"
],
"modes": [
"global"
],
"windows": [
"7d"
]
}
]
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}Time Series
List Time Series Metrics
Lists the metrics you can chart over time, with the unit each reports and the properties you can filter or break it down by. Aggregates that are not bucketed over time are reports, listed at GET /stats/reports.
GET
/
stats
/
time_series
List Time Series Metrics
curl --request GET \
--url https://api.whop.com/api/v1/stats/time_series \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.whop.com/api/v1/stats/time_series"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.whop.com/api/v1/stats/time_series', 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.whop.com/api/v1/stats/time_series",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.whop.com/api/v1/stats/time_series"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.whop.com/api/v1/stats/time_series")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/stats/time_series")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"description": "The average wait from a runner claiming and keeping an ad campaign to its first result of the kind it is set to get, by the day it was claimed. Campaigns set to get no result are left out. breakdown_by=result_type splits it by that kind. Campaigns with no result yet are left out, so a recent day's average can still rise. The total is the average over every campaign in the range.",
"key": "ad_xxxxxxxxxxxxxx_average_result_seconds",
"name": "Average seconds to an ad campaign getting a first result",
"properties": [
"runner_ids"
],
"unit": "count",
"breakdowns": [
"result_type"
],
"modes": [
"global"
],
"windows": [
"7d"
]
}
]
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}Authorizations
An Account API key, an App API key, an account access token, an account-scoped user token, or a user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************. See Auth & API keys for how to get each one.

