Skip to content

TradeBook ​

Get all executed trades for the current trading day.

Endpoint URL ​

http
Local Host   :  POST http://127.0.0.1:5000/api/v1/tradebook
Ngrok Domain :  POST https://<your-ngrok-domain>.ngrok-free.app/api/v1/tradebook
Custom Domain:  POST https://<your-custom-domain>/api/v1/tradebook

Sample API Request ​

json
{
  "apikey": "<your_app_apikey>"
}

Sample cURL Request ​

bash
curl -X POST http://127.0.0.1:5000/api/v1/tradebook \
  -H 'Content-Type: application/json' \
  -d '{
  "apikey": "<your_app_apikey>"
}'

Sample API Response ​

json
{
  "status": "success",
  "data": [
    {
      "action": "BUY",
      "symbol": "RELIANCE",
      "exchange": "NSE",
      "orderid": "250408000989443",
      "product": "MIS",
      "quantity": 0.0,
      "average_price": 1180.1,
      "timestamp": "13:58:03",
      "trade_value": 1180.1
    },
    {
      "action": "SELL",
      "symbol": "NHPC",
      "exchange": "NSE",
      "orderid": "250408001086129",
      "product": "MIS",
      "quantity": 0.0,
      "average_price": 83.74,
      "timestamp": "14:28:49",
      "trade_value": 83.74
    }
  ]
}

Request Body ​

ParameterDescriptionMandatory/OptionalDefault Value
apikeyYour Tradeboard API keyMandatory-

TradebookSchema declares only apikey. Any other field returns HTTP 400.

Response Fields ​

FieldTypeDescription
statusstring"success" or "error"
dataarrayArray of trade objects

Trade Object Fields ​

FieldTypeDescription
orderidstringOrder ID that generated this trade
symbolstringTrading symbol
exchangestringExchange code
actionstringBUY or SELL
quantitynumberTraded quantity
average_pricenumberExecution price
productstringMIS, CNC, NRML
timestampstringTrade execution time
trade_valuenumberTotal trade value (quantity × price)

Notes ​

  • Contains only executed trades (not pending orders)
  • A single order may have multiple trades (partial fills)
  • trade_value is the monetary value of the trade
  • Use for trade reconciliation and P&L calculation
  • Trades are sorted by execution time

Difference: OrderBook vs TradeBook ​

AspectOrderBookTradeBook
ContainsAll orders (including pending)Only executed trades
Multiple entriesOne per orderOne per fill (partial fills)
ShowsOrder statusExecution details

Back to: API Documentation