Skip to main content

Order Tools

Placing orders

ToolDescription
place_orderSingle order (MKT, LMT, STP, STP LMT, TRAIL, REL, MIT, MOC, LOC, PEG MID)
place_bracket_orderSimple bracket: entry + take profit + stop loss
place_advanced_bracketFull bracket with OCA group, trailing stop support, any order types
Always prefer place_advanced_bracket for bracket orders. It handles OCA linking, trailing stops, and proper bracket construction.

Managing orders

ToolDescription
modify_orderModify an open order in-place (preserves bracket/OCA links)
cancel_orderCancel a specific order by ID
cancel_all_ordersCancel all open orders globally

Viewing orders

ToolDescription
get_open_ordersAll working orders with status
get_completed_ordersFilled/cancelled orders with fill details
get_executionsToday’s fills with commissions and realized P&L
orders_historyHistorical orders from local database
executions_historyHistorical executions from local database

Emergency

ToolDescription
flatten_positionsClose ALL positions at market + cancel all orders
flatten_configGet/set EOD auto-flatten schedule