publicdotcom-mcp-server

v0.11.0
publicdotcom-mcp-server Checked 1 hour ago Published 13 days ago

MCP server for the Public.com Trading API

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

check_setup

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_accounts

List all brokerage accounts associated with the API key. Returns account IDs and types (BROKERAGE, HIGH_YIELD, etc.).

get_portfolio

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. `buyingPower` includes `dayTradeBuyingPower`, the buying power available for day trading. It equals `buyingPower` when the account is not enabled for day-trade buying power, and is omitted when the API does not report it. Args: account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set.

ParameterTypeDescription
account_id

get_orders

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.

ParameterTypeDescription
account_id

get_order

Get the status and details of a specific order, including its fills. Returns the order with `trades` (each fill's tradeId, quantity, price, side, timestamp and, when reported, marketIdentificationCode — the ISO 10383 MIC of the execution venue, e.g. XNAS), `filledAt`, `replacedAt`, `lastModified` and `equityMarketSession`. `equityMarketSession` reports the session as REGULAR, REST_OF_DAY or TWENTY_FOUR_HOURS. 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…

ParameterTypeDescription
order_id *string
account_id

search_orders

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…

ParameterTypeDescription
account_id
created_after
created_before
open_close_indicator
security_type
side
status
symbols

get_history

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.

ParameterTypeDescription
account_id
end
next_token
page_size
start

get_quotes

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.

ParameterTypeDescription
symbols *array
account_id
instrument_typestring

get_price_history

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 EQU…

ParameterTypeDescription
period *string
symbol *string
aggregation
instrument_typestring
ipo_date
purchase_date
trading_session_toggle

get_instrument

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.

ParameterTypeDescription
symbol *string
instrument_typestring

get_all_instruments

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.

ParameterTypeDescription
account_id
trading_filter
type_filter

search_bonds

Filtered, 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"]…

ParameterTypeDescription
bond_status
bond_type
callable
coupon_frequency
issuer
issuer_symbol
liquidity_rating
max_coupon
max_current_yield
max_liquidity_rating
max_maturity_date
max_par_value
min_coupon
min_current_yield
min_liquidity_rating
min_maturity_date
min_par_value
page_number
page_size
partial_par
perpetual
rating
rating_category
sort_direction
sort_property
sp_creditwatch
sp_outlook
treasury_subtype

get_bond_details

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.

ParameterTypeDescription
symbol *string
account_id

get_option_expirations

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.

ParameterTypeDescription
symbol *string
account_id
instrument_typestring

get_option_chain

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.

ParameterTypeDescription
expiration_date *string
symbol *string
account_id
instrument_typestring

get_option_greeks

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.

ParameterTypeDescription
osi_symbols *array
account_id

get_option_greek

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.

ParameterTypeDescription
osi_symbol *string
account_id

get_tax_lots

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 `trading.read` scope. Args: account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set.

ParameterTypeDescription
account_id

get_tax_lots_for_symbol

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 `trading.read` scope. 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.

ParameterTypeDescription
symbol *string
account_id
price

get_tax_lots_csv

Export 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 API key to have the `trading.read` scope. Args: account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set.

ParameterTypeDescription
account_id

get_strategy_quote

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…

ParameterTypeDescription
base_symbol *string
option_legs *array
account_id
equity_leg

get_event_categories

List the categories for browsing event contracts (prediction markets). Each category carries its subcategories and the frequency filters it supports. Pass a returned `category` (and optionally `subcategory`) to get_event_summary to browse the events in it.

get_event_summary

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, related instrument symbols (e.g. BTC-CRYPTO; often empty — these are NOT the event's contracts), and `series`, the series ticker of a recurring market (e.g. "KXBTC15M"; derived from the eventSymbol, pass it to get_current_event). Pass an eventSymbol to get_event_details for its outcomes, YES/NO contracts and pricing. Results can include resolved and halted events.…

ParameterTypeDescription
category
created_within_days
display_resolved_events
event_symbols
frequencies
next_token
resolution_time_end
resolution_time_start
sorting_modestring
subcategory

get_event_details

Get full details for one event contract (prediction-market event). Returns the event's outcomes (each with its `floorStrike` when it has one), 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. Outcome ids carry no exchange prefix (e.g. "KXBALANCESHEET-EO26-6.6"); contract symbols do. Each outcome also carries shortcuts…

ParameterTypeDescription
event_symbol *string
include_all_outcomesboolean

get_event_contract_bars

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…

ParameterTypeDescription
event_id *string
period *string
symbols *array

get_current_event

Find the event of a recurring market that is trading right now. For a 15-minute "Up or Down" series such as "KXBTC15M" this is the current window: the open event of the series that closes soonest. Windows whose resolution time has passed are skipped, even though the API keeps listing them as unresolved for a few minutes after they close. Pass the returned eventSymbol to get_event_details for the YES/NO contracts and their asks, then preflight_buy_event_contract to price a buy. Args: series: Series ticker, e.g. "KXBTC15M" — the `series` field of…

ParameterTypeDescription
series *string
category
frequencystring
subcategory
wait_secondsinteger

wait_for_settlement

Wait for an event's outcome to settle and report which side won. A 15-minute window settles a few minutes after it closes, which can be longer than one call waits: on a timeout the response has status "pending" and the outcome's current state — call again to keep waiting. Once settled, the response carries the outcome (with `settledOutcome`, e.g. SETTLED_OUTCOME_YES), `winner` (the contract symbol that paid out, absent for any settlement other than YES/NO), and, if contract_symbol was given, `won`. Args: event_symbol: The eventSymbol, e.g. "KALSHI.…

ParameterTypeDescription
event_symbol *string
contract_symbol
outcome_id
timeout_secondsinteger

preflight_order

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, STOP_LIMIT, MARKET_ON_CLOSE or LIMIT_ON_CLOSE. The on-close types execute at the closing auction. time_in_force: DAY or GTD. Default is DAY. quantity: Number of shares/…

ParameterTypeDescription
instrument_type *string
order_side *string
order_type *string
symbol *string
account_id
amount
equity_market_session
expiration_time
limit_price
open_close_indicator
quantity
stop_price
tax_lot_matching_instructions
time_in_forcestring

preflight_multileg_order

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",…

ParameterTypeDescription
legs *array
limit_price *string
account_id
expiration_time
quantity
time_in_forcestring

preflight_short_order

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, STOP_LIMIT, MARKET_ON_CLOSE or LIMIT_ON_CLOSE. Default is MARKET. The on-close types execute at the closing auction. time_in_force: DAY or GTD. Default is DAY. limit_price: Required for LIMIT, STOP_LIMIT and LIMIT_ON_CLOSE orders. stop_p…

ParameterTypeDescription
quantity *string
symbol *string
account_id
equity_market_session
expiration_time
limit_price
order_typestring
stop_price
time_in_forcestring

preflight_call_credit_spread

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.…

ParameterTypeDescription
buy_contract_osi *string
limit_price *string
quantity *integer
sell_contract_osi *string
account_id
expiration_time
time_in_forcestring

preflight_call_debit_spread

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_…

ParameterTypeDescription
buy_contract_osi *string
limit_price *string
quantity *integer
sell_contract_osi *string
account_id
expiration_time
time_in_forcestring

preflight_put_credit_spread

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.…

ParameterTypeDescription
buy_contract_osi *string
limit_price *string
quantity *integer
sell_contract_osi *string
account_id
expiration_time
time_in_forcestring

preflight_put_debit_spread

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: Ac…

ParameterTypeDescription
buy_contract_osi *string
limit_price *string
quantity *integer
sell_contract_osi *string
account_id
expiration_time
time_in_forcestring

preflight_buy_event_contract

Price a buy of an event contract (a YES or NO side) without placing it. Prices a DAY limit buy of the contract. The response holds the limit price used and the preflight estimate, whose estimatedCost includes the commission and exchange fee. Does NOT place an order. Args: contract_symbol: The contract to buy, from get_event_details, e.g. "KALSHI.KXBTC15M-26OCT201200-00.Y" (".Y" = YES, ".N" = NO). Not the "-EVENTCONTRACT" symbol that get_event_contract_bars takes. quantity: Number of contracts (default "1"); at most 2 decimal places…

ParameterTypeDescription
contract_symbol *string
account_id
event_symbol
limit_price
quantitystring

place_order

Place a single-leg order (buy/sell stocks, crypto, or options). ⚠️ This executes a real trade. Before submitting, the server preflights this exact order and refuses it if the preflight fails or breaks a configured limit; when the client supports it, the user is asked to confirm. A refused order comes back with "submitted": false and is not sent. Args: symbol: Ticker symbol (e.g. "AAPL"). instrument_type: EQUITY, OPTION, or CRYPTO. order_side: BUY or SELL. order_type: MARKET, LIMIT, STOP, STOP_LIMIT, MARKET_ON_CLOSE or L…

ParameterTypeDescription
instrument_type *string
order_side *string
order_type *string
symbol *string
account_id
amount
equity_market_session
expiration_time
limit_price
open_close_indicator
order_class
quantity
stop_loss_limit_price
stop_loss_stop_price
stop_price
take_profit_limit_price
tax_lot_matching_instructions
time_in_forcestring

place_multileg_order

Place a multi-leg order (options strategies: spreads, straddles, etc.). ⚠️ This executes a real trade. Before submitting, the server preflights this exact order and refuses it if the preflight fails or breaks a configured limit; when the client supports it, the user is asked to confirm. A refused order comes back with "submitted": false and is not sent. 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): BU…

ParameterTypeDescription
legs *array
limit_price *string
quantity *integer
account_id
expiration_time
time_in_forcestring

place_call_credit_spread

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. Before submitting, the server preflights this exact spread and refuses it if the preflight fails or breaks a configured limit; when the client supports it, the user is asked to confirm. A refused order comes back with "submitted": false and is not sent. 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).…

