# Daily statistics per symbol (ranking and spot range)

`GET https://api.skylit.ai/v1/stats/daily`

API: Heatseeker. Credits: 5.

Per symbol and US trading session (ET): board spot open/high/low/close,
the smallest and largest single cell of the session, and the mean and
maximum over the session's frames of `max(|smallest cell|, |largest cell|)`
(a measure of how concentrated the exposure is, useful for ranking a
universe). Computed from 1-minute history, so every frame is one minute
apart (`frames` counts them). Weight `peakAbsMean` by `frames` to
average across days.

**Sessions.** `date` is the ET session date. By default a row covers
the regular session, 09:30-16:00 ET (frames stamped 09:30 up to
15:59); `extended=true` covers 04:00-20:00 ET instead, including
pre- and post-market. Weekends and NYSE market holidays have no
session and no row, including for indices whose heatmap updates
around the clock (SPX, SPXW, NDX, VIX). On early-close days the
session simply has fewer frames. `firstAt`/`lastAt` are UTC
timestamps. Today's row has `complete: false` until 30 minutes after
the session ends, and changes as the session goes on.

Up to 50 symbols, 31 calendar days and 400 symbol-sessions (symbols x
trading days) per call. Sessions with no data are omitted; a symbol
with none is omitted. Served from the historical file store; finished
sessions are cached, so repeat and overlapping calls are fast.
**Cost:** 5 credits per call.

## Authentication

Send your Skylit API key as a bearer token: `Authorization: Bearer <key>`. No other header is accepted.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `symbols` | query | string | yes | Comma-separated tickers (up to 50). |
| `from` | query | string (date) | yes | First session date (`YYYY-MM-DD`, ET), not before 2023-03-28. |
| `to` | query | string (date) | no | Last session date (`YYYY-MM-DD`, ET), inclusive. Default today (ET); at most 31 calendar days after `from`. |
| `extended` | query | boolean | no | Cover the extended session (04:00-20:00 ET) instead of the regular session (09:30-16:00 ET). (default `false`) |
| `metric` | query | string | no | Which Greek exposure to return per strike. (one of `gamma`, `vanna`; default `gamma`) |

## Example request

```bash
curl "https://api.skylit.ai/v1/stats/daily?symbols=SPY,QQQ,NVDA&from=<from>" \
  -H "Authorization: Bearer $SKYLIT_API_KEY"
```

## Responses

### 200

Daily statistics.

Shape (placeholder values):

```json
{
  "data": {
    "from": "string",
    "to": "string",
    "symbols": [
      {
        "symbol": "string",
        "days": [
          {
            "date": "string",
            "frames": 0,
            "complete": false,
            "firstAt": "string",
            "lastAt": "string",
            "spotOpen": 0,
            "spotHigh": 0,
            "spotLow": 0,
            "spotClose": 0,
            "minValue": 0,
            "maxValue": 0,
            "peakAbsMean": 0,
            "peakAbsMax": 0
          }
        ]
      }
    ]
  },
  "meta": {
    "metric": "gamma",
    "resolution": "1s",
    "mode": "live",
    "cached": false,
    "delayed": false,
    "delayMinutes": 0,
    "attribution": {
      "text": "Powered by Skylit",
      "url": "string",
      "required": false,
      "license": "personal",
      "shareable": false,
      "shareClass": "derived",
      "terms": "string"
    }
  }
}
```

### 400

Request validation failed.

### 401

Missing API key (`unauthorized`), sent by the gateway.

### 402

Out of credits (`insufficient_credits`).

### 403

Unknown, revoked or expired key (`forbidden`, from the gateway), or an
admin-suspended account (`account_suspended`).

### 404

Unknown symbol, no data available, or none of the requested
`expirations` exist for the symbol (`code: expiration_not_found`).

### 429

Per-minute rate limit exceeded.

Headers: `Retry-After`.

### 503

Heatmap data is temporarily unavailable.

### 504

The request did not finish in time (`gateway_timeout`). Refunded;
retry, or narrow the request.
