Product Conversion
Position conversion is the process of converting the Intraday position to overnight and the overnight position to Intraday
POST: /apiV2/productConversion
https://connect.thefirstock.com/apiV2/productConversion
Request Details
Parameter |
Description |
exchange |
Exchange |
quantity |
Quantity to be converted. |
userId |
User id of the logged in user. |
product |
C / M / I Product to which the user wants to convert position. |
previousProduct |
C / M / I Original product of the position. |
transactionType |
B / S B -> BUY, S -> SELL |
positionType |
Day / CF Converting Day or Carry forward position |
jKey |
Key Obtained on login success. |
tradingSymbol |
Trading Symbol (use url encoding to avoid special char error for symbols like M&M) NSE NFO. |
Code
curl -X POST 'https://connect.thefirstock.com/apiV2/productConversion' \
-H 'Content-Type: application/json' \
-d '{
"userId": "",
"exchange": "",
"tradingSymbol": "",
"quantity": "",
"product": "",
"transactionType": "",
"positionType": "",
"previousProduct": "",
"jKey": ""
}'
from thefirstock import thefirstock
convertProduct = thefirstock.firstock_ConvertProduct(
transactionType="",
tradingSymbol="",
quantity="",
product="",
previousProduct="",
positionType="",
exchange=""
)
const Firstock = require('thefirstock');
const firstock = new Firstock();
firstock.productConversion({
exchange: "",
tradingSymbol: "",
quantity: "",
product: "",
previousProduct: "",
transactionType: "",
positionType: ""
}, (err, result) => {
console.log("Error, ", err)
console.log("Result: ", result)
})
using thefirstock;
class Program
{
public static void Main()
{
Firstock firstock = new Firstock();
var result = firstock.productConversion(
exchange: "NFO",
tradingSymbol: "BANKNIFTY28APR22C37400",
quantity: "250",
product: "I",
previousProduct: "M",
transactionType: "B",
positionType: "CF"
);
}
}
Success Response Details
Parameter |
Description |
data.status |
Ok |
Status |
Success |
data.requestTime |
Response received time. |
Failure Response Details
Parameter |
Description |
Status |
Failed |
data |
Type of error |
Sample Response