> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meridiandata.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom bars overview

> Activity-based BTCUSDT bars constructed continuously from Binance Futures aggTrades.

Time bars force every interval to have the same duration even when market activity changes. Meridian custom bars close when a measurable activity threshold is reached instead.

## Available families

| Bar type  | Closes when                                                             |
| --------- | ----------------------------------------------------------------------- |
| Dollar    | Cumulative `price × quantity` reaches a quote-value threshold           |
| Volume    | Cumulative base-asset quantity reaches a volume threshold               |
| Tick      | A configured number of Binance aggTrade records has arrived             |
| Imbalance | Absolute cumulative signed tick direction reaches an adaptive threshold |

## Current scope

```text theme={null}
Exchange: binance-futures
Product: BTCUSDT
Source: Binance Futures aggTrades
Algorithm: meridian_custom_bars_v2_continuous
```

Historical archives and the real-time tail use the same stateful bar processors. State checkpoints preserve incomplete bars and algorithm state across file, process, and day boundaries.

## Why continuity matters

Restarting a bar at midnight or at every ZIP boundary changes the dataset. Meridian carries pending trades, cumulative thresholds, sequence numbers, and imbalance state forward so the historical and live series remain one continuous computation.

## Query sequence

1. Call `custom_bars_catalog` to discover available types, thresholds, and ranges.
2. Select an exact `threshold` or `threshold_key`.
3. Call `custom_bars` with an explicit exchange, product, start, end, and limit.
4. Retain coverage and provenance with the rows.

<Note>
  Binance aggTrades consolidate executions under Binance's aggregation rules. A Meridian tick bar counts aggTrade records, not an independently reconstructed count of every underlying matching-engine fill.
</Note>

<Warning>
  Custom bars are research data. Meridian does not attach trading signals, expected returns, order instructions, or strategy decisions to them.
</Warning>
