Command Reference
Every OpenAlgo CLI command, the API endpoint it calls, and an example
The CLI is generated from a curated OpenAPI description of the OpenAlgo v1 API, so the installed binary is always the authoritative reference:
openalgo --help-all # full reference for every command
openalgo order --help # commands in one group
openalgo order place --help # flags for one command
openalgo order place --schema # response fields, without calling the API--help marks required flags and lists the allowed values for enum flags such as --exchange, --product, --pricetype, and --action. Values outside the list are rejected before any request is sent.

Conventions
Every parameter is a
--flag. Flag names are the API field names in kebab-case:trigger_priceis--trigger-price,position_sizeis--position-size,expiry_dateis--expiry-date,strategy_idis--strategy-id.Endpoint paths below are relative to
/api/v1. The CLI adds the API key to every request.Commands that take a
strategyfield (order,gtt,position get,position close-all,option order,option multi-order) default--strategytoopenalgo-cli, so CLI orders are easy to find in the order book. It is a tag, not a filter.Commands that change state accept
--dry-run. See Output, Errors and Automation.--expiry-dateacceptsDDMMMYY(27OCT26) or theDD-MMM-YYform thatsymbol expiryprints (27-OCT-26).Symbols use the OpenAlgo format: equity
SBIN, futureNIFTY27OCT26FUT, optionNIFTY27OCT2626000CE. See Order Constants.
Global Flags
--csv
Output as CSV
--jq <expr>
Filter output with a jq expression (no external jq needed)
-p, --profile <name>
Config profile to use
-q, --quiet
Suppress non-data output (warnings, hints, color)
--schema
Show the response schema for the command and exit
--timeout <seconds>
HTTP request timeout. Default 30.
-v, --verbose
Show HTTP request details on stderr
--debug
Show HTTP request and response headers and bodies on stderr, API key redacted
--trace
Show the HTTP timing breakdown on stderr (DNS, TLS, TTFB)
--help-all
Print the full reference for every command
--version
Print the CLI version
Orders
order place
/placeorder
Place an order
order smart
/placesmartorder
Place an order sized against the current position (--position-size)
order basket
/basketorder
Place several orders at once (--orders JSON array)
order split
/splitorder
Split a large order into child orders of --splitsize
order modify
/modifyorder
Modify an open order
order cancel
/cancelorder
Cancel one order
order cancel-all
/cancelallorder
Cancel every open order in the account
order status
/orderstatus
Status of one order
order list
/orderbook
Order book
order trades
/tradebook
Trade book
When --product or --pricetype is omitted the server applies MIS and MARKET. SL and SL-M orders need --trigger-price. order modify sends --disclosed-quantity 0 and --trigger-price 0 unless you set them.
GTT Orders
gtt place
/placegttorder
Place a GTT order (SINGLE or OCO; CNC or NRML only)
gtt modify
/modifygttorder
Modify an active GTT order
gtt cancel
/cancelgttorder
Cancel an active GTT order
gtt list
/gttorderbook
List GTT triggers (--status active or all)
Positions
position list
/positionbook
Position book
position get
/openposition
Open quantity for one symbol
position close-all
/closeposition
Square off every open position in the account
Options
option order
/optionsorder
Place an option order by strike offset (ATM, ITM1 to ITM50, OTM1 to OTM50)
option multi-order
/optionsmultiorder
Multi-leg option order (--legs JSON array, 1 to 20 legs)
option symbol
/optionsymbol
Resolve an option symbol from an offset
option chain
/optionchain
Option chain, optionally with Greeks
option greeks
/optiongreeks
Implied volatility and Greeks for one option
option multi-greeks
/multioptiongreeks
Greeks for up to 50 options
option synthetic-future
/syntheticfuture
Synthetic future price
F&O quantities must be a multiple of the lot size. Check it with openalgo symbol get --symbol <symbol> --exchange NFO --jq .data.lotsize.
Strategies
These commands operate the Strategy Module.
strategy list
/strategy/list
List strategies (--status, --query)
strategy status
/strategy/status
One strategy's configuration and current run
strategy start
/strategy/start
Start a run with --mode sandbox or --mode live
strategy stop
/strategy/stop
Stop a run
strategy close-all
/strategy/close_all
Exit every open leg of a strategy run
strategy close-leg
/strategy/close_leg
Exit one leg
strategy runs
/strategy/runs
Run history
strategy orders
/strategy/orders
Orders placed by a strategy
strategy events
/strategy/events
Risk and lifecycle event log (--severity, --kind, --run-id)
--mode is exact and case-sensitive. live places real orders.
Account
account funds
/funds
Available cash and margin used
account holdings
/holdings
Demat holdings
account margin
/margin
Margin required for a basket of positions (--positions JSON array)
Market Data
data quote
/quotes
Quote for one symbol
data quotes
/multiquotes
Quotes for several symbols (--symbols JSON array)
data depth
/depth
Market depth
data history
/history
Historical candles (--source api or db for local Historify data)
data intervals
/intervals
Intervals the broker supports
data ticker
/ticker/{symbol}
Ticker-compatible candles, JSON or text (--format)
Symbols
symbol get
/symbol
Symbol details, including lot size and tick size
symbol search
/search
Search symbols
symbol expiry
/expiry
Expiry dates for futures or options
symbol instruments
/instruments
Instrument master download (JSON or --format csv)
Market Calendar
market holidays
/market/holidays
Exchange holidays for a year
market timings
/market/timings
Trading sessions for a date
Analyzer (Sandbox) Mode
analyzer status
/analyzer
Whether the server is in analyzer mode
analyzer toggle
/analyzer/toggle
Switch analyzer mode on (--mode=true) or off (--mode=false)
analyzer pnl
/pnl/symbols
Sandbox P&L by symbol
Analyzer mode belongs to the server. While it is on, the server simulates orders against live market data, and positions, funds, and the order book reflect the sandbox. In analyzer mode, MIS orders are refused after the square-off time (15:15 IST by default) until the next session; use CNC for equity and NRML for futures and options. See API Analyzer.
Notifications
telegram config get
GET /telegram/config
Telegram bot configuration
telegram config set
POST /telegram/config
Update the bot configuration
telegram start
/telegram/start
Start the Telegram bot
telegram stop
/telegram/stop
Stop the Telegram bot
telegram users
GET /telegram/users
Linked Telegram users
telegram stats
GET /telegram/stats
Bot usage statistics
telegram broadcast
/telegram/broadcast
Send a message to all users
telegram notify
/telegram/notify
Send a message to one user
telegram preferences get
GET /telegram/preferences
One user's notification preferences
telegram preferences set
POST /telegram/preferences
Update one user's preferences
whatsapp notify
/whatsapp/notify
Send a WhatsApp message
Utilities
ping
/ping
Check that the API key resolves to an active broker session
chart get
GET /chart
Chart workspace preferences
chart set
POST /chart
Merge keys into chart preferences (--preferences JSON object)
doctor
None (runs checks)
Check configuration, connectivity, broker session, and analyzer mode
update
None
Check for and install CLI updates (--check, --yes)
version
None
Print the CLI version
completion
None
Shell completion scripts for bash, zsh, fish, and PowerShell
Last updated
Was this helpful?