Convert Positions
API to convert your intraday positions into delivery trades or your margin trades into cash and carry, and vice versa. Position would be converted only if the required margin is available. Delivery holdings can be converted to Intraday positions only if it is purchased on the same day before the auto square off timing. Only simple order can be converted from Intraday to delivery, Special orders like CO cannot be converted from intraday to delivery.
Header Parameters
Name | Required | Type | Description |
---|---|---|---|
Authorization | true | string | Requires the format Bearer access_token where access_token is obtained from the Token API. |
Content-Type | true | string | Indicates the media type of the resource, set as application/json . |
Accept | true | string | Defines the content format the client expects, which should be set to application/json . |
Request Body
{
"instrument_token": "151064324",
"new_product": "D",
"old_product": "I",
"transaction_type": "BUY",
"quantity": 1
}
Name | Required | Type | Description |
---|---|---|---|
instrument_token | true | string | Key of the instrument. For the regex pattern applicable to this field, see the Field Pattern Appendix. |
new_product | true | string | Indicates the new product to use for the convert positions. Possible values: I , D , MTF . |
old_product | true | string | Indicates the old product to use for the convert positions. Possible values: I , D , MTF . |
transaction_type | true | string | Indicates whether its a buy(b) or sell(s) order. Possible values: BUY , SELL . |
quantity | true | int32 | Quantity with which the position to convert |
Responses
- 200
- 4XX
Response Body
{
"status": "success",
"data": {
"status": "complete"
}
}
Name | Type | Description |
---|---|---|
status | string | A string indicating the outcome of the request. Typically success for successful operations. |
data | object | Response data for convert position request |
data.status | string | Status message for convert position request |
Error codes
Error code | Description |
---|---|
UDAPI1033 | Get position data failed - There was an issue retrieving the position data. |
UDAPI1034 | Positions unavailable for given user id - No positions were found for the specified user ID. |
UDAPI1035 | Positions unavailable for given instrument key or product - No positions match the provided instrument key or product details. |
Examples
A comprehensive set of examples is provided to illustrate various use cases and implementation scenarios for this API. To view detailed examples and access sample code, please refer to: API Examples.
Loading...