# cvd_line

> Sent when a CVD line fires: inside one bar of the line's width (15 seconds by default), SPX options printed as calls minus those printed as puts reached the line's value; a volume line (alert.measure total, calls or puts) counts that volume instead.

Source: https://firmtape.com/docs/developers/live/events/cvd_line

Sent when a CVD line fires: inside one bar of the line's width (15 seconds by default), SPX options printed as calls minus those printed as puts reached the line's value; a volume line (`alert.measure` `total`, `calls` or `puts`) counts that volume instead.

`POST your https address` · `X-FirmTape-Event: cvd_line`

Plan LIVE · Payload version 1 · Signed HMAC-SHA256 · Schema cvd_line.schema.json

**This event serves:** [LIVE: Alert lines](https://firmtape.com/docs/live#alert-lines), [LIVE: Webhooks](https://firmtape.com/docs/live#webhooks). **Plan:** [LIVE](https://firmtape.com/features/live). LIVE: today's session every second, alerts, ASK, the levels API and the platform integrations, and 5 LAB credits a month. Every finished session is free in REPLAY. Turn it on: Right-click the CVD band (Layers, Indicators, CVD) and pick Alert at CVD or Alert at volume; a webhook address on Account, Level alerts.

## When it is sent

- At the first second the bar's running calls minus puts (or, for a volume line, its volume) reaches the line, read every 5 seconds from the per-second tape.
- At most once a bar; a repeating line can fire again in a later bar.

## Payload

| Field | Meaning | Unit |
| --- | --- | --- |
| `version` (1) | Payload version, `1`. |  |
| `id` (string) | Event id, `evt_` and 24 hex digits. The same on every try and for every account the event goes to: drop one you have seen. |  |
| `type` ("cvd_line") | `cvd_line`. |  |
| `symbol` (string) | SPX, ES, NQ, RTY or a ticker. |  |
| `level` (object) | `kind` is `cvd`; `value` the line's value, in contracts (or delta-contracts, see `alert.unit`). |  |
| `price` (number \| null) | The price at the event. Null on a `premarket` event (see `phase`). | index points |
| `book` (volume \| measured) | `volume`: the volume book's levels. |  |
| `ts` (string) | When it was found, ISO 8601 in New York time. |  |
| `day` (string) | The ET trading day. |  |
| `levels` (object) | The volume book's levels at the event. |  |
| `levels.flip` (number \| null) | Flip. | index points |
| `levels.call_wall` (number \| null) | Call wall. | index points |
| `levels.put_wall` (number \| null) | Put wall. | index points |
| `levels.put_support` (number \| null) deprecated | The put wall under its first name. Deprecated: read `put_wall`; removed after 2026-11-30. | index points |
| `text` (string) | The sentence Telegram and push show. |  |
| `direction` (above \| below) | `above` for a positive line (calls, or a volume line), `below` for a negative one (puts). |  |
| `threshold_points` (number) | Sized events (`flip_move`, `level_near`): the size the account picked, SPX points. | index points |
| `from` (string) | ES, NQ, RTY: the index whose book moved by the basis gives the levels. |  |
| `basis` (number \| null) | ES, NQ, RTY: the basis at the event. | index points |
| `levels_asof` (string \| null) | Symbols on a five-minute book: when that book was built. |  |
| `phase` (premarket) | Present only when a price line fired before the bell, from 04:00 ET to the open on a trading day: `premarket`. The line was crossed on the premarket's minute prices; `price` is then null, and `levels` are the previous session's closing levels. Absent on every event in the session. |  |
| `alert` (object) | The line that fired: `value`, `win`, `scope` (`z0` 0DTE, `nx` the next expiries, `all`), `unit` (`ct` contracts, `delta` \|delta\|-weighted), `measure` (`net` calls minus puts, `total` calls plus puts, `calls`, `puts`), `mode`. |  |
| `cvd` (object) | The bar that fired it: `run` the calls minus puts (a volume line: its volume) printed in the bar up to the firing second, `window_s` the bar's width, `bar_start` its first second, ET. |  |

## Delivery

- **Answer**: Any 2xx within 3 seconds. Redirects are not followed.
- **Retries**: No answer, a 429 or a 5xx: tried again after 1 s and 4 s, three tries in all, the same id each time.
- **Switched off**: After 10 failed events in a row; the account page shows why. Saving the address switches it on again.
- **Volume**: Up to 30 events a minute per account; past that they are dropped and counted on the account page.
- **Test**: `type: "test"`, from **Send test**
- **Log**: The last delivery (time, status, tries) on the account page.

## Request we send

```
POST https://your.server/firmtape
Content-Type: application/json
User-Agent: FirmTape-Webhooks/1
X-FirmTape-Event: cvd_line
X-FirmTape-Event-Id: evt_9b1e4d2c7a0f3e6b5d8c1a2f
X-FirmTape-Timestamp: 1760034725
X-FirmTape-Signature: sha256=9b1e...
```

## Body

```json
{
  "version": 1,
  "id": "evt_9b1e4d2c7a0f3e6b5d8c1a2f",
  "type": "cvd_line",
  "symbol": "SPX",
  "price": 6748.25,
  "book": "volume",
  "ts": "2026-10-15T15:51:22-04:00",
  "day": "2026-10-15",
  "levels": {
    "flip": 6731.08,
    "call_wall": 6750,
    "put_wall": 6700,
    "put_support": 6700
  },
  "level": {
    "kind": "cvd",
    "value": 2000
  },
  "direction": "above",
  "text": "SPX CVD +2,105 in a 15s bar (line +2,000), your CVD line",
  "cvd": {
    "run": 2105,
    "window_s": 15,
    "bar_start": "15:51:15"
  },
  "alert": {
    "id": "al_1c2d3e4f5a6b",
    "kind": "delta",
    "value": 2000,
    "win": 15,
    "scope": "z0",
    "unit": "ct",
    "measure": "net",
    "mode": "repeat"
  }
}
```

## Verify

```js
const crypto = require("node:crypto");
// rawBody: the request body as received, a Buffer or a string, before any JSON parsing
function verify(rawBody, headers, secret) {
  const t = headers["x-firmtape-timestamp"];
  const got = String(headers["x-firmtape-signature"] || "");
  if (!t || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
  const want = "sha256=" + crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  return got.length === want.length && crypto.timingSafeEqual(Buffer.from(got), Buffer.from(want));
}
```

```python
import hmac, hashlib, time

def verify(raw_body: bytes, headers, secret: str) -> bool:
    t = headers.get("X-FirmTape-Timestamp", "")
    got = headers.get("X-FirmTape-Signature", "")
    if not t or abs(time.time() - int(t)) > 300:
        return False
    want = "sha256=" + hmac.new(secret.encode(), t.encode() + b"." + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(got, want)
```
