query_cross_section
Rank the whole market on ONE completed day: pick columns, an order_by field and top_n. Answers 'top markets by funding / open interest / returns on the latest day' and 'what percentile is BTC on open interest'. day defaults to the last complete day; scope defaults to crypto (HIP-3 markets track an underlying that closes, so their flow is not comparable); stat=percentile|zscore ranks within your visible markets; window_days recomputes the trailing-window fields; min_usd_volume_7d_avg keeps dust out of the ranking. Field names come from list_fields — never guess them, they are snake_case compound names; for a cut ('top decile by X') use screen_universe.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| day | No | The day to rank, `YYYY-MM-DD`, or `latest` (the default: the most recent complete day). | |
| 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..50. Defaults to 20. | |
| columns | No | Fields to return per market, from `list_fields`. `coin` is always included. Defaults to price, traded notional and the day's return. | |
| order_by | No | The field to rank by. Need not appear in `columns`. Defaults to the day'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 window is below this value, so dust cannot top a ranking. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| stat | Yes | The ranking treatment actually applied: `raw`, `percentile` or `zscore`. | |
| as_of | Yes | The UTC day the answer describes. | |
| notes | Yes | ||
| scope | Yes | The market population the ranking ran over. | |
| source | Yes | `tessera_daily` — the answer is from completed days, not the live market. | |
| row_count | Yes | How many markets are in `rows`. | |
| truncated | Yes | True when `ranked_count` exceeds `row_count`. | |
| coin_count | Yes | The number of markets in your visible slice on that day — the denominator every statistic and floor below is measured against. | |
| ranked_count | Yes | How many markets had a value for the ranked field and passed the floor. |