check_setup
ChatGPTVerify the access token works by listing accounts.
get_accounts
ChatGPTList all brokerage accounts associated with the API key. Returns account IDs and types (BROKERAGE, HIGH_YIELD, etc.).
get_all_instruments
ChatGPTList 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: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
get_bond_details
ChatGPTGet comprehensive details for a single bond. Returns pricing, ratings, coupon schedule, maturity, and call information for the bond identified by its symbol. Requires the marketdata scope on the access token. Args: symbol: Bond symbol, typically CUSIP-BOND format (e.g. "912810TM0-BOND"). account_id: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
get_history
ChatGPTRetrieve account transaction history. Returns trades, money movements (deposits, withdrawals, dividends), and position adjustments (splits, mergers). Args: account_id: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous. 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_instrument
ChatGPTGet 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_option_chain
ChatGPTGet 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: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
get_option_expirations
ChatGPTGet 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: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
get_option_greek
ChatGPTGet 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: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
get_option_greeks
ChatGPTGet 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: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
get_order
ChatGPTGet the status and details of a specific order, including its fills. Returns the order with trades (each fill's tradeId, quantity, price, side and timestamp), filledAt, replacedAt, lastModified and equityMarketSession. equityMarketSession reports the session as REGULAR, REST_OF_DAY or TWENTY_FOUR_HOURS — a different vocabulary from place_order's equity_market_session argument (CORE / EXTENDED / TWENTY_FOUR_HOURS); never feed one into the other. 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: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
get_orders
ChatGPTGet 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: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
get_portfolio
ChatGPTGet 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: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
get_price_history
ChatGPTGet 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 leadingFill object to the response describing the flat lead-in to draw for the pre-IPO portion (startTimestamp, endTimestamp, value, count, includedInTotalExpectedBars). Omit for unchanged behavior. Ignored for the DAY chart; leadingFill is also never emitted for the ALL / SINCE_PURCHASE periods.
get_quotes
ChatGPTGet 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: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
get_strategy_quote
ChatGPTGet 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 (at least one). Each leg must have: - symbol (str): The option OCC symbol (e.g. "SPY260313P00670000") - side (str): BUY or SELL - open_close_indicator (str): OPEN or CLOSE — required - 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}] account_id: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous. equity_leg: Optional equity leg (same shape as an option leg, with an equity ticker as the symbol, and no open_close_indicator) for strategies that pair options with stock (e.g. a covered call or collar).
get_tax_lots
ChatGPTGet the unrealized tax-lot summary for the account. Returns one summary row per symbol (unrealized gain/loss and cost basis aggregated across that symbol's lots) plus account-level totals broken down by holding term (short/long/60-40). For per-lot detail — each lot's holding term and its lotSelectionId for tax-lot selling — use get_tax_lots_for_symbol. Requires the trading.read scope on the access token. Args: account_id: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
get_tax_lots_csv
ChatGPTExport the unrealized tax lots as a CSV file. Returns a file object with fileName and base64Data. The CSV contents are Base64-encoded in the base64Data field — decode it to recover the raw CSV text. Requires the trading.read scope on the access token. Args: account_id: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
get_tax_lots_for_symbol
ChatGPTGet the unrealized tax-lot detail for a single symbol. Returns each open lot for the symbol with its unrealized gain/loss, holding term (SHORT/LONG/SIXTY_FORTY), cost basis, and — when the lot can be targeted for tax-lot selling — its lotSelectionId, which can be passed as tax_lot_id in place_order's tax_lot_matching_instructions. Requires the trading.read scope on the access token. Args: symbol: Ticker symbol (e.g. "AAPL"). account_id: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous. price: Optional price (as a numeric string) to value the lots against. If omitted, lots are valued at a once-daily calculated price that does not change intraday — pass a live price (e.g. from get_quotes) for an intraday valuation.
preflight_call_credit_spread
ChatGPTEstimate 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: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
preflight_call_debit_spread
ChatGPTEstimate 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: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
preflight_multileg_order
ChatGPTEstimate 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: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
preflight_order
ChatGPTEstimate 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 against, each {"tax_lot_id": str, "quantity": str}. Get each tax_lot_id from the lotSelectionId field returned by get_tax_lots_for_symbol (format "symbol;tradeDate;price;quantity"); lots without a lotSelectionId cannot be targeted. 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. The broker does not guarantee the instructions are applied exactly as specified. Omit to let the broker apply its default lot-matching. account_id: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
preflight_put_credit_spread
ChatGPTEstimate 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: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
preflight_put_debit_spread
ChatGPTEstimate 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: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
preflight_short_order
ChatGPTEstimate 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: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous.
search_bonds
ChatGPTFiltered, paged search for fixed income (bond) instruments. All filters are optional; combine them to narrow down results. Returns a page object with content (the bonds), totalElements, and totalPages. 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.
search_orders
ChatGPTSearch 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 trades (the individual fills: tradeId, quantity, price, side, timestamp), filledAt, replacedAt, lastModified and equityMarketSession. equityMarketSession reports the session an equity order was placed for as REGULAR, REST_OF_DAY or TWENTY_FOUR_HOURS — a different vocabulary from place_order's equity_market_session argument (CORE / EXTENDED / TWENTY_FOUR_HOURS); never feed one into the other. Args: account_id: Required. If unknown, call get_accounts: use the sole BROKERAGE account if there's exactly one; ask the user if multiple. Don't pick autonomously when ambiguous. 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.