OrderStatus
Get the current status of a specific order by its order ID.
Endpoint URL
Local Host : POST http://127.0.0.1:5000/api/v1/orderstatus
Ngrok Domain : POST https://<your-ngrok-domain>.ngrok-free.app/api/v1/orderstatus
Custom Domain: POST https://<your-custom-domain>/api/v1/orderstatusSample API Request
{
"apikey": "<your_app_apikey>",
"orderid": "250828000185002",
"strategy": "Test Strategy"
}Sample cURL Request
curl -X POST http://127.0.0.1:5000/api/v1/orderstatus \
-H 'Content-Type: application/json' \
-d '{
"apikey": "<your_app_apikey>",
"orderid": "250828000185002",
"strategy": "Test Strategy"
}'Sample API Response
Request Body
apikey
Your OpenAlgo API key
Mandatory
-
orderid
Order ID to query
Mandatory
-
strategy
Strategy identifier
Mandatory
-
OrderStatusSchema declares exactly these three fields and all three are required. Omitting strategy returns HTTP 400, and any additional field returns HTTP 400 as well.
Response Fields
status
string
"success" or "error"
data
object
Order details object
Data Object Fields
orderid
string
Order ID
symbol
string
Trading symbol
exchange
string
Exchange code
action
string
BUY or SELL
quantity
string
Order quantity
price
number
Order price (0 for MARKET orders)
trigger_price
number
Trigger price for SL orders
pricetype
string
MARKET, LIMIT, SL, SL-M
product
string
MIS, CNC, NRML
order_status
string
Current order status
average_price
number
Average execution price
timestamp
string
Order timestamp
Order Status Values
complete
Order fully executed
open
Order pending execution
pending
Trigger order waiting for activation
rejected
Order rejected by exchange
cancelled
Order cancelled by user
Notes
Use this endpoint to track order execution status
The response's
dataobject is the matching entry from the order book, withaverage_priceadded. Any additional field a broker's order-book mapper emits therefore appears here too.average_priceis filled in from the trade book only whenorder_statusiscomplete. For open, pending, rejected, and cancelled orders it is0.0, including partially filled orders.If no order matches the given
orderid, the response is an error, not a success with an emptydataTimestamps are in IST (Indian Standard Time)
Back to: API Documentation
Last updated