Orders
Place, modify and cancel orders, and check the order book and order history. Ask your AI client in plain language; it picks the tool.
create_order
Place new trading orders (buy/sell) with market, limit, stop-loss, and stop-limit support. Use for executing orders, setting price targets, stop-losses, and profit levels. Check funds and positions before placing orders.
Example prompts
- “Buy 10 shares of SBIN at market price.”
- “Place a limit order to buy 5 INFY at 1,450 with a stop-loss at 1,420.”
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
disclosedQty | number | yes | Disclosed quantity (0 for no disclosure) |
limitPrice | number | yes | Limit price for the order (required for all order types) |
offlineOrder | string | yes | Offline order flag: ‘true’ or ‘false’ |
orderTag | string | no | Optional order tag (alphanumeric only) |
productType | string | yes | Product type: CNC (delivery), INTRADAY, MARGIN |
qty | number | yes | Order quantity |
side | number | yes | Order side: 1=Buy, -1=Sell |
stopLoss | number | yes | Stop loss price (0 if not applicable) |
stopPrice | number | yes | Stop price for the order (required for all order types) |
symbol | string | yes | Trading symbol (e.g., NSE:SBIN-EQ) |
takeProfit | number | yes | Take profit price (0 if not applicable) |
type | number | yes | Order type: 1=Limit, 2=Market, 3=Stop (SL-M), 4=Stoplimit (SL-L) |
validity | string | yes | Order validity: DAY (valid for current day), IOC (Immediate or Cancel) |
modify_order
Modify a pending order. Only provide the fields you want to change — unset fields keep their original values.
Example prompts
- “Change the limit price of my pending TCS order to 3,900.”
- “Increase the quantity of my pending SBIN order to 20.”
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
disclosedQty | number | no | New disclosed quantity (optional) |
id | string | yes | Order ID to modify |
limitPrice | number | no | New limit price (required for Limit/StopLimit order types) |
qty | number | no | New quantity (omit to keep original) |
stopPrice | number | no | New stop price (required for Stop/StopLimit order types) |
type | number | yes | Order type: 1=Limit, 2=Market, 3=Stop (SL-M), 4=StopLimit (SL-L) |
cancel_order
Cancel a specific trading order by order ID. Use to cancel pending orders that are no longer needed.
Example prompts
- “Cancel my pending order for RELIANCE.”
- “Cancel the buy order I placed for HDFCBANK.”
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
orderId | string | yes | Order ID to cancel |
create_multi_order
Place multiple orders simultaneously (up to 10 orders) for more efficient batch execution. Useful for creating spreads, pairs trades, basket orders, or rebalancing portfolios with a single API call.
Example prompts
- “Place a basket order: buy 10 SBIN, 5 INFY and 2 TCS at market price.”
- “Buy one share each of the five largest banking stocks.”
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
orders | string | yes | JSON array of order objects. Each order should contain: symbol, qty, type (1=Limit, 2=Market, 3=Stop, 4=StopLimit), side (1=Buy, -1=Sell), productType, limitPrice, stopPrice, validity, disclosedQty, offlineOrder, stopLoss, takeProfit, orderTag(optional) |
modify_multi_order
Modify up to 10 pending orders simultaneously. Pass a JSON array of order modify objects, each with id, type, and optional qty/limitPrice/stopPrice.
Example prompts
- “Lower the limit price of all my pending orders by 1%.”
- “Change the quantity of my three pending orders to 10 each.”
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
orders | string | yes | JSON array of order modify objects. Each object: {“id”:“<orderId>”,“type”:<1-4>,“qty”:<optional>,“limitPrice”:<optional>,“stopPrice”:<optional>} |
get_orders
Get complete order history including pending, executed, and cancelled orders with comprehensive trading activity view. Use to display order history, check order status, track modifications, monitor trading patterns, and debug order placement issues. Whenever you call this tool, also call get_scheduled_orders tool to get the scheduled orders.
Example prompts
- “Show today’s orders and their status.”
- “Why was my last order rejected?”
get_order_history
Fetch historical order book for a date range. Auto-paginates all records. Defaults to current financial year.
Example prompts
- “Show my orders from last week.”
- “List all rejected orders this month.”
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
exchange_type | string | no | 0=All, 1=NSE, 2=BSE, 3=MCX (default: 0) |
from_date | string | no | Start date in YYYY-MM-DD format (default: start of current financial year) |
segment_type | string | no | 0=All, 1=Equity, 2=Equity Derivatives, 3=Currency Derivatives, 4=Commodity Derivatives (default: 0) |
status | string | no | 0=All, 1=Executed, 2=Cancelled, 3=Rejected (default: 0) |
symbol | string | no | Filter by trading symbol, e.g. NSE:SBIN-EQ (optional) |
to_date | string | no | End date in YYYY-MM-DD format (default: today) |
get_scheduled_orders
Get all scheduled orders including GTT (Good Till Triggered) orders and other scheduled orders. Use to view scheduled orders, check trigger conditions, and monitor pending scheduled orders.
Example prompts
- “Show my scheduled orders and their trigger conditions.”
- “Do I have any scheduled orders for RELIANCE?”