Skip to content
Skip to main content

TradeZero MCP Tool Reference

Reference for all 21 tools on TradeZero MCP (Model Context Protocol). OAuth setup is in the TradeZero MCP setup guide. Each tool is marked read-only or write so your client can require approval before account changes. This page documents parameters, access levels, and the create_order schema.

21 tools - 14 reads, 7 writes (6 destructive; locate_quote is a write but free until accept).

21tools
14read-only
7writes

What you can do

Available

  • Accounts, balances, P&L, positions, cash history
  • Today's orders - place, read, cancel
  • Equities, options, multi-leg spreads
  • Short locates (live writes; reads on any account)
No market data

The hosted MCP server does not stream quotes, options chains, or charts. If an assistant cites a price, it did not come from TradeZero - supply your own limit on orders.

How to read these tables

MarkerMeaning
ReadData only
WritePlaces, cancels, or commits on your account
Approval: RecommendedFine to allow; prompts cost nothing
Approval: RequiredDo not enable "always allow"

Writes are listed in Tools that can move money. MCP clients prompt on tool calls by default, including reads. Agent modes can skip prompts - do not grant blanket approval on write operations.

Calling conventions

Wire rules that apply across TradeZero MCP tools. Miss these and you get 400, empty history, or a silent queue ack.

TopicRule
Required-but-null fieldsSend the key with null when you want the default. Omitting the key fails validation.
EnumsCase-sensitive. Send Buy, Limit, Mleg - not lowercase. Route metadata may list MLEG; create_order still expects Mleg.
QuantitiesorderQuantity and locate quantity must be whole integers.
Field namesExact spelling. account vs accountId and quoteReqId vs quoteReqID reject when wrong. Extra keys on create_order are ignored.
quoteReqIdFresh id on locate_quote and sell_locate. Reuse that same id on accept_locate / cancel_locate. Duplicates return R114.
Locate acks*Sent: true means queued, not done. Confirm in get_locate_history (responses use quoteReqID).
Order fieldsRequest body uses stopPrice; responses echo priceStop. A successful create_order is acceptance, not a fill - read orderStatus.
After writesPoll in 1–2 seconds. Rate limits apply.
Lost create_order responseCheck get_todays_orders. Do not reuse the same clientOrderId.

Short locates

Live account for writes

locate_quote, accept_locate, cancel_locate, and sell_locate need a live account. Reads work on paper too.

Details: Short Locates.

Try

Is BB easy to borrow right now? · Quote me 500 shares of BB and show the cost of each offer. · What's still in my locate inventory today?

ToolWhat it doesAccessApproval
is_easy_to_borrowETB checkReadRecommended
get_locate_inventoryActive inventory todayReadRecommended
get_locate_historyDay history with statusesReadRecommended
locate_quoteRequest quoteWriteRequired
accept_locateAccept quote (fee)WriteRequired
cancel_locateCancel quote or pending sell-backWriteRequired
sell_locateSell unused inventoryWriteRequired

Reads: accountId (+ symbol on ETB). Writes:

ToolAccount fieldquoteReqIdAlso required
locate_quoteaccountFreshsymbol, quantity
accept_locateaccountIdSame as quote-
cancel_locateaccountIdSame as row-
sell_locateaccountFreshsymbol, quantity, locateType

locateType on sell-back: Unknown, Locate, IntraDay, PreBorrow, SingleUse.

locateStatusMeaningNext step
65OfferedAccept or cancel within ~30s
50FilledCheck inventory
52CanceledRe-quote if needed
56RejectedRead text
67ExpiredRe-quote
48Sell-back queuedStatus codes

Accounts and P&L

Try

Show me my buying power and tell me whether I'm on paper or live. · How is my portfolio's P&L looking today? · Which TradeZero accounts can I trade?

ToolWhat it doesAccessApproval
list_accountsAll tradable accounts - start here for accountIdReadRecommended
get_accountOne-account snapshot (buying power, option level, tradingSuspended)ReadRecommended
get_account_pnlAccount + per-position P&LReadRecommended

list_accounts - no args. get_account / get_account_pnl - accountId (string). Useful list_accounts fields: accountType, buyingPower, tradingSuspended, optLevel, fractional. Rejections from suspended accounts or insufficient option level show in create_order text - see Order Rejections.

Positions

Try

What positions am I holding right now? · Show me closed trades from today with realized P&L.

ToolWhat it doesAccessApproval
get_positionsOpen lots (no unrealized P&L - use get_account_pnl)ReadRecommended
get_closed_positionsClosed lifecycles + realized P&LReadRecommended

Both require accountId. Open positionId is a string; closed is a number. One row per lot - ignore zero-qty rows when summing.

Orders

Try

