Trade statistics by group
ime_trade_statsRank producers, commodities, brokers, or halls by traded value over a date range and see each one's market share.
Instructions
Rank producers, commodities, brokers or halls by traded value over a date range, with each one's market share.
Use it for "which producers sold the most steel this month" or "which brokers were most active". Dates default
to today (Tehran); at most 45 days; filters as in ime_trades. Value is thousand Rial. volume is given only when
all trades of the group share one unit. For single trades use ime_trades; for one product's prices over time
ime_price_history.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cat | No | Category id from ime_categories (0 = all). | |
| limit | No | Max groups to return (1-50). | |
| market | No | physical (main physical market halls), subsidiary (بازار فرعی, secondary market), export (Kish export hall) or premium (پریمیوم contracts; no producer filter). | physical |
| search | No | Keep trades whose commodity, symbol or producer contains this text. | |
| date_to | No | Persian date 1405/08/09 or Gregorian 2026-10-31 (Persian digits are fine). | |
| sub_cat | No | Category id from ime_categories (0 = all). | |
| group_by | Yes | Rank trades by producer, commodity, buyer broker, hall or contract type. | |
| main_cat | No | Category id from ime_categories (0 = all). | |
| producer | No | Category id from ime_categories (0 = all). | |
| date_from | No | Persian date 1405/08/09 or Gregorian 2026-10-31 (Persian digits are fine). |