Authentication

All API requests require an API key. Pass it via the X-API-Key header or the Authorization: Bearer header.

Scopes

Scope Access
datasets:read Parquet data, trades, prices, volume
secmaster:read Events, markets, pairs, conditions, fees
admin API key management, harman OMS admin

Getting an API Key

API keys are provisioned on request. Contact us via GitHub Issues or email to request access.

Example

curl -H "X-API-Key: $API_KEY" https://api.varshtat.com/v1/secmaster/stats

Secmaster Stats

GET /v1/secmaster/stats

Returns aggregate counts and status breakdowns for events, markets, pairs, and conditions. No parameters required.

Example

curl -H "X-API-Key: $API_KEY" https://api.varshtat.com/v1/secmaster/stats

Response

{
  "events": { "total": 1250, "active": 340, "closed": 910 },
  "markets": { "total": 8500, "active": 1200, "closed": 7300 },
  "pairs": { "total": 45, "active": 42, "halted": 3 },
  "conditions": { "total": 3200, "active": 890, "resolved": 2310 }
}

Kalshi

GET /v1/events

Query Parameters

Parameter Type Required Description
category string No Filter by category
series string No Filter by series ticker
status string No active, closed, or settled
as_of string No ISO date for point-in-time lookup
limit integer No Maximum number of results

Example

curl -H "X-API-Key: $API_KEY" \
  "https://api.varshtat.com/v1/events?status=active&limit=50"

Response

{
  "events": [
    {
      "ticker": "KXBTCD-26FEB28",
      "title": "Bitcoin above $105,249.99 on Feb 28?",
      "category": "Crypto",
      "series": "KXBTCD",
      "status": "active",
      "strikeDate": "2026-02-28T17:00:00Z",
      "marketCount": 12
    }
  ],
  "count": 1
}
GET /v1/markets

Query Parameters

Parameter Type Required Description
category string No Filter by category
series string No Filter by series ticker
status string No active, closed, or settled
event string No Parent event ticker
close_within_hours integer No Markets closing within N hours
closing_before string No ISO datetime upper bound for close time
closing_after string No ISO datetime lower bound for close time
as_of string No ISO date for point-in-time lookup
games_only boolean No Return only game-type markets
limit integer No Maximum number of results

Example

curl -H "X-API-Key: $API_KEY" \
  "https://api.varshtat.com/v1/markets?status=active&close_within_hours=24&limit=100"

Response

{
  "markets": [
    {
      "ticker": "KXBTCD-26FEB28-T105249.99",
      "title": "BTC above $105,249.99?",
      "status": "active",
      "closeTime": "2026-02-28T17:00:00Z",
      "event": "KXBTCD-26FEB28",
      "series": "KXBTCD",
      "volume": 4523,
      "openInterest": 1250
    }
  ],
  "count": 1
}
GET /v1/series

Query Parameters

Parameter Type Required Description
category string No Filter by category
tag string No Filter by tag
games_only boolean No Return only game-type series
limit integer No Maximum number of results

Example

curl -H "X-API-Key: $API_KEY" \
  "https://api.varshtat.com/v1/series?category=crypto&limit=20"

Response

{
  "series": [
    {
      "ticker": "KXBTCD",
      "title": "Bitcoin Daily Close",
      "category": "Crypto",
      "tags": ["crypto", "bitcoin"],
      "frequency": "daily",
      "activeEventCount": 7
    }
  ],
  "count": 1
}

Kraken Futures

GET /v1/pairs

Query Parameters

Parameter Type Required Description
exchange string No Filter by exchange
market_type string No perpetual or fixed_maturity
base string No Base currency (e.g. BTC)
quote string No Quote currency (e.g. USD)
status string No active, halted, or delisted
limit integer No Maximum number of results

Example

curl -H "X-API-Key: $API_KEY" \
  "https://api.varshtat.com/v1/pairs?market_type=perpetual&status=active"

Response

{
  "pairs": [
    {
      "pairId": "PF_XBTUSD",
      "symbol": "PF_XBTUSD",
      "base": "BTC",
      "quote": "USD",
      "marketType": "perpetual",
      "status": "active",
      "tickSize": 0.5,
      "contractSize": 1
    }
  ],
  "count": 1
}
GET /v1/pairs/:pairId/snapshots

