Skip to Content

Convert Position

This API allows you to convert an open position from one product type to another.

USE CASE

Change the product type of an open position without closing it and placing a new order.

Note

CNC and MTF positions cannot be converted. You also cannot convert positions to MTF.

Details

  • This allows the user to convert an open position from one product type to another.
  • symbol takes the position id, for example NSE:SBIN-EQ-INTRADAY. Get it from Get Positions.
  • overnight: send 1 if the position is a carry forward position. Send 0 if the position was taken today, whatever its product type.
  • positionSide: 1 for open long positions and -1 for open short positions.
  • convertQty is the quantity to convert. For derivatives it has to be a multiple of the lot size.
  • A request that is not allowed returns an error message, for example that a CNC position cannot be converted to INTRADAY or MARGIN.
  • Rate limits differ between the Standard and Prime plans. See Plans & rate limits.

Request Attributes

AttributeData TypeDescription
symbol*string
  • Mandatory. pass the position id here
  • Eg: NSE:SBIN-EQ-INTRADAY
overnight*intMandatory. if the position to be converted is a carry forward position, then send overnight flag as 1. If the position is taken today, irrespective of its product type, then send overnight flag as 0
positionSide*int
  • Mandatory.
  • 1 => Open long positions
  • -1 => Open short positions View Details
convertQty*intMandatory. Quantity to be converted. Has to be in multiples of lot size for derivatives
convertFrom*string
  • Mandatory. Existing productType
  • (CNC positions cannot be converted)
  • View Details
convertTo*string

Notes

  • CNC and MTF positions cannot be converted.
  • You cannot convert positions to MTF.

Response Attributes

AttributeData TypeDescription
sstringok / error
codeintThis is the code to identify specific responses
messagestring
  • Message to clarify the request status.
  • Eg: You cannot convert CNC position to INTRADAY / MARGIN.
Last updated on