Skip to main content
Glama

AIKIT by Trading Checkup

Check an order against venue rules

check_order
Read-onlyIdempotent

Use it right before code sends an order, or when a user asks whether an order will be accepted: a pre-flight check of ONE planned order against the venue's published rules (Binance spot, OKX spot/swaps/futures, MetaTrader 5): lot/size step, min and max size, tick size, min and max price, min notional, price band, order type allowed, symbol status, MT5 stops level, filling and trade mode. Returns pass/fail per rule with the rule text quoted, source URL and date, the error code the venue would return, and the NEAREST passing size and price below and above - so the agent can fix the order instead of getting it rejected. Tested 4 Dec 2026 by 5 AI models: an MT5 order with a volume off the 0.01 step was answered right by 0 of 5 without this tool and 5 of 5 with it. Binance + OKX rules come from a signed daily public snapshot (rules_as_of, rule_changed_recently); MT5 rules differ per broker, so send the symbol spec your terminal shows; Binance USD-M futures and Bybit: paste the venue's rules in spec. Never places orders, takes no API keys, never says whether to trade. 1 credit (free trial without a key).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "venue": "<venue>",
      "symbol": "<symbol>",
      "side": "<side>",
      "qty": "<qty>"
    },
    "name": "check_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
slNoStop loss price (MT5; OKX attached stop loss).
tpNoTake profit price (MT5; OKX attached take profit).
qtyYesOrder size as a decimal string (strings avoid float rounding). Binance: base asset. OKX swap/futures: CONTRACTS (the reply echoes coins = contracts x ctVal); OKX spot market buy: quote currency unless tgt_ccy = base_ccy. MT5: lots.
sideYes
specNoMT5: the SymbolInfo values your terminal shows, e.g. {volume_min, volume_max, volume_step, volume_limit, trade_tick_size, digits, point, trade_stops_level, filling_mode, trade_mode, trade_exemode, bid, ask}. binance_usdm: the symbol object from fapi exchangeInfo. bybit: the item from v5 instruments-info. Checked exactly as given.
stopNoTrigger / stop price for stop and take-profit types (Binance stopPrice).
typeNomarket, limit, limit_maker (post_only), stop_market, stop_limit, take_profit, take_profit_limit; OKX also fok, ioc; MT5 also buy_limit, sell_limit, buy_stop, sell_stop, buy_stop_limit, sell_stop_limit.
priceNoLimit price (limit types) or MT5 pending open price.
venueYesbinance (spot), okx, mt5 (send spec), binance_usdm or bybit (send spec = pasted rules).
marginNoMT5 optional: {free_margin, margin_required} you read from your terminal; only compared, no size is suggested.
marketNoOptional for OKX when the symbol is ambiguous (BTCUSDT + perp = BTC-USDT-SWAP).
symbolYesBinance BTCUSDT; OKX BTC-USDT (spot), BTC-USDT-SWAP (perpetual), BTC-USD-251226 (futures); MT5 any name. BTC/USDT also works.
fillingNoMT5 type_filling.
tgt_ccyNoOKX spot market orders: unit of qty (default quote_ccy for buy, base_ccy for sell).
quote_qtyNoBinance market orders only: quote amount instead of qty (quoteOrderQty).
ref_priceNoThe price you see now (Binance average price). Needed to check market-order notional, the Binance price band and stop-vs-last-price; without it those checks say unknown.
price_limitNoOKX: {buyLmt, sellLmt} from GET /api/v5/public/price-limit to check the price band.
time_in_forceNoGTC, IOC or FOK (Binance limit types).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already establish read-only, non-destructive, idempotent behavior; the description adds substantial operational context including exact return contents (per-rule pass/fail, rule text, source URL/date, venue error code, nearest passing size/price), data freshness via signed daily snapshot, MT5 broker-specific caveats, required spec inputs, cost, and no-auth/no-advice limits. There is no contradiction with the annotations.

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 usage and purpose and is organized with colons and semicolons, making the rule list and caveats readable. It is long for a single paragraph and includes a benchmark statistic that is not essential for invocation, though most of the detail earns its place for this complex 18-parameter tool.

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?

For a complex multi-venue, 18-parameter checker with no output schema, the description covers purpose, when to use, return shape, rule provenance, venue-specific inputs, safety limits, and cost. The remaining parameter details are covered by the high-coverage schema, so an agent has enough to call it correctly.

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

Parameters3/5

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

Schema description coverage is 94%, so most parameters are already documented. The description reinforces why 'spec' is needed for MT5 and pasted-rule venues, but most parameter-level meaning such as qty units, venue enums, and price fields remains in the schema rather than being expanded beyond it.

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 states a specific verb ('pre-flight check') and resource ('ONE planned order against the venue's published rules'), enumerates the rule families checked, and names the supported venues. It also explicitly says it never places orders, clearly distinguishing it from 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?

It gives clear conditions for use: right before code sends an order, or when a user asks whether an order will be accepted. It also states exclusions such as never placing orders, taking no API keys, and never saying whether to trade, though it does not explicitly name a sibling alternative.

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