Public.com MCP Server
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| HOST | No | Host for streamable-http transport (default: 0.0.0.0). | |
| PORT | No | Port for streamable-http transport (default: 8000). | |
| MCP_TRANSPORT | No | Transport mode: stdio (default) or streamable-http. | |
| PUBLIC_COM_SECRET | Yes | Your API secret key for Public.com. | |
| PUBLIC_COM_ACCOUNT_ID | No | Optional default account ID to use when not specified in requests. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| check_setupA | Verify that the Public.com API credentials are configured correctly. Checks the PUBLIC_COM_SECRET environment variable and attempts to authenticate. Run this first to confirm connectivity. |
| get_accountsA | List all brokerage accounts associated with the API key. Returns account IDs and types (BROKERAGE, HIGH_YIELD, etc.). |
| get_portfolioA | Get a snapshot of the account portfolio. Returns positions, equity breakdown, buying power, open orders, and cash/withdrawal figures (including cash, totalAccountValue, and availableToWithdraw). Only non-IRA accounts are supported. Args: account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| get_ordersA | Get all open/active orders on the account. Fetches the account portfolio and returns only the orders list. Returns order details including symbol, side, type, status, quantity, and prices. Orders that belong to a bracket carry a bracketId — the order ID of the bracket's entry order — which groups the entry and its exit legs together. Args: account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| get_orderA | Get the status and details of a specific order, including its fills. Returns the order with Only orders created within the last 30 days can be looked up; older orders return a not-found error. Order placement is asynchronous, so this may also return an error for an order that was just placed and has not yet been indexed. An order that belongs to a bracket carries a bracketId — the order ID of the bracket's entry order. Pass that ID to get_orders to find the sibling legs. Args: order_id: The UUID of the order to look up. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| search_ordersA | Search the account's order history — orders in ANY status, created in the last 30 days. This is the order-history tool. It differs from get_orders, which returns only the open/active orders embedded in the portfolio snapshot: search_orders queries the order-history endpoint and also returns filled, cancelled, rejected, expired and replaced orders, narrowed by the filters below. All filters are optional and combine with AND; call it with no filters to list every order in the window. Limits (enforced by the API): only orders created within the last 30 days are searchable, and at most 500 orders are returned — narrow with created_after / created_before or the other filters if a search could exceed that. Each result has the same shape as get_order: the order plus Args: account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. status: Only orders currently in this status. One of NEW, PARTIALLY_FILLED, FILLED, CANCELLED, QUEUED_CANCELLED, PENDING_CANCEL, PENDING_REPLACE, REPLACED, REJECTED, EXPIRED. side: BUY or SELL. symbols: Only orders for these instruments, each as "SYMBOL" or "SYMBOL:TYPE" (type defaults to EQUITY), e.g. ["AAPL", "BTC:CRYPTO", "SPY260313P00670000:OPTION"]. security_type: Only orders of this instrument type. One of EQUITY, OPTION, MULTI_LEG_INSTRUMENT, CRYPTO, ALT, TREASURY, BOND, INDEX, EVENTCONTRACT. open_close_indicator: OPEN or CLOSE (set on option and shorting orders only). created_after: Only orders created at or after this ISO 8601 timestamp (e.g. 2026-09-01T00:00:00Z). Cannot reach back more than 30 days. created_before: Only orders created before this ISO 8601 timestamp. |
| get_historyA | Retrieve account transaction history. Returns trades, money movements (deposits, withdrawals, dividends), and position adjustments (splits, mergers). Args: account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. start: Start timestamp in ISO 8601 format (e.g. 2025-01-15T09:00:00-05:00). end: End timestamp in ISO 8601 format. page_size: Max number of records to return. next_token: Pagination token for the next page. |
| get_quotesA | Get real-time quotes for one or more symbols. Returns last price, bid, ask, volume, and other market data. Args: symbols: List of ticker symbols (e.g. ["AAPL", "GOOGL"]). instrument_type: Type for all symbols. One of EQUITY, CRYPTO, OPTION, INDEX, ALT, BOND, TREASURY, EVENTCONTRACT. Default is EQUITY. For mixed types, call this tool multiple times. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| get_price_historyA | Get historical OHLCV price bars for a symbol over a time period. Returns open/high/low/close/volume bars split into pre-market, regular, and after-hours sessions, plus previous close and total gain/loss. Use this for trend analysis and historical prices — get_quotes returns the current price only, and get_history is account activity, not prices. Args:
symbol: Ticker symbol (e.g. "AAPL").
period: Time window to retrieve (e.g. "YEAR", "TEN_YEARS", "ALL").
instrument_type: EQUITY, CRYPTO, OPTION, INDEX, or EVENTCONTRACT.
Default EQUITY. To chart several contracts of one event side by
side, get_event_contract_bars is usually the better fit.
aggregation: Optional bar size. Prefer omitting it — the server then
picks an appropriate size for the period. Only a subset of sizes
is valid per period (finer/coarser sizes are rejected); if you set
an invalid one, the error lists the valid options.
purchase_date: Required only when period is "SINCE_PURCHASE".
Format "YYYY-MM-DD".
trading_session_toggle: Which sessions to include on the DAY equity
chart. Omit for the default (REGULAR_AND_EXTENDED_HOURS,
04:00–20:00 ET). REGULAR_HOURS limits to 09:30–16:00. ALL_SESSIONS
returns a full midnight-to-midnight chart including the overnight
ATS sessions, adding preMarketOvernight (00:00–04:00) and
postMarketOvernight (20:00–24:00) to the response.
ipo_date: Optional IPO / first-trade date of the asset. Format
"YYYY-MM-DD". When the asset is younger than the requested period,
the server fetches a finer aggregation over the available post-IPO
history (so the chart isn't a straight diagonal) and adds a
|
| get_instrumentA | Get details about a specific tradeable instrument. Returns trading status, fractional trading availability, and option trading capabilities. Args: symbol: Ticker symbol (e.g. "AAPL"). instrument_type: One of EQUITY, CRYPTO, OPTION, INDEX, ALT, BOND, TREASURY, EVENTCONTRACT. Default is EQUITY. |
| get_all_instrumentsA | List all available tradeable instruments with optional filters. Args: type_filter: Filter by instrument types (e.g. ["EQUITY", "CRYPTO"]). Valid: EQUITY, CRYPTO, OPTION, ALT, BOND, INDEX, TREASURY, EVENTCONTRACT. trading_filter: Filter by trading status (e.g. ["BUY_AND_SELL"]). Valid: BUY_AND_SELL, LIQUIDATION_ONLY, DISABLED. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| search_bondsA | Filtered, paged search for fixed income (bond) instruments. All filters are optional; combine them to narrow down results. Returns a
page object with Args: page_number: Page number, zero-based. Default 0. page_size: Items per page. Default 20. sort_property: Property to sort by (e.g. "maturityDate"). sort_direction: ASC or DESC. Default DESC. issuer: Filter by issuer name. issuer_symbol: Filter by issuer symbol(s), e.g. ["AAPL"]. bond_status: e.g. ["OUTSTANDING"]. Valid: LIQUIDATED, CONVERTED, FUNGED, REPAID, RESTRUCTURED, CALLED, DEFAULTED, MATURED, OUTSTANDING, PUT, TENDERED, REPURCHASED, PRE_ISSUANCE, UNKNOWN. bond_type: e.g. ["TREASURY", "CORPORATE"]. Valid: AGENCY, CD, CORPORATE, GOVERNMENT, MUNICIPAL, TREASURY. treasury_subtype: Valid: BOND, BILL, NOTE, STRIPS, TIPS, FLOATING. rating: S&P rating(s), e.g. ["AAA", "AA+"]. From AAA through D, NR for not rated (short-term ratings like A-1+/SP-1 also valid). rating_category: INVESTMENT_GRADE or SPECULATIVE_GRADE. sp_outlook: Valid: POSITIVE, NEGATIVE, DEVELOPING, STABLE, NOT_RATED, NOT_MEANINGFUL. sp_creditwatch: Valid: POSITIVE, NEGATIVE, DEVELOPING, NOT_MEANINGFUL. coupon_frequency: Valid: AT_MATURITY, ZERO, MONTHLY, QUARTERLY, SEMI_ANNUAL, ANNUAL. min_coupon: Minimum coupon rate (numeric string). max_coupon: Maximum coupon rate (numeric string). min_maturity_date: yyyy-MM-dd. Defaults server-side to today + 14 days. max_maturity_date: yyyy-MM-dd. min_current_yield: Minimum current yield (numeric string). max_current_yield: Maximum current yield (numeric string). min_par_value: Minimum par value (numeric string). max_par_value: Maximum par value (numeric string). min_liquidity_rating: Minimum liquidity score, 1 (low) to 5 (high). max_liquidity_rating: Maximum liquidity score, 1 (low) to 5 (high). liquidity_rating: Specific liquidity score(s), 1–5. callable: Filter by callable status. perpetual: Filter by perpetual bond status. partial_par: Filter by partial par status. |
| get_bond_detailsA | Get comprehensive details for a single bond. Returns pricing, ratings, coupon schedule, maturity, and call information for the bond identified by its symbol. Args: symbol: Bond symbol, typically CUSIP-BOND format (e.g. "912810TM0-BOND"). account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| get_option_expirationsA | Get available option expiration dates for a symbol. Args: symbol: Underlying ticker symbol (e.g. "AAPL"). instrument_type: EQUITY or UNDERLYING_SECURITY_FOR_INDEX_OPTION. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| get_option_chainA | Get the full option chain (calls and puts) for a symbol and expiration. Args: symbol: Underlying ticker symbol (e.g. "AAPL"). expiration_date: Expiration date in YYYY-MM-DD format. instrument_type: EQUITY or UNDERLYING_SECURITY_FOR_INDEX_OPTION. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| get_option_greeksB | Get option Greeks (delta, gamma, theta, vega, rho, IV) for option symbols. Args: osi_symbols: List of OSI-normalized option symbols (e.g. ["AAPL260320C00280000"]). account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| get_option_greekA | Get option Greeks (delta, gamma, theta, vega, rho, IV) for a single option symbol. Args: osi_symbol: OSI-normalized option symbol (e.g. "AAPL260320C00280000"). account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| get_tax_lotsA | Get the unrealized tax-lot summary for the account. Returns per-lot unrealized gain/loss, holding term (short/long/60-40),
cost basis, and the aggregate totals across all lots. Requires the API
key to have the Args: account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| get_tax_lots_for_symbolA | Get the unrealized tax-lot detail for a single symbol. Returns each open lot for the symbol with its unrealized gain/loss,
holding term, and cost basis. Requires the API key to have the
Args: symbol: Ticker symbol (e.g. "AAPL"). price: Optional price (as a numeric string) to value the lots against. Omit to use the current market price. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| get_tax_lots_csvA | Export the unrealized tax lots as a CSV file. Returns a file object with Args: account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| get_strategy_quoteA | Get a consolidated quote for a multi-leg option strategy. Prices the strategy as a whole (debit/credit, bid/ask/mark, net price) from its option legs and optional equity leg. This is a read-only quote — it does NOT place or preflight an order. Args: base_symbol: Underlying ticker for the strategy (e.g. "SPY"). option_legs: List of option leg objects. Each leg must have: - symbol (str): The option OCC symbol (e.g. "SPY260313P00670000") - side (str): BUY or SELL - open_close_indicator (str, optional): OPEN or CLOSE - ratio_quantity (int, optional): Ratio between legs (default 1) Example: [{"symbol": "SPY260313P00670000", "side": "SELL", "open_close_indicator": "OPEN", "ratio_quantity": 1}, {"symbol": "SPY260313P00665000", "side": "BUY", "open_close_indicator": "OPEN", "ratio_quantity": 1}] equity_leg: Optional equity leg (same shape as an option leg, with an equity ticker as the symbol) for strategies that pair options with stock (e.g. a covered call or collar). account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| get_event_categoriesA | List the categories for browsing event contracts (prediction markets). Each category carries its subcategories and the frequency filters it
supports. Pass a returned |
| get_event_summaryA | Browse event contracts (prediction-market events), one page at a time. Returns up to 100 events per page, each with its eventSymbol, title, volume,
resolution time, resolved/halted flags, category and contract symbols. Pass an
eventSymbol to get_event_details for its outcomes, YES/NO contracts and pricing.
Results can include resolved and halted events. When the response carries a
eventSymbol (e.g. "KALSHI.KXBALANCESHEET-EO26") is the discovery identifier. It is NOT the "-EVENT" id that get_event_contract_bars takes. Args: sorting_mode: VOLUME (default), EXPIRATION, or RECENTLY_ADDED. category: Only events in this category (from get_event_categories). subcategory: Only events in this subcategory. event_symbols: Only these events, by eventSymbol. frequencies: Only events recurring at these frequencies. Any of ALL, ONCE, FIFTEEN_MINUTES, ONE_HOUR, ONE_DAY, ONE_WEEK, ONE_MONTH, ONE_YEAR. resolution_time_start: Only events resolving at or after this ISO 8601 timestamp (e.g. 2026-12-31T00:00:00Z). resolution_time_end: Only events resolving at or before this ISO 8601 timestamp. display_resolved_events: Include (true) or exclude (false) resolved events. Omit for the API default. created_within_days: Only events created within the last N days. next_token: The nextToken from the previous page, to fetch the next one. |
| get_event_detailsA | Get full details for one event contract (prediction-market event). Returns the event's outcomes, the YES/NO contracts for each outcome with current pricing (bid, ask, last, probability, open interest, daily gain), the trading timeline (open, close, expected expiration, settlement), and the CFTC contract terms. Prices are in dollars between 0.00 and 1.00 and equal the implied probability. Args: event_symbol: The eventSymbol from get_event_summary, e.g. "KALSHI.KXBALANCESHEET-EO26". Not the "-EVENT" id that get_event_contract_bars takes. An unknown eventSymbol returns an error with code 7004. include_all_outcomes: True (default) returns every outcome; False returns a short list of up to 8. outcomeCount always reports the full total. |
| get_event_contract_barsA | Get price-history bars for up to 8 event contracts of one event. Prices and OHLC values are in dollars (0.00 to 1.00) for the side the symbol names — a ".N" symbol carries the NO prices — and equal the implied probability (multiply by 100 for cents / percent). Bars start at the first period with a price, so charts in one response can start at different timestamps: align them by timestamp, not by index. A symbol is left out of the response when it is unknown or has no price in the period. This endpoint takes the charting identifiers, not the discovery ones that get_event_summary / get_event_details use. Args: event_id: The "-EVENT" grouping id the contracts belong to, e.g. "KALSHI.KXBALANCESHEET-EO26-EVENT". The API rejects an id that is not an -EVENT id. period: DAY, WEEK, MONTH, or ALL. Measured back from now, or from the event's close time once it has stopped trading. symbols: 1 to 8 "-EVENTCONTRACT" symbols of that event, e.g. ["KALSHI.KXBALANCESHEET-EO26-6.6.Y-EVENTCONTRACT"]. |
| preflight_orderA | Estimate costs and impact of a potential single-leg trade before placing it. Returns estimated commission, regulatory fees, order value, buying power requirements, and margin impact. Does NOT place an order. Args: symbol: Ticker symbol (e.g. "AAPL"). instrument_type: EQUITY, OPTION, or CRYPTO. order_side: BUY or SELL. order_type: MARKET, LIMIT, STOP, or STOP_LIMIT. time_in_force: DAY or GTD. Default is DAY. quantity: Number of shares/contracts (mutually exclusive with amount). amount: Dollar amount (mutually exclusive with quantity). limit_price: Required for LIMIT and STOP_LIMIT orders. stop_price: Required for STOP and STOP_LIMIT orders. open_close_indicator: For options only — OPEN or CLOSE. expiration_time: Required when time_in_force is GTD. ISO 8601 format. equity_market_session: CORE or EXTENDED. For equity orders only. tax_lot_matching_instructions: Optional list of specific tax lots to sell, each a dict {"tax_lot_id": str, "quantity": str}. Constraints enforced by the API: at most 8 per request; only for a SELL equity order with open_close_indicator=CLOSE; every lot must be the same symbol as the order; only MARKET or good-for-day LIMIT orders; the quantities must sum to the order quantity; and the account's tax-lot information must have been updated today. Omit to let the broker apply its default lot-matching. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| preflight_multileg_orderA | Estimate costs for a multi-leg (options strategy) trade before placing it. Does NOT place an order. Args: legs: List of leg objects. Each leg must have: - symbol (str): The option/equity symbol (e.g. "SPY260313P00670000") - type (str): EQUITY or OPTION - side (str): BUY or SELL - open_close_indicator (str, optional): OPEN or CLOSE (required for options) - ratio_quantity (int, optional): Ratio between legs (default 1) Example: [{"symbol": "SPY260313P00670000", "type": "OPTION", "side": "SELL", "open_close_indicator": "OPEN", "ratio_quantity": 1}, {"symbol": "SPY260313P00665000", "type": "OPTION", "side": "BUY", "open_close_indicator": "OPEN", "ratio_quantity": 1}] limit_price: The limit price for the spread. time_in_force: DAY or GTD. Default is DAY. quantity: Number of spreads. Must be > 0. expiration_time: Required when time_in_force is GTD. ISO 8601 format. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| preflight_short_orderA | Estimate costs for a short-sale equity order before placing it. Returns estimated commission, fees, and buying power impact. Does NOT place an order. Args: symbol: Ticker symbol to short (e.g. "AAPL"). quantity: Number of shares to short. order_type: MARKET, LIMIT, STOP, or STOP_LIMIT. Default is MARKET. time_in_force: DAY or GTD. Default is DAY. limit_price: Required for LIMIT and STOP_LIMIT orders. stop_price: Required for STOP and STOP_LIMIT orders. expiration_time: Required when time_in_force is GTD. ISO 8601 format. equity_market_session: CORE or EXTENDED. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| preflight_call_credit_spreadA | Estimate costs for a Bear Call Spread (call credit spread) before placing it. Sell a lower-strike call, buy a higher-strike call. Receives a net credit. Does NOT place an order. Args: sell_contract_osi: OSI symbol of the call to sell (lower strike). buy_contract_osi: OSI symbol of the call to buy (higher strike). quantity: Number of spreads. limit_price: Net credit to receive per spread (positive = credit received). time_in_force: DAY or GTD. Default is DAY. expiration_time: Required when time_in_force is GTD. ISO 8601 format. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| preflight_call_debit_spreadA | Estimate costs for a Bull Call Spread (call debit spread) before placing it. Buy a lower-strike call, sell a higher-strike call. Pays a net debit. Does NOT place an order. Args: sell_contract_osi: OSI symbol of the call to sell (higher strike). buy_contract_osi: OSI symbol of the call to buy (lower strike). quantity: Number of spreads. limit_price: Net debit to pay per spread (positive = debit paid). time_in_force: DAY or GTD. Default is DAY. expiration_time: Required when time_in_force is GTD. ISO 8601 format. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| preflight_put_credit_spreadA | Estimate costs for a Bull Put Spread (put credit spread) before placing it. Sell a higher-strike put, buy a lower-strike put. Receives a net credit. Does NOT place an order. Args: sell_contract_osi: OSI symbol of the put to sell (higher strike). buy_contract_osi: OSI symbol of the put to buy (lower strike). quantity: Number of spreads. limit_price: Net credit to receive per spread (positive = credit received). time_in_force: DAY or GTD. Default is DAY. expiration_time: Required when time_in_force is GTD. ISO 8601 format. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| preflight_put_debit_spreadA | Estimate costs for a Bear Put Spread (put debit spread) before placing it. Buy a higher-strike put, sell a lower-strike put. Pays a net debit. Does NOT place an order. Args: sell_contract_osi: OSI symbol of the put to sell (lower strike). buy_contract_osi: OSI symbol of the put to buy (higher strike). quantity: Number of spreads. limit_price: Net debit to pay per spread (positive = debit paid). time_in_force: DAY or GTD. Default is DAY. expiration_time: Required when time_in_force is GTD. ISO 8601 format. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| place_orderA | Place a single-leg order (buy/sell stocks, crypto, or options). ⚠️ This executes a real trade. Consider running preflight_order first. Args: symbol: Ticker symbol (e.g. "AAPL"). instrument_type: EQUITY, OPTION, or CRYPTO. order_side: BUY or SELL. order_type: MARKET, LIMIT, STOP, or STOP_LIMIT. time_in_force: DAY or GTD. Default is DAY. quantity: Number of shares/contracts (mutually exclusive with amount). amount: Dollar amount (mutually exclusive with quantity). limit_price: Required for LIMIT and STOP_LIMIT orders. stop_price: Required for STOP and STOP_LIMIT orders. open_close_indicator: For options only — OPEN or CLOSE. expiration_time: Required when time_in_force is GTD. ISO 8601 format. equity_market_session: CORE or EXTENDED. For equity orders only. tax_lot_matching_instructions: Optional list of specific tax lots to sell, each a dict {"tax_lot_id": str, "quantity": str}. Constraints enforced by the API: at most 8 per request; only for a SELL equity order with open_close_indicator=CLOSE; every lot must be the same symbol as the order; only MARKET or good-for-day LIMIT orders; the quantities must sum to the order quantity; and the account's tax-lot information must have been updated today. Omit to let the broker apply its default lot-matching. order_class: SIMPLE (default) places a standalone order. BRACKET, OCO or OTO place a bracket order, where the exit legs below are submitted automatically once this entry order fills. Bracket orders are for EQUITY and OPTION only, need a whole-share quantity (not amount), must use the CORE market session, and the entry order_type must be LIMIT or MARKET — LIMIT only for OCO. Every leg of the bracket, entry included, reports the entry's order ID as its bracketId. preflight_order cannot check the exit legs — it validates the entry order only. take_profit_limit_price: Limit price of the take-profit exit leg, placed on the opposite side of the entry. Requires a bracket order_class. stop_loss_stop_price: Stop price of the stop-loss exit leg, placed on the opposite side of the entry. Requires a bracket order_class. Placed as a STOP order unless stop_loss_limit_price is given too. stop_loss_limit_price: Limit price that makes the stop-loss leg a STOP_LIMIT order instead of a STOP order. Requires stop_loss_stop_price. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| place_multileg_orderA | Place a multi-leg order (options strategies: spreads, straddles, etc.). ⚠️ This executes a real trade. Consider running preflight_multileg_order first. Args: legs: List of leg objects. Each leg must have: - symbol (str): The option/equity symbol (e.g. "SPY260313P00670000") - type (str): EQUITY or OPTION - side (str): BUY or SELL - open_close_indicator (str, optional): OPEN or CLOSE (required for options) - ratio_quantity (int, optional): Ratio between legs (default 1) Example: [{"symbol": "SPY260313P00670000", "type": "OPTION", "side": "SELL", "open_close_indicator": "OPEN", "ratio_quantity": 1}, {"symbol": "SPY260313P00665000", "type": "OPTION", "side": "BUY", "open_close_indicator": "OPEN", "ratio_quantity": 1}] quantity: Number of spreads. Must be > 0. limit_price: Limit price. Positive for debit, negative for credit. time_in_force: DAY or GTD. Default is DAY. expiration_time: Required when time_in_force is GTD. ISO 8601 format. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| place_call_credit_spreadA | Place a Bear Call Spread (call credit spread). Sell a lower-strike call, buy a higher-strike call. Receives a net credit. ⚠️ This executes a real trade. Consider running preflight_call_credit_spread first. Args: sell_contract_osi: OSI symbol of the call to sell (lower strike). buy_contract_osi: OSI symbol of the call to buy (higher strike). quantity: Number of spreads. limit_price: Minimum net credit to receive per spread. time_in_force: DAY or GTD. Default is DAY. expiration_time: Required when time_in_force is GTD. ISO 8601 format. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| place_call_debit_spreadA | Place a Bull Call Spread (call debit spread). Buy a lower-strike call, sell a higher-strike call. Pays a net debit. ⚠️ This executes a real trade. Consider running preflight_call_debit_spread first. Args: sell_contract_osi: OSI symbol of the call to sell (higher strike). buy_contract_osi: OSI symbol of the call to buy (lower strike). quantity: Number of spreads. limit_price: Maximum net debit to pay per spread. time_in_force: DAY or GTD. Default is DAY. expiration_time: Required when time_in_force is GTD. ISO 8601 format. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| place_put_credit_spreadA | Place a Bull Put Spread (put credit spread). Sell a higher-strike put, buy a lower-strike put. Receives a net credit. ⚠️ This executes a real trade. Consider running preflight_put_credit_spread first. Args: sell_contract_osi: OSI symbol of the put to sell (higher strike). buy_contract_osi: OSI symbol of the put to buy (lower strike). quantity: Number of spreads. limit_price: Minimum net credit to receive per spread. time_in_force: DAY or GTD. Default is DAY. expiration_time: Required when time_in_force is GTD. ISO 8601 format. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| place_put_debit_spreadA | Place a Bear Put Spread (put debit spread). Buy a higher-strike put, sell a lower-strike put. Pays a net debit. ⚠️ This executes a real trade. Consider running preflight_put_debit_spread first. Args: sell_contract_osi: OSI symbol of the put to sell (lower strike). buy_contract_osi: OSI symbol of the put to buy (higher strike). quantity: Number of spreads. limit_price: Maximum net debit to pay per spread. time_in_force: DAY or GTD. Default is DAY. expiration_time: Required when time_in_force is GTD. ISO 8601 format. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| place_short_orderA | Place an equity short-sale order. ⚠️ This executes a real trade. Consider running preflight_short_order first. Args: symbol: Ticker symbol to short (e.g. "AAPL"). quantity: Number of shares to short. order_type: MARKET, LIMIT, STOP, or STOP_LIMIT. Default is MARKET. time_in_force: DAY or GTD. Default is DAY. limit_price: Required for LIMIT and STOP_LIMIT orders. stop_price: Required for STOP and STOP_LIMIT orders. expiration_time: Required when time_in_force is GTD. ISO 8601 format. equity_market_session: CORE or EXTENDED. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| flatten_and_go_shortA | Sell any existing long position in a symbol, then place a short-sale order. ⚠️ Experimental — this is a two-order workflow, not atomic. Market conditions may change between the flatten fill and the short entry. Both orders execute as real trades. If no long position exists the flatten step is skipped and only the short order is placed. Args: symbol: Ticker symbol (e.g. "AAPL"). short_quantity: Number of shares to short after flattening. order_type: MARKET, LIMIT, STOP, or STOP_LIMIT. Default is MARKET. time_in_force: DAY or GTD. Default is DAY. limit_price: Required for LIMIT and STOP_LIMIT orders. stop_price: Required for STOP and STOP_LIMIT orders. expiration_time: Required when time_in_force is GTD. ISO 8601 format. equity_market_session: CORE or EXTENDED. flatten_timeout: Seconds to wait for the flatten order to fill (default 60). account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| cancel_orderA | Cancel an existing order. Note: While most cancellations are processed immediately during market hours, this is not guaranteed. Use get_order to confirm cancellation. Args: order_id: The UUID of the order to cancel. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
| cancel_and_replace_orderA | Atomically cancel an existing order and replace it with new parameters. ⚠️ This modifies an existing order. Supported for equity, option, and crypto quantity orders. Args: order_id: UUID of the existing order to cancel and replace. order_type: MARKET, LIMIT, STOP, or STOP_LIMIT for the replacement. time_in_force: DAY or GTD. Default is DAY. quantity: New quantity for the replacement order. Mutually exclusive with amount. amount: New notional dollar amount for the replacement order. Mutually exclusive with quantity. limit_price: New limit price (for LIMIT/STOP_LIMIT orders). stop_price: New stop price (for STOP/STOP_LIMIT orders). expiration_time: Required when time_in_force is GTD. ISO 8601 format. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 42 tools
Order retrieval tools (get_order, get_orders, search_orders) and the singular/plural option Greeks pair (get_option_greek vs get_option_greeks) create overlapping boundaries that rely on descriptions to disambiguate. Many preflight/place strategy pairs are distinct in action, but the overall set has several near-duplicate surfaces.
Names are predominantly snake_case verb_noun and follow predictable prefixes (get_, search_, preflight_, place_, cancel_). Minor deviations exist, notably the singular/plural inconsistency between get_option_greek and get_option_greeks, and compound verbs like flatten_and_go_short.
42 tools is overly large for the domain; many preflight_* and place_* spread variants duplicate the generic preflight_multileg_order and place_multileg_order functionality. This over-splitting burdens selection rather than expanding capability.
The surface covers the core brokerage lifecycle: accounts, portfolio, order placement/preflight/cancel/replace, market data, options, bonds, event contracts, and tax lots. Minor gaps exist, such as no generic close-position tool and cancel_and_replace not supporting multi-leg orders.