Skip to Main Content

Transaction Type Codes

Values for the buy_or_sell field, indicating order direction.

Overview

The buy_or_sell field appears in Place Order, Modify Order, and order/trade book responses. It's a single-character code — not a full word.

Codes

CodeTransaction TypeDescription
BBuyBuy order — opens or adds to a long position, or closes a short.
SSellSell order — opens or adds to a short position, or closes a long.

For Exit Order, the direction is inferred from the existing position, not passed explicitly.

Usage example

json
{
  "buy_or_sell": "B",
  "exch": "NSE",
  "tsym": "CANBK-EQ",
  "qty": "1"
}

See Order Type Codes for the paired price_type field, and Product Type Codes for product_type.