Place Order
/NorenWClientAPI/PlaceOrderAuthorization token is required. Enter your access_token from GenAcsTok above.
"Use proxy" sends this request through this website's server, which never logs request or response bodies. Infinn sees the docs server's IP, not yours. Turn it off to send directly from your browser instead.
jData fields
Values are sent as a JSON string in the jData form field.
Logged in User Id
- Example:
YOUR_USER_ID - Where to get it: The ID you log in with at trade.infinn.in (User ID = Client ID). Also returned as uid by GenAcsTok.
Login users account ID
- Example:
YOUR_USER_ID - Where to get it: Same as User ID for individual accounts. Returned by GenAcsTok / UserDetails.
Exchange (Select from ‘exarr’ Array provided in User Details response)
- Example:
NSE - Where to get it: 'exarr' array in the UserDetails response.
- Allowed: NSE, NFO, BSE, MCX, CDS, NCX, BFO, BCD
Unique id of contract on which order to be placed. (use url encoding to avoid special char error for symbols like M&M)
- Example:
RELIANCE-EQ - Where to get it: SearchScrip reply, or the TradingSymbol column of the exchange symbol file.
Order Quantity
- Example:
1 - Where to get it: Quantity in units (for F&O a multiple of the lot size).
Order Price (if prctyp = 'MKT/ SL-MKT' then the price will be '0')
- Example:
1000 - Where to get it: Your limit price. Use "0" for MKT / SL-MKT orders.
Only to be sent in case of SL-LMT / SL-MKT order.
- Example:
995 - Where to get it: Trigger price, only for SL-LMT / SL-MKT orders.
Disclosed quantity (Max 10% for NSE, and 50% for MCX)
C-Delivery, M-Margin, H-Cover Order, I-Intraday, B-Bracket order, F-MTF, S-Special, P-Special2
- Example:
C - Allowed: C = Delivery, M = Margin, H = Cover, I = Intraday, B = Bracket, F = MTF, S = Special, P = Special2
B -> BUY, S -> SELL
- Example:
B - Allowed: B = buy, S = sell
LMT / MKT / SL-LMT / SL-MKT / DS / 2L / 3L
- Example:
LMT - Allowed: LMT, MKT, SL-LMT, SL-MKT, DS, 2L, 3L
Market order protection percentage. Applicable only for MKT orders in BSE/BFO/BCS and MCX segments.
Retention type (Show options as per allowed exchanges)
- Example:
DAY - Allowed: DAY, EOS, IOC
Any tag by user to mark order.
- Example:
my-order-tag - Where to get it: Any tag you choose to mark the order.
Used to generate exchange info fields.
- Example:
API - Allowed: MOB, WEB, TT, API
Book Profit Price applicable only if product is selected as B (Bracket order)
Book loss Price applicable only if product is selected as H and B (High Leverage and Bracket order)
Trailing Price applicable only if product is selected as H and B (High Leverage and Bracket order)
External remarks
Cli Order Id
Channel
User Agent
App Install Id
The message "Invalid AMO" will be displayed if the "amo" field is not sent with a "Yes" value. If amo is not required, do not send this field.
Trading symbol of second leg, mandatory for price type 2L and 3L
Transaction type of second leg, mandatory for price type 2L and 3L
Quantity for second leg, mandatory for price type 2L and 3L
Price for second leg, mandatory for price type 2L and 3L
Trading symbol of third leg, mandatory for price type 3L
Transaction type of third leg, mandatory for price type 3L
Quantity for third leg, mandatory for price type 3L
Price for third leg, mandatory for price type 3L
Instrument Name
Client IP address
Cautionary message
Authorization Token
Required for all API calls. Use the access_token from the GenAcsTok response as a Bearer token.
⚠ When "Use proxy" is on, this token is sent through this website's server on its way to Infinn. It is never logged here, but if you would rather it never leave your browser, turn off "Use proxy" above or use the ready code with your own client instead.
Request to be POSTed to url : /NorenWClientAPI/PlaceOrder
Request Details
| Parameter Name | Possible value | Description |
|---|---|---|
| jData* | Should send json object with fields in below list | |
| Authorization* | Bearer <access_token> | access_token from GenAcsTok response. Required for all API calls. |
| Json Fields | Possible value | Description |
|---|---|---|
| uid* | Logged in User Id | |
| actid* | Login users account ID | |
| exch* | NSE / NFO / BSE / MCX / CDS / NCX / BFO / BCD | Exchange (Select from ‘exarr’ Array provided in User Details response) |
| tsym* | Unique id of contract on which order to be placed. (use url encoding to avoid special char error for symbols like M&M) | |
| qty* | Order Quantity | |
| prc* | Order Price (if prctyp = 'MKT/ SL-MKT' then the price will be '0') | |
| trgprc | Only to be sent in case of SL-LMT / SL-MKT order. | |
| dscqty | Disclosed quantity (Max 10% for NSE, and 50% for MCX) | |
| prd* | C / M / H / I / B / F / S / P | C-Delivery, M-Margin, H-Cover Order, I-Intraday, B-Bracket order, F-MTF, S-Special, P-Special2 |
| trantype* | B / S | B -> BUY, S -> SELL |
| prctyp* | LMT / MKT / SL-LMT / SL-MKT / DS / 2L / 3L | |
| mkt_protection | Market order protection percentage. Applicable only for MKT orders in BSE/BFO/BCS and MCX segments. | |
| ret* | DAY / EOS / IOC | Retention type (Show options as per allowed exchanges) |
| remarks | Any tag by user to mark order. | |
| ordersource | MOB / WEB / TT / API | Used to generate exchange info fields. |
| bpprc | Book Profit Price applicable only if product is selected as B (Bracket order) | |
| blprc | Book loss Price applicable only if product is selected as H and B (High Leverage and Bracket order) | |
| trailprc | Trailing Price applicable only if product is selected as H and B (High Leverage and Bracket order) | |
| ext_remarks | External remarks | |
| cl_ord_id | Cli Order Id | |
| channel | Channel | |
| usr_agent | User Agent | |
| app_inst_id | App Install Id | |
| amo | Yes | The message "Invalid AMO" will be displayed if the "amo" field is not sent with a "Yes" value. If amo is not required, do not send this field. |
| tsym2 | Trading symbol of second leg, mandatory for price type 2L and 3L | |
| trantype2 | Transaction type of second leg, mandatory for price type 2L and 3L | |
| qty2 | Quantity for second leg, mandatory for price type 2L and 3L | |
| prc2 | Price for second leg, mandatory for price type 2L and 3L | |
| tsym3 | Trading symbol of third leg, mandatory for price type 3L | |
| trantype3 | Transaction type of third leg, mandatory for price type 3L | |
| qty3 | Quantity for third leg, mandatory for price type 3L | |
| prc3 | Price for third leg, mandatory for price type 3L | |
| instname | Instrument Name | |
| ipaddr | Client IP address | |
| cau_msg | Cautionary message |
Example
curl https://apitest.kambala.co.in/NorenWClientAPI/PlaceOrder \
-d "jData={\"uid\":\"VIDYA\", \"actid\":\"CLIENT1\", \"exch\":\"NSE\", \"tsym\":\"ACC-EQ\", \"qty\":\"50\", \"price\":\"1400\", \"prd\":\"H\", \"trantype\":\"B\", \"prctyp\":\"LMT\", \"ret\":\"DAY\"}"Response Details
Response data will be in json format with below fields:
| Json Fields | Possible value | Description |
|---|---|---|
| stat | Ok or Not_Ok | Place order success or failure indication. |
| request_time | Response received time. | |
| norenordno | It will be present only on successful Order placement to OMS. | |
| emsg | This will be present only if Order placement fails |
Sample Success Response
{
"request_time": "10:48:03 20-05-2020",
"stat": "Ok",
"norenordno": "20052000000017"
}Sample Failure Response
{
"stat": "Not_Ok",
"request_time": "20:40:01 19-05-2020",
"emsg": "Error Occurred : 2 \"invalid input\""
}
</details>
<details>
<summary><strong>Ready code — single order</strong></summary>
Default values are filled in. Change only the access token and user ID, then run it.
```python
import json, requests
# ---- Change only what you need ----
ACCESS_TOKEN = "PASTE_ACCESS_TOKEN_HERE"
UID = "YOUR_USER_ID" # e.g. IN517
order = {
"uid": UID,
"actid": UID,
"exch": "NSE",
"tsym": "RELIANCE-EQ", # trading symbol
"qty": "1",
"prc": "1000", # "0" for market order
"prctyp": "LMT", # LMT / MKT / SL-LMT / SL-MKT
"trantype": "B", # B = buy, S = sell
"prd": "C", # C = CNC, I = MIS, M = NRML
"ret": "DAY",
}
# ------------------------------------
response = requests.post(
"https://api.infinn.in/NorenWClientAPI/PlaceOrder",
headers={"Content-Type": "text/plain", "Authorization": f"Bearer {ACCESS_TOKEN}"},
data="jData=" + json.dumps(order),
)
print(response.json()) # {"stat":"Ok","norenordno":"..."}Ready code — Multi-Order (several orders together)
Checks the margin for all orders together with GetBasketMargin (first order on top, the rest in basketlists), then places each order with PlaceOrder.
import json, requests
# ---- Change only what you need ----
ACCESS_TOKEN = "PASTE_ACCESS_TOKEN_HERE"
UID = "YOUR_USER_ID" # e.g. IN517
orders = [
{"exch": "NSE", "tsym": "RELIANCE-EQ", "qty": "1", "prc": "1000", "prctyp": "LMT", "trantype": "B", "prd": "C"},
{"exch": "NSE", "tsym": "SBIN-EQ", "qty": "1", "prc": "500", "prctyp": "LMT", "trantype": "B", "prd": "C"},
{"exch": "NSE", "tsym": "INFY-EQ", "qty": "1", "prc": "1200", "prctyp": "LMT", "trantype": "B", "prd": "C"},
]
# ------------------------------------
URL = "https://api.infinn.in/NorenWClientAPI/"
HEADERS = {"Content-Type": "text/plain", "Authorization": f"Bearer {ACCESS_TOKEN}"}
# 1. Margin for all orders together (first order on top, the rest in basketlists)
margin = requests.post(URL + "GetBasketMargin", headers=HEADERS,
data="jData=" + json.dumps({"uid": UID, "actid": UID, **orders[0],
"basketlists": orders[1:]})).json()
print("Basket margin:", margin)
# 2. Place every order
for o in orders:
r = requests.post(URL + "PlaceOrder", headers=HEADERS,
data="jData=" + json.dumps({"uid": UID, "actid": UID, **o, "ret": "DAY"})).json()
print(o["tsym"], "->", r)Ready code — multi-leg order (2L / 3L)
Two or three legs are sent as one order. 2L / 3L must be enabled on the account. The allowed order types are listed in orarr from User Details.
import json, requests
# ---- Change only what you need ----
ACCESS_TOKEN = "PASTE_ACCESS_TOKEN_HERE"
UID = "YOUR_USER_ID" # e.g. IN517
order = {
"uid": UID, "actid": UID, "exch": "NFO", "prd": "M", "ret": "DAY",
"prctyp": "2L", # 2L = two legs, 3L = three legs
# leg 1
"tsym": "LEG1_SYMBOL", "trantype": "B", "qty": "75", "prc": "100",
# leg 2
"tsym2": "LEG2_SYMBOL", "trantype2": "S", "qty2": "75", "prc2": "80",
# leg 3 (only for 3L)
# "tsym3": "LEG3_SYMBOL", "trantype3": "B", "qty3": "75", "prc3": "60",
}
# ------------------------------------
response = requests.post(
"https://api.infinn.in/NorenWClientAPI/PlaceOrder",
headers={"Content-Type": "text/plain", "Authorization": f"Bearer {ACCESS_TOKEN}"},
data="jData=" + json.dumps(order),
)
print(response.json())| Field | Meaning |
|---|---|
prctyp | 2L for two legs, 3L for three legs |
tsym trantype qty prc | Leg 1 |
tsym2 trantype2 qty2 prc2 | Leg 2 |
tsym3 trantype3 qty3 prc3 | Leg 3 (only for 3L) |
curl --request POST \
--url 'https://api.infinn.in/NorenWClientAPI/PlaceOrder' \
--header 'Authorization: Bearer PASTE_ACCESS_TOKEN_HERE' \
--header 'Content-Type: text/plain' \
--data 'jData={"uid":"YOUR_USER_ID","actid":"YOUR_USER_ID","exch":"NSE","tsym":"RELIANCE-EQ","qty":"1","prc":"1000","prd":"C","trantype":"B","prctyp":"LMT","ret":"DAY"}'