Skip to Content

Exit Position by ID

This API allows you to exit specific open positions using their position IDs.

USE CASE

Close one or a few positions while leaving the rest untouched.

Details

  • id takes one position id, for example NSE:SBIN-EQ-MARGIN, or a list such as ["NSE:SBIN-EQ-INTRADAY","NSE:SBIN-EQ-CNC"].
  • Only the open positions for the ids you pass are exited. Other positions are not affected.
  • A position id is the symbol plus the product type, so the same stock held under two product types has two ids. Get them from Get Positions.
  • This uses the same DELETE /api/v3/positions endpoint as Exit Position. If id is left out, all open positions are closed.
  • Rate limits differ between the Standard and Prime plans. See Plans & rate limits.

Request Attributes

AttributeData TypeDescription
idstring or [string]
  • Optional
  • Eg: NSE:SBIN-EQ-MARGIN
  • This will only exit the open positions for a particular position id or list of position id provided like ["NSE:SBIN-EQ-INTRADAY","NSE:SBIN-EQ-CNC"]

Response Attributes

AttributeData TypeDescription
sstringRequest status, e.g. ok on success.
codeintResponse status code (e.g. 200 on success).
messagestringHuman-readable message describing the outcome, e.g. "The position is closed."
Last updated on