Check an order against venue rules
check_orderUse 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
| Name | Required | Description | Default |
|---|---|---|---|
| sl | No | Stop loss price (MT5; OKX attached stop loss). | |
| tp | No | Take profit price (MT5; OKX attached take profit). | |
| qty | Yes | Order 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. | |
| side | Yes | ||
| spec | No | MT5: 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. | |
| stop | No | Trigger / stop price for stop and take-profit types (Binance stopPrice). | |
| type | No | market, 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. | |
| price | No | Limit price (limit types) or MT5 pending open price. | |
| venue | Yes | binance (spot), okx, mt5 (send spec), binance_usdm or bybit (send spec = pasted rules). | |
| margin | No | MT5 optional: {free_margin, margin_required} you read from your terminal; only compared, no size is suggested. | |
| market | No | Optional for OKX when the symbol is ambiguous (BTCUSDT + perp = BTC-USDT-SWAP). | |
| symbol | Yes | Binance BTCUSDT; OKX BTC-USDT (spot), BTC-USDT-SWAP (perpetual), BTC-USD-251226 (futures); MT5 any name. BTC/USDT also works. | |
| filling | No | MT5 type_filling. | |
| tgt_ccy | No | OKX spot market orders: unit of qty (default quote_ccy for buy, base_ccy for sell). | |
| quote_qty | No | Binance market orders only: quote amount instead of qty (quoteOrderQty). | |
| ref_price | No | The 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_limit | No | OKX: {buyLmt, sellLmt} from GET /api/v5/public/price-limit to check the price band. | |
| time_in_force | No | GTC, IOC or FOK (Binance limit types). |