Query Parameters

Parameter Type Required Description
from string No Start date in YYYY-MM-DD format
to string No End date in YYYY-MM-DD format
limit integer No Maximum number of results

Example

curl -H "X-API-Key: $API_KEY" \
  "https://api.varshtat.com/v1/pairs/PF_XBTUSD/snapshots?from=2026-02-15&to=2026-02-22"

Response

{
  "snapshots": [
    {
      "pairId": "PF_XBTUSD",
      "timestamp": "2026-02-22T14:00:00Z",
      "bid": 97250.5,
      "ask": 97251.0,
      "last": 97250.75,
      "fundingRate": 0.0001
    }
  ],
  "count": 1
}

Polymarket

GET /v1/conditions

Query Parameters

Parameter Type Required Description
category string No Filter by category
status string No active or resolved
limit integer No Maximum number of results

Example

curl -H "X-API-Key: $API_KEY" \
  "https://api.varshtat.com/v1/conditions?status=active&limit=50"

Response

{
  "conditions": [
    {
      "conditionId": "0x1234...abcd",
      "question": "Will BTC exceed $100k by March 2026?",
      "status": "active",
      "endDate": "2026-03-31T23:59:59Z",
      "tokenCount": 2,
      "category": "Crypto"
    }
  ],
  "count": 1
}
GET /v1/polymarket/tokens

Query Parameters

Parameter Type Required Description
category string Yes Comma-separated list of categories
status string No Default: active
minVolume number No Minimum volume threshold
q string No Keyword search, comma-separated

Example

curl -H "X-API-Key: $API_KEY" \
  "https://api.varshtat.com/v1/polymarket/tokens?category=crypto&minVolume=10000"

Response

{
  "tokens": [
    {
      "tokenId": "0xabcd...1234",
      "conditionId": "0x1234...abcd",
      "outcome": "Yes",
      "price": 0.65,
      "volume": 125000.50,
      "status": "active"
    }
  ],
  "count": 1
}

Fees

GET /v1/fees

Lists current fee schedules for all series.

Query Parameters

Parameter Type Required Description
limit integer No Maximum number of results

Example

curl -H "X-API-Key: $API_KEY" https://api.varshtat.com/v1/fees

Response

{
  "fees": [
    {
      "series": "KXBTCD",
      "takerFee": 0.07,
      "makerFee": 0.0,
      "effectiveDate": "2026-01-01T00:00:00Z"
    }
  ],
  "count": 1
}
GET /v1/fees/:series

Returns the fee schedule for a specific series.

Query Parameters

Parameter Type Required Description
as_of string No ISO date for historical fee lookup

Example

curl -H "X-API-Key: $API_KEY" \
  "https://api.varshtat.com/v1/fees/KXBTCD?as_of=2026-01-15"

Data Endpoints