What open orders do I have right now? · Cancel my open AAPL order. · Place a limit buy for 100 shares of AAPL at $180. · Explain why my last order was rejected.

ToolWhat it doesAccessApproval
get_routesRoutes, order types, TIFsReadRecommended
get_todays_ordersToday's order book (all statuses) + working multi-day GTCsReadRecommended
get_orderOne order - pass clientOrderId as orderIdReadRecommended
get_historical_ordersFill history from startDate, up to ~1 weekReadRecommended
get_historical_orders_paginatedSame, paginated (~1 year); filters in queryStringReadRecommended
create_orderPlace equity, option, or spreadWriteRequired
cancel_orderCancel by clientOrderIdWriteRequired
cancel_all_ordersCancel all working (optional symbol filter)WriteRequired

Arguments: reads need accountId; get_order also takes orderId (= clientOrderId); history tools also take startDate (paginated adds optional queryString). Writes: cancel_order needs accountId + clientOrderId; cancel_all_orders needs accountId and symbol (null = all symbols). After the open-auction cutoff, AtTheOpening orders cannot be cancelled - see AtTheOpening (OPG).

cancel_all_orders

symbol: null cancels every working order on the account. Use a ticker to scope, or cancel one at a time.

Which orders tool to use

  • Session book / live blotter: get_todays_orders / get_order
  • Fill archives: get_historical_orders (~1 week) or get_historical_orders_paginated (~1 year) - same fill-level shape as REST historical orders
  • Before live placement: call get_routes and copy the route name exactly (SMART / CTDL / ARCA equities, SMARTO options, SMARTM spreads; paper: PAPER / PAPERM)

Route metadata can list order types that create_order rejects - placeable set is Market / Limit / Stop / StopLimit only (Route metadata vs place-order). Side + openClose together set buy/sell/short/cover - not side alone.

create_order

Try

Buy to open one AAPL call - I will give you the OCC symbol and a $2.50 limit. · Build a vertical spread on AAPL and show me the legs before you submit.

All fields required; null when unused.

FieldTypeSend
accountIdstringFrom list_accounts
symbolstringTicker, compact OCC, or underlying for Mleg
sidestring | nullBuy/Sell; null for Mleg
orderTypestringMarket, Limit, Stop, StopLimit
securityTypestringStock, Option, Mleg
timeInForcestringMust match route - equity SMART rules on Order types, times in force, and session hours
orderQuantityintegerWhole shares / spread units
openClosestring | nullOpen/Close; null for Mleg
limitPricenumber | nullLimit / StopLimit / Mleg net price
stopPricenumber | nullStop types → response priceStop
routestring | nullFrom get_routes; send on live
clientOrderIdstring | nullYour id for cancel/lookup; fresh per order
legsJsonstring | nullJSON array string for Mleg only

Single-leg options: compact OCC on symbol; see Options. Multi-leg: legsJson → REST legs[]; illustrative example:

{"securityType":"Mleg","symbol":"AAPL","side":null,"openClose":null,"orderType":"Limit","limitPrice":2.5,"orderQuantity":1,"timeInForce":"Day","route":"SMARTM","legsJson":"[{\"symbol\":\"AAPL991231C00100000\",\"side\":\"Buy\",\"openClose\":\"Open\",\"ratio\":1},{\"symbol\":\"AAPL991231C00200000\",\"side\":\"Sell\",\"openClose\":\"Open\",\"ratio\":1}]"}

Order responses

Poll get_order until terminal. Flow: list_accountsget_routescreate_orderget_order.

orderStatusTerminalNotes
PendingNew, PartiallyFilled, New, PendingCancelNoPoll
FilledYesUse priceAvg
Canceled, RejectedYesRead text (R-codes)
Other (Expired, Replaced, DoneForDay)Treat as non-terminal until stable

Key fields: clientOrderId, orderStatus, text, orderType, tradedSymbol (prefer over symbol on fills), executed, leavesQuantity, priceAvg, limitPrice, priceStop, canceledQuantity. Do not cancel a Rejected order (R130). Market responses can show limitPrice - trust orderType.

Cash

Try

Show me cash transactions from this month. · How much did I pay in locate fees this week?

ToolWhat it doesAccessApproval
get_cash_transactionsPaginated ledger (up to 1 year)ReadRecommended

accountId, startDate, plus numberOfDays, limit, offset (all required - pass null for defaults 30 / 100 / 0).

Tools that can move money

ToolEffect
create_orderOrder to market
cancel_orderWithdraw one order
cancel_all_ordersWithdraw all working (optional symbol)
locate_quoteQuote only - no fee
accept_locateLocate fee
cancel_locateCancel quote / sell-back
sell_locateCredit unused inventory