Skip to main content
Glama

TokenBel Financial Data

trading_stats_get

Read-onlyIdempotent

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

TableJSON Schema
NameRequiredDescriptionDefault
uuidYesTokenBel 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_toNoRange end date YYYY-MM-DD (inclusive, >= date_from). Provide both date_from and date_to for range mode; ranges ending today bypass cache.
date_fromNoRange start date YYYY-MM-DD (inclusive). Provide both date_from and date_to for range mode; omit both for latest_30d mode.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
uuidYesTokenBel 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.
periodYes
tickerYes
price_maxYes
price_minYes
yield_maxYes
yield_minYes
price_wavgYes
yield_wavgYes
daily_seriesYes
trading_daysYes
security_kindYes
last_trade_dateYes
turnover_amountYes
price_latest_dateYes
price_wavg_latestYes
yield_latest_dateYes
yield_wavg_latestYes
transactions_countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed38 schema fields changed
    • removedOutput schema / properties / daily_series / items / properties / price_max / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / daily_series / items / properties / price_max / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / daily_series / items / properties / price_min / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / daily_series / items / properties / price_min / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / daily_series / items / properties / price_wavg / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / daily_series / items / properties / price_wavg / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / daily_series / items / properties / yield_max / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / daily_series / items / properties / yield_max / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / daily_series / items / properties / yield_min / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / daily_series / items / properties / yield_min / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / last_trade_date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / last_trade_date / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / price_latest_date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / price_latest_date / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / price_max / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / price_max / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / price_min / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / price_min / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / price_wavg / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / price_wavg / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / price_wavg_latest / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / price_wavg_latest / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / ticker / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ticker / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / transactions_count / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / transactions_count / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / turnover_amount / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / turnover_amount / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / yield_latest_date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / yield_latest_date / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / yield_max / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / yield_max / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / yield_min / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / yield_min / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / yield_wavg / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / yield_wavg / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / yield_wavg_latest / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / yield_wavg_latest / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed2 schema fields changed
    • changedInput schema / properties / uuid / description
      Previous value: -"Listed share or bond UUID (8-36 hex characters), usually discovered via search_by_ticker"New value: +"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."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "daily_series": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "price_max": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "price_min": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "price_wavg": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "trade_date": {
      +            "type": "string"
      +          },
      +          "transactions_count": {
      +            "type": "number"
      +          },
      +          "turnover_amount": {
      +            "type": "string"
      +          },
      +          "yield_max": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "yield_min": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          }
      +        },
      +        "required": [
      +          "trade_date",
      +          "price_min",
      +          "price_max",
      +          "price_wavg",
      +          "turnover_amount",
      +          "transactions_count",
      +          "yield_min",
      +          "yield_max"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "last_trade_date": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "mode": {
      +      "enum": [
      +        "latest_30d",
      +        "range"
      +      ],
      +      "type": "string"
      +    },
      +    "period": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "date_from": {
      +          "type": "string"
      +        },
      +        "date_to": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "date_from",
      +        "date_to"
      +      ],
      +      "type": "object"
      +    },
      +    "price_latest_date": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "price_max": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "price_min": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "price_wavg": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "price_wavg_latest": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "security_kind": {
      +      "enum": [
      +        "share",
      +        "bond"
      +      ],
      +      "type": "string"
      +    },
      +    "ticker": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "trading_days": {
      +      "type": "number"
      +    },
      +    "transactions_count": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "turnover_amount": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "uuid": {
      +      "description": "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.",
      +      "type": "string"
      +    },
      +    "yield_latest_date": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "yield_max": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "yield_min": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "yield_wavg": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "yield_wavg_latest": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "required": [
      +    "uuid",
      +    "security_kind",
      +    "ticker",
      +    "mode",
      +    "period",
      +    "last_trade_date",
      +    "trading_days",
      +    "turnover_amount",
      +    "transactions_count",
      +    "price_wavg",
      +    "price_min",
      +    "price_max",
      +    "price_wavg_latest",
      +    "price_latest_date",
      +    "yield_min",
      +    "yield_max",
      +    "yield_wavg",
      +    "yield_wavg_latest",
      +    "yield_latest_date",
      +    "daily_series"
      +  ],
      +  "type": "object"
      +}
  3. Added

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint and idempotentHint, but the description goes well beyond them: it discloses which fields are null in range mode (yield_wavg, *_latest), that ranges ending today bypass cache, that range mode aggregates raw history live, and that daily_series is bucketed per trade_date with no range-level rollup. This is substantial behavioral context; only pagination/volume limits on large ranges are left unstated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then usage, then mode semantics in one dense paragraph. Every clause carries distinct information (modes, null-field behavior, bucketing) with no filler, though the single unbroken block is heavier than an agent-optimized bulleted structure would be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite an output schema existing, the description still previews the key return shapes (latest price/yield, yield_wavg, yield_min/max, daily_series fields) that differ by mode — exactly the case where the schema alone would not tell an agent which mode to pick. Nothing needed to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% so the baseline is 3, but the description adds real meaning beyond the schema: date_from/date_to are mutually required as a pair ('omit both or provide both'), YYYY-MM-DD is inclusive, and the date format drives which mode executes. It does not restate the uuid definition, which the schema already covers well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get trading statistics for a BCSE exchange-listed share or bond') plus the exact key field ('uuid'). It clearly separates this tool from sibling token_trading_stats_get (tokens) and the share/bond getters, so the agent can route without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells the agent to call search_by_ticker first to discover the identifier, and gives concrete mode-selection rules: latest_30d when no dates are supplied, range only with both bounds, and one bound is rejected. The when-to-use logic is fully specified rather than implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources