Skip to main content
Glama
longbridge

longbridge

Official

Today's Orders

today_orders
Read-onlyIdempotent

Get orders placed today, optionally filtered by symbol or order ID, including take-profit and stop-loss attached legs.

Instructions

Get orders placed today. Returns orders[]{order_id, symbol, side, order_type, status, quantity, price, submitted_at, executed_quantity, executed_price, attached_orders[]}, where attached_orders[] holds the order's take-profit/stop-loss legs. Pass symbol to filter by security, or order_id for one order. To fetch an attached leg by its own ID, pass that ID as order_id together with is_attached=true — the leg itself comes back as the order entry. is_attached does nothing without order_id, and neither has any effect for US accounts, which are served by the US order endpoint. US accounts only: us_action (Buy/Sell), us_page, us_limit filter/paginate via a separate US order endpoint.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
_jqNoOptional jq filter (jaq syntax) applied to this tool's JSON response before it is returned; it never changes the upstream request. One output is returned as-is, several as a JSON array, none as []. Module imports and the `env`/`debug`/`stderr` builtins are unavailable. Example: .data | map({symbol}). Omit for the full response.
symbolNoFilter by symbol, e.g. "700.HK". Omit to return all today's orders.
us_pageNoUS accounts only: page number (default 1). Ignored for AP accounts.
order_idNoFilter by order ID: a parent order ID, or (with is_attached=true) the ID of an attached take-profit / stop-loss leg. Has no effect for US accounts, which are served by the US order endpoint.
us_limitNoUS accounts only: page size (default 20). Ignored for AP accounts.
us_actionNoUS accounts only: filter by side, "Buy" or "Sell". Omit for all. Ignored for AP accounts (the region is inferred from the account — do not pass it).
is_attachedNoOnly meaningful together with order_id: it says that order_id is the ID of an attached take-profit / stop-loss leg, and the response then carries that leg itself as an order entry. On its own it does nothing, and it has no effect for US accounts either.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.12.0
    • addedInput schema / properties / _jq / description
      Added value: +"Optional jq filter (jaq syntax) applied to this tool's JSON response before it is returned; it never changes the upstream request. One output is returned as-is, several as a JSON array, none as []. Module imports and the `env`/`debug`/`stderr` builtins are unavailable. Example: .data | map({symbol}). Omit for the full response."
    • removedInput schema / properties / us_limit / format
      Removed value: -"int32"
    • removedInput schema / properties / us_page / format
      Removed value: -"int32"
  2. Changed6 schema fields changedv0.10.6
    • addedInput schema / properties / _jq
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / is_attached
      Added value: +{
      +  "description": "Only meaningful together with order_id: it says that order_id is the ID\nof an attached take-profit / stop-loss leg, and the response then\ncarries that leg itself as an order entry. On its own it does nothing,\nand it has no effect for US accounts either.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / order_id
      Added value: +{
      +  "description": "Filter by order ID: a parent order ID, or (with is_attached=true) the ID\nof an attached take-profit / stop-loss leg. Has no effect for\nUS accounts, which are served by the US order endpoint.",
      +  "type": "string"
      +}
    • changedInput schema / properties / us_action / description
      Previous value: -"US accounts only: filter by side, \"Buy\" or \"Sell\". Omit for all."New value: +"US accounts only: filter by side, \"Buy\" or \"Sell\". Omit for\nall. Ignored for AP accounts (the region is inferred from the\naccount — do not pass it)."
    • changedInput schema / properties / us_limit / description
      Previous value: -"US accounts only: page size (default 20)."New value: +"US accounts only: page size (default 20). Ignored for\nAP accounts."
    • changedInput schema / properties / us_page / description
      Previous value: -"US accounts only: page number (default 1)."New value: +"US accounts only: page number (default 1). Ignored for\nAP accounts."
  3. Changed3 schema fields changedv0.8.4
    • addedInput schema / properties / us_action
      Added value: +{
      +  "description": "US accounts only: filter by side, \"Buy\" or \"Sell\". Omit for all.",
      +  "type": "string"
      +}
    • addedInput schema / properties / us_limit
      Added value: +{
      +  "description": "US accounts only: page size (default 20).",
      +  "format": "int32",
      +  "type": "integer"
      +}
    • addedInput schema / properties / us_page
      Added value: +{
      +  "description": "US accounts only: page number (default 1).",
      +  "format": "int32",
      +  "type": "integer"
      +}
  4. Changed1 schema field changedv0.7.1
    • removedInput schema / title
      Removed value: -"TodayOrdersParam"
  5. Addedv0.4.5
  6. Removedv0.4.0
  7. Addedv0.3.2
  8. Removedv0.3.1
  9. First observedv0.1.12

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare the tool read-only, idempotent, and non-destructive. The description goes further by specifying the response structure, attached-order behavior, and US-account distinctions, which are not present in the annotations. No contradiction exists.

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?

The description is front-loaded with purpose and return shape, and every sentence conveys a useful behavior. It is, however, a dense single paragraph that could benefit from bullet structure or slight trimming.

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

Completeness4/5

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

With no output schema, the description supplies the return fields and edge cases itself. It covers filtering, attached orders, and US-account caveats; minor ambiguity remains about the separate US endpoint, but the description is generally sufficient for correct invocation.

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%, but the description adds meaningful semantics: the 'is_attached does nothing without order_id' rule, the attached leg being returned as an order entry, and the US-only behavior of us_action/us_page/us_limit. This exceeds the schema baseline.

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?

The description opens with 'Get orders placed today,' a specific verb, resource, and time scope. The return shape and attached-order explanation further differentiate today's orders from history or execution tools.

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

Usage Guidelines4/5

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

Clear usage context is given: retrieve today's orders, optionally filter by symbol or order ID, and handle attached legs with is_attached. However, it does not explicitly name alternatives like history_orders or today_executions, so the when-not-to-use guidance is only implicit.

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

Deploy Server

Other Tools