ParameterTypeDescription
buy_contract_osi *string
limit_price *string
quantity *integer
sell_contract_osi *string
account_id
expiration_time
time_in_forcestring

place_call_debit_spread

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. Before submitting, the server preflights this exact spread and refuses it if the preflight fails or breaks a configured limit; when the client supports it, the user is asked to confirm. A refused order comes back with "submitted": false and is not sent. 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). qua…

ParameterTypeDescription
buy_contract_osi *string
limit_price *string
quantity *integer
sell_contract_osi *string
account_id
expiration_time
time_in_forcestring

place_put_credit_spread

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. Before submitting, the server preflights this exact spread and refuses it if the preflight fails or breaks a configured limit; when the client supports it, the user is asked to confirm. A refused order comes back with "submitted": false and is not sent. 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). qua…

ParameterTypeDescription
buy_contract_osi *string
limit_price *string
quantity *integer
sell_contract_osi *string
account_id
expiration_time
time_in_forcestring

place_put_debit_spread

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. Before submitting, the server preflights this exact spread and refuses it if the preflight fails or breaks a configured limit; when the client supports it, the user is asked to confirm. A refused order comes back with "submitted": false and is not sent. 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:…

ParameterTypeDescription
buy_contract_osi *string
limit_price *string
quantity *integer
sell_contract_osi *string
account_id
expiration_time
time_in_forcestring

