trading_stats_get
Get trading statistics for a BCSE exchange-listed share or bond by TokenBel internal identifier (field name: uuid). Use search_by_ticker first. Modes: latest_30d (default, no dates) reads the refreshed 30-day materialized view and includes latest price/yield plus yield_wavg; range (both date_from and date_to, YYYY-MM-DD, inclusive) aggregates raw trade history live and returns yield_min/yield_max only — yield_wavg and all *_latest fields are null in range mode. Omit both dates or provide both; one bound is rejected. Both modes also return daily_series: one point per trade_date (same-day buckets collapsed across market_type/trade_mode/payment_code) with per-day turnover, transactions, price_wavg/min/max, and yield_min/max — no range-level rollup.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | TokenBel internal identifier: opaque hexadecimal string, usually 8 characters such as "78c7e502"; despite uuid field/tool names, it is not an RFC UUID and normally has no hyphens. Listed share or bond id, usually discovered via search_by_ticker. | |
| date_to | No | Range end date YYYY-MM-DD (inclusive, >= date_from). Provide both date_from and date_to for range mode; ranges ending today bypass cache. | |
| date_from | No | Range start date YYYY-MM-DD (inclusive). Provide both date_from and date_to for range mode; omit both for latest_30d mode. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| uuid | Yes | TokenBel internal identifier: opaque hexadecimal string, usually 8 characters such as "78c7e502"; despite uuid field names, it is not an RFC UUID and normally has no hyphens. | |
| period | Yes | ||
| ticker | Yes | ||
| price_max | Yes | ||
| price_min | Yes | ||
| yield_max | Yes | ||
| yield_min | Yes | ||
| price_wavg | Yes | ||
| yield_wavg | Yes | ||
| daily_series | Yes | ||
| trading_days | Yes | ||
| security_kind | Yes | ||
| last_trade_date | Yes | ||
| turnover_amount | Yes | ||
| price_latest_date | Yes | ||
| price_wavg_latest | Yes | ||
| yield_latest_date | Yes | ||
| yield_wavg_latest | Yes | ||
| transactions_count | Yes |