Historical trade data, price snapshots, event summaries, and volume aggregates are available via the /v1/data/* endpoints. For Parquet file downloads, see the Download Data guide.

GET /v1/data/trades

Returns trade summaries grouped by ticker/instrument. Counts trades, sums volume, and provides price range (min/max/avg).

Query Parameters

Parameter Type Required Description
feed string Yes kalshi, kraken-futures, or polymarket
date string No Date in YYYY-MM-DD format (defaults to today)
limit integer No Maximum tickers to return (default 20)

Example

curl -H "X-API-Key: $API_KEY" \
  "https://api.varshtat.com/v1/data/trades?feed=kalshi&date=2026-02-22&limit=10"
GET /v1/data/prices

Returns the latest price snapshot per instrument from ticker/bid-ask data.

Query Parameters

Parameter Type Required Description
feed string Yes kalshi, kraken-futures, or polymarket
date string No Date in YYYY-MM-DD format (defaults to today)
hour string No Hour in HHMM format (e.g. 1400). Defaults to most recent.

Example

curl -H "X-API-Key: $API_KEY" \
  "https://api.varshtat.com/v1/data/prices?feed=kraken-futures&date=2026-02-22&hour=1400"
GET /v1/data/events

Returns event-level trade summaries, grouping markets by parent event. Includes event name, close time, market count, total volume, and top markets.

Query Parameters

Parameter Type Required Description
feed string Yes kalshi, kraken-futures, or polymarket
date string No Date in YYYY-MM-DD format (defaults to today)
limit integer No Maximum events to return (default 20)

Example

curl -H "X-API-Key: $API_KEY" \
  "https://api.varshtat.com/v1/data/events?feed=polymarket&date=2026-02-22&limit=10"
GET /v1/data/volume

Returns per-feed trade counts, total volume, active ticker count, and top tickers. Volume units differ by feed (contracts for Kalshi, USD for Polymarket, base currency for Kraken).

Query Parameters

Parameter Type Required Description
feed string No Filter to a single feed. Omit to get all feeds.
date string No Date in YYYY-MM-DD format (defaults to today)

Example

curl -H "X-API-Key: $API_KEY" \
  "https://api.varshtat.com/v1/data/volume?date=2026-02-22"
GET /v1/data/freshness

Checks data freshness for feeds. Reports the newest file age and flags feeds that are stale (over 7 hours old).

Query Parameters

Parameter Type Required Description
feed string No Check a specific feed. Omit to check all feeds.

Example

curl -H "X-API-Key: $API_KEY" \
  "https://api.varshtat.com/v1/data/freshness?feed=kalshi"

Monitor Endpoints

Hierarchical market browsing powered by the Redis monitor cache. Drill down from categories to individual markets with live prices. All endpoints require datasets:read scope.

GET /v1/monitor/categories

Returns all market categories with event and series counts.

Example

curl -H "X-API-Key: $API_KEY" \
  "https://api.varshtat.com/v1/monitor/categories"
GET /v1/monitor/series?category=Crypto

Returns series within a category with active event and market counts.

Query Parameters

ParameterTypeRequiredDescription
categorystringYesCategory name (e.g., Crypto, Economics)
GET /v1/monitor/events?series=KXBTCD

Returns events within a series with status, strike date, and market count.

Query Parameters

ParameterTypeRequiredDescription
seriesstringYesSeries ticker (e.g., KXBTCD)
GET /v1/monitor/markets?event=KXBTCD-26FEB28

Returns markets within an event with live bid/ask/last prices, volume, and open interest from snap data.

Query Parameters

ParameterTypeRequiredDescription
eventstringYesEvent ticker (e.g., KXBTCD-26FEB28)

Harman OMS

Order management system endpoints for session monitoring, order tracking, and audit inspection. All endpoints require the admin scope.

GET /v1/harman/sessions

Lists all OMS sessions with risk limits, open notional, order counts, fill totals, and suspension status.

GET /v1/harman/sessions/:id/orders

Query orders for a session. Filter by state, ticker (ILIKE), since (ISO datetime), limit.

GET /v1/harman/sessions/:id/fills

Query fills for a session. Filter by ticker (ILIKE), since (ISO datetime), limit.

GET /v1/harman/orders/:id/timeline

Full order lifecycle timeline. Joins orders, audit log, exchange audit log, fills, and settlements into a unified timeline sorted by timestamp.

GET /v1/harman/sessions/:id/audit

Exchange audit log. Query REST calls, WebSocket events, fallback decisions, and reconciliation actions. Filter by category, action, outcome, since, limit.

GET /v1/harman/sessions/:id/settlements

Query settlements for a session. Returns settlement ID, ticker, result, payout. Filter by ticker, since.

Example

curl -H "X-API-Key: $API_KEY" https://api.varshtat.com/v1/harman/sessions

Error Responses

All error responses return JSON with an error field.

StatusMeaning
400Invalid parameters — check query string values
401Missing or invalid API key
403Insufficient scope, feed restriction, or date range violation
404Resource not found (invalid ticker, pair ID, etc.)
429Rate limit exceeded — retry after X-RateLimit-Reset
503Backend unavailable — upstream service error

Example

{
  "error": "Insufficient scope: requires secmaster:read"
}

Rate Limits

API keys have per-key rate limits. The default tier allows 60 requests per minute. Rate limit headers (X-RateLimit-Remaining, X-RateLimit-Reset) are included in responses.

List endpoints support a limit parameter but no offset or cursor-based pagination. Results are returned in server-defined order.