place_short_order

Place an equity short-sale order. ⚠️ This executes a real trade. Before submitting, the server preflights this exact order and refuses it if the preflight fails or breaks a configured limit; when the client supports it, the user is asked to confirm. A refused order comes back with "submitted": false and is not sent. Args: symbol: Ticker symbol to short (e.g. "AAPL"). quantity: Number of shares to short. order_type: MARKET, LIMIT, STOP, STOP_LIMIT, MARKET_ON_CLOSE or LIMIT_ON_CLOSE. Default is MARKET. The on-close types execute…

ParameterTypeDescription
quantity *string
symbol *string
account_id
equity_market_session
expiration_time
limit_price
order_typestring
stop_price
time_in_forcestring

flatten_and_go_short

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. Each order is preflighted just before it is sent. The server preflights the flatten (a MARKET sell of the whole long position) and asks the user to confirm the whole workflow when the client supports it. After the flatten fills, it preflights the short and checks it against the configured limits. If that ch…

ParameterTypeDescription
short_quantity *string
symbol *string
account_id
equity_market_session
expiration_time
flatten_timeoutnumber
limit_price
order_typestring
stop_price
time_in_forcestring

cancel_order

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.

ParameterTypeDescription
order_id *string
account_id

cancel_and_replace_order

Atomically cancel an existing order and replace it with new parameters. ⚠️ This modifies an existing order. Before submitting, the server looks up the original order, preflights the replacement and refuses it if the preflight fails or breaks a configured limit; when the client supports it, the user is asked to confirm. A refused request comes back with "submitted": false and the original order is left as it was. Supported for equity, option, and crypto quantity orders. Args: order_id: UUID of the existing order to cancel and replace. orde…

ParameterTypeDescription
order_id *string
order_type *string
account_id
amount
expiration_time
limit_price
quantity
stop_price
time_in_forcestring

buy_event_contract

Buy an event contract (a YES or NO side of a prediction market) with a DAY limit order. ⚠️ This executes a real trade. Before submitting, the server preflights this exact order and refuses it if the preflight fails or breaks a configured limit; when the client supports it, the user is asked to confirm. A refused order comes back with "submitted": false and is not sent. For a recurring market such as a 15-minute window, find the window with get_current_event, its contracts with get_event_details, and the result with wait_for_settlement. Args: c…

ParameterTypeDescription
contract_symbol *string
account_id
event_symbol
limit_price
quantitystring