> ## 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.

# Worked examples

> Understand custom-bar threshold mechanics and query exact stored configurations.

## Dollar-bar mechanics

This small example is illustrative arithmetic, not a Meridian market-data response.

Assume a dollar threshold of `$1,000`:

| Trade | Price | Quantity | Dollar value | Running total |
| ----- | ----: | -------: | -----------: | ------------: |
| 1     |   100 |        2 |          200 |           200 |
| 2     |   101 |        3 |          303 |           503 |
| 3     |   102 |        4 |          408 |           911 |
| 4     |   103 |        1 |          103 |         1,014 |

Trade 4 crosses the threshold, so the completed bar contains all four records and reports `$1,014` of dollar volume. The record is not split to force an exact `$1,000` total.

## Discover a stored threshold

First call `custom_bars_catalog`:

```json theme={null}
{
  "exchange": "binance-futures",
  "product": "BTCUSDT",
  "bar_type": "tick",
  "limit": 100
}
```

Select an entry's exact `threshold_key`, `begin`, and `end`.

## Query the stored bars

```json theme={null}
{
  "exchange": "binance-futures",
  "product": "BTCUSDT",
  "bar_type": "tick",
  "begin": "2026-01-01T00:00:00Z",
  "end": "2026-01-02T00:00:00Z",
  "threshold_key": "THE_KEY_RETURNED_BY_THE_CATALOG",
  "limit": 5,
  "include": {
    "coverage": true,
    "provenance": true,
    "column_metadata": true,
    "source_manifest": false
  }
}
```

## Validate the result

For tick bars, confirm each completed row's `trade_count` equals the configured integer threshold. Also retain `source`, `source_run_id`, `provenance_type`, coverage, and warnings.

If the exact query returns `result_status="no_results"` and `query_complete=true`, the lookup is complete. Ask for alternatives explicitly before removing the threshold or widening the range.
