Skip to main content
GET
/
api
/
v1
/
stats
/
time_series
Query time series
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": [
    {
      "period": "2025-01-01",
      "amount": 14550.35,
      "line_count": 342
    },
    {
      "period": "2025-02-01",
      "amount": 18200,
      "line_count": 410
    }
  ],
  "metadata": {
    "wallet_id": "ldgr_xxx",
    "from": "2025-01-01",
    "to": "2025-06-01",
    "group_by": "month",
    "currency": "usd",
    "timezone": "UTC"
  }
}
Requires the company:balance:read permission. See Permissions.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

resource_type
enum<string>
required

The type of resource to query. Currently only wallet is supported.

Available options:
wallet
account_id
string

Query a specific account's wallet instead of the caller's own. Pass a biz_ or user_ tag. The caller must have company:balance:read permission on the target account.

Examples:

"biz_abc123"

"global"

from
string<date>
required

Start date in ISO 8601 format.

Example:

"2025-01-01"

to
string<date>
required

End date in ISO 8601 format.

Example:

"2025-12-31"

group_by
enum<string>
default:month

Time bucket granularity.

Available options:
day,
week,
month
reporting_category
string

Filter to a predefined reporting category. Each category maps to a curated set of line categories. Call /stats/schema?resource_type=wallet to see all reporting categories and which line categories each one includes.

grouping
string[]

Filter to specific groupings. Pass multiple values to include several (e.g. grouping[]=payments&grouping[]=refunds). Call /stats/schema?resource_type=wallet to see all groupings and which line categories belong to each.

line_category
string[]

Filter to specific transaction types. Pass multiple values to include several (e.g. line_category[]=payment_gross&line_category[]=payment_refund). When omitted, all categories are included. Call /stats/schema?resource_type=wallet to see all line categories with descriptions.

currency
string

Filter to only include rows denominated in this currency. When omitted, rows for all currencies are returned and a currency field appears on each row.

Examples:

"usd"

"eur"

"gbp"

convert_currency
string

Convert all amounts to this currency using historical exchange rates, collapsing multi-currency rows into one row per period. Can be combined with currency to first filter then convert.

Examples:

"usd"

"eur"

timezone
string
default:UTC

IANA timezone for period boundaries.

Examples:

"UTC"

"America/New_York"

"Europe/London"

Response

Time-series data with metadata.

data
object[]
metadata
object