Orderbook
Get all orders placed for the current trading day with statistics.
Endpoint URL
Local Host : POST http://127.0.0.1:5000/api/v1/orderbook
Ngrok Domain : POST https://<your-ngrok-domain>.ngrok-free.app/api/v1/orderbook
Custom Domain: POST https://<your-custom-domain>/api/v1/orderbookSample API Request
{
"apikey": "<your_app_apikey>"
}Sample cURL Request
curl -X POST http://127.0.0.1:5000/api/v1/orderbook \
-H 'Content-Type: application/json' \
-d '{
"apikey": "<your_app_apikey>"
}'Sample API Response
Request Body
apikey
Your OpenAlgo API key
Mandatory
-
OrderbookSchema declares only apikey. Any other field returns HTTP 400.
Response Fields
status
string
"success" or "error"
data
object
Order book data
Data Object Fields
orders
array
Array of order objects
statistics
object
Order statistics summary
Order Object Fields
orderid
string
Unique order ID
symbol
string
Trading symbol
exchange
string
Exchange code
action
string
BUY or SELL
quantity
string
Order quantity
price
number
Order price
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
timestamp
string
Order placement time
Statistics Object Fields
total_buy_orders
number
Total buy orders placed
total_sell_orders
number
Total sell orders placed
total_completed_orders
number
Orders fully executed
total_open_orders
number
Pending/open orders
total_rejected_orders
number
Rejected orders
Order Status Values
complete
Order fully executed
open
Order pending execution
pending
Trigger order waiting
rejected
Order rejected
cancelled
Order cancelled
Notes
Returns all orders for the current day
Includes completed, cancelled, and rejected orders
Statistics provide a quick summary
Use order IDs for modify/cancel operations
Back to: API Documentation
Last updated