Place Order
The place order API allows you to place your orders in our system.
You will get the order confirmation instantly with orderNumber.
POST: /apiV2/placeOrder
https://connect.thefirstock.com/apiV2/placeOrder
Request Details
Parameter |
Description |
userId |
User Id of the login user |
exchange |
NSE / NFO / BSE |
tradingSymbol |
Trading Symbol (use url encoding to avoid special char error for symbols like M&M) NSE NFO |
quantity |
Order Quantity |
price |
Order Price |
triggerPrice |
Only to be sent in case of SL / SL-M order |
product |
C / M / I C -> Cash and Carry, M -> F&O Normal, I -> Intraday |
transactionType |
B / S B -> BUY, S -> SELL |
priceType |
LMT / MKT / SL-LMT / SL-MKT |
retention |
DAY / EOS / IOC |
remarks |
User can send remarks for the order |
jKey |
Key Obtained on login success. |
Code
curl --X POST 'https://connect.thefirstock.com/apiV2/placeOrder' \
--H 'Content-Type: application/json' \
--d '{
"userId": "",
"exchange": "",
"tradingSymbol": "",
"quantity": "",
"price": "",
"product": "I",
"transactionType": "",
"priceType": "",
"retention": "",
"triggerPrice": "",
"remarks": "",
"jKey": ""
}'
from thefirstock import thefirstock
placeOrder = thefirstock.firstock_placeOrder(
exchange="",
tradingSymbol="",
quantity="",
price="",
product="",
transactionType="",
priceType="",
retention="",
triggerPrice="",
remarks=""
)
const Firstock = require('thefirstock');
const firstock = new Firstock();
firstock.placeOrder({
"exchange": "",
"tradingSymbol": "",
"quantity": "",
"price": "",
"product": "",
"transactionType": "",
"priceType": "",
"retention": "",
"triggerPrice": "",
"remarks": ""
}, (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.placeOrder(
exchange: "NSE",
tradingSymbol: "ITC-EQ",
quantity: "1",
price: "240",
product: "C",
transactionType: "B",
priceType: "LMT",
retention: "DAY",
triggerPrice: "",
remarks: "Strategy1");
}
}
Success Response Details
Parameter |
Description |
data.requestTime |
Response received time. |
data.orderNumber |
It will be present only on successful Order placement to OMS. |
Failure Response Details
Parameter |
Description |
Status |
Failed |
data |
Type of error |
Sample Response