Query cross-section
query_cross_sectionRank the whole market on ONE completed interval: pick bar (1d, the default, or 1h for completed hours), columns, an order_by field and top_n. Answers 'top markets by funding / open interest / returns on the latest day or hour' and 'what percentile is BTC on open interest'. day defaults to the last complete interval; scope defaults to crypto (HIP-3 markets track an underlying that closes, so their flow is not comparable); stat=percentile|zscore ranks within your eligible markets; window_days recomputes the trailing-window fields; min_usd_volume_7d_avg (USD/day at either bar) keeps dust out of the ranking and the ranking is computed after it. Field names come from list_fields — never guess them, they are snake_case compound names and each one lists the bars it exists on; for a cut ('top decile by X') use screen_universe.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "query_cross_section"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bar | No | `1d` (the default) for completed UTC days, `1h` for completed UTC hours. An interval, at either grain, is stamped by the instant it **closes** — an hourly `…T09:00:00Z` is the hour that ended at 09:00. | |
| day | No | The day or hour to rank. For `bar: 1d`, `YYYY-MM-DD` or `latest` (the default: the most recent complete day). For `bar: 1h`, a completed hour as `YYYY-MM-DDTHH:00:00Z` — the hour that *ended* at that instant — or `latest`. | |
| stat | No | `raw` (the default), `percentile`, or `zscore`. Percentile and z-score are ranked **within the markets your plan can see**, so they need a slice of at least four markets. | |
| coins | No | Restrict to these markets. A market outside your plan's coverage is ignored rather than widening the answer. | |
| scope | No | `crypto` (the default), `hip3`, or `all`. Restricted markets track an underlying that closes, so their flow is not comparable on a weekend. | |
| top_n | No | How many markets to return, 1..100 (values outside are clamped to the nearest bound and the response says so). Defaults to 20. | |
| columns | No | Fields to return per market, from `list_fields`. `coin` is always included. Defaults to price, traded notional and the interval's return. | |
| order_by | No | The field to rank by. Need not appear in `columns`. Defaults to the interval's traded notional. | |
| descending | No | Rank largest first (the default). Set false for the smallest. | |
| window_days | No | Recompute the trailing-window fields over this many days, 1..365 (default 7). The response always states the window it used. | |
| min_usd_volume_7d_avg | No | Drop markets whose average **daily** traded notional over the trailing window is below this value, in USD/day at either bar — a floor chosen at `1d` means the same thing at `1h` — so dust cannot top a ranking. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bar | Yes | The grain this answer was computed at: `1d` or `1h`. | |
| rows | Yes | ||
| stat | Yes | The ranking treatment actually applied: `raw`, `percentile` or `zscore`. | |
| as_of | Yes | The UTC day (`YYYY-MM-DD`) or completed hour (`YYYY-MM-DDTHH:00:00Z`) the answer describes. An interval is stamped by the instant it closes, so an hourly `…T09:00:00Z` is the hour that ended at 09:00. | |
| notes | Yes | ||
| scope | Yes | The market population the ranking ran over. | |
| source | Yes | `tessera_daily` or `tessera_hourly` — the clock this answer came from, never the live market. | |
| row_count | Yes | How many markets are in `rows`. | |
| truncated | Yes | True when `matched_count` exceeds `row_count`. | |
| published_at | No | When the newest interval in this answer was actually published (written), UTC. Absent at the daily grain, whose coverage comes from the manifest rather than the object's write time. Compare with `bar_age_hours` to see the publication lag. | |
| bar_age_hours | Yes | How many hours ago the newest interval closed. The published hourly source is written ~1.5–2.5 h after its bar, so `bar_age_hours` is the decision lag: the bar is already this old before anyone can trade on it. | |
| matched_count | Yes | Markets that reported the ranked field and passed every filter. This is the count the rows are drawn from. | |
| visible_count | Yes | Markets in your plan's slice with a row on this interval, before any filter you passed. This is the universe the answer is a statement about. | |
| eligible_count | Yes | Markets left after your explicit market filter and any traded-notional floor — the population the percentile, z-score and deciles were computed over. |