Portfolio

Convert Positions

Convert the margin product of an open position

put/v2/portfolio/convert-position

Request

  • Base URL: https://api-v2.upstox.com
  • URL: https://api-v2.upstox.com/v2/portfolio/convert-position
  • Auth: OAuth 2 (authorization code, authorization URL https://api-v2.upstox.com/v2/login/authorization/dialog, token URL https://api-v2.upstox.com/v2/login/authorization/token)

Request body

instrument_tokenstring required

Key of the instrument

new_product'I' | 'D' | 'CO' | 'OCO' | 'MTF' required

Indicates the new product to use for the convert positions

old_product'I' | 'D' | 'CO' | 'OCO' | 'MTF' required

Indicates the old product to use for the convert positions

transaction_type'BUY' | 'SELL' required

Indicates whether its a buy(b) or sell(s) order

quantityinteger required

Quantity with which the position to convert

Example request

{
  "new_product": "D",
  "old_product": "I",
  "transaction_type": "BUY",
  "quantity": 1
}

Response

Successful

status'success' | 'error' | 'partial_success'

Example response

{
  "data": {
    "status": "complete"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.