PlaceOrder

Header Body:

Name Description
Authorization Access token obtained in after successful login
user-Id Client id of the user

Request Body:

This API enables users to place an order for products . It typically requires details such as the items to order, quantity, and supporting information

Json Fields Possible Values Description Mandatory(M) / Optional(O) /
Condition Based (C)
Data Type
user_id User ID M str
trading_symbol Trading Symbol Name (use url encoding to avoid special char error for symbols like M&M) M str
exchange NSE / NFO / BSE/ MCX, BFO, BCD Exchange Details M str
quantity Order Quantity M int
price Order Price M float
product_type C / M / H / I / B C = CNC
M = Normal / Carry Forward
H = Cover Order
B = Bracket Order
I = Intraday
M str
transaction_type B / S B = Buy S = Sell M str
price_type LMT / MKT / SL-LMT / SL-MKT / DS / 2L / 3L LMT = Limit
MKT = Market
SL-LMT = Stoploss Limit
SL-MKT = Stoploss Market
M str
trigger_price Only to be sent in case of SL-LMT / SL-MKT order. C float
trailing_stop_loss trailing stop loss price need to pass only if product_type = B and it's not mandatory to send unless user needs C float
book_profit_price Book Profit Price applicable only if product is selected as B (Bracket order ) C float
book_loss_price Book loss Price applicable only if product is selected as H and B (High Leverage and Bracket order ) C float
retention_type DAY / EOS / IOC Retention type (Show options as per allowed exchanges) M str
disclosed_quantity Disclosed quantity (Max 10% for NSE, and 50% for MCX) O int
after_market_order YES, NO O str
lot_size Mandatory for MCX exchange only O int

Sample Response 1


									

Sample Response 2


									

Sample Response 3


									

Sample Response 4


									

POST/order-api/v1/order/place

										
cURL

Copied!

curl --location 'https://dev.cluster.apps.enrichmoney.in/order-api/v1/order/place' \ --header 'Authorization: {{jwt_token}}' \ --header 'Content-Type: application/json' \ --header 'user-id: {{userid}}' \ --data '{ "user_id": "{{userid}}", "trading_symbol": "NATURALGAS25JAN24", "exchange": "MCX", "price": 230, "transaction_type": "B", "price_type": "LMT", "quantity": "1", "disclosed_quantity": "0", "product_type": "I", "trigger_price": "0", "retention_type": "DAY", "after_market_order": "No", "remarks": "", "book_loss_price":10, "book_profit_price":15, "trailing_stop_loss": 0.0, "lot_size": 1250 }'
										
python / requests

Copied!

import requests url = "https://dev.cluster.apps.enrichmoney.in/order-api/v1/order/place" payload = "{\r\n \"user_id\": \"{{userid}}\",\r\n \"trading_symbol\": \"NATURALGAS25JAN24\",\r\n \"exchange\": \"MCX\",\r\n \"price\": 230,\r\n \"transaction_type\": \"B\",\r\n \"price_type\": \"LMT\",\r\n \"quantity\": \"1\",\r\n \"disclosed_quantity\": \"0\",\r\n \"product_type\": \"I\",\r\n \"trigger_price\": \"0\",\r\n \"retention_type\": \"DAY\",\r\n \"after_market_order\": \"No\",\r\n \"remarks\": \"\",\r\n \"book_loss_price\":10,\r\n \"book_profit_price\":15,\r\n \"trailing_stop_loss\": 0.0,\r\n \"lot_size\": 1250\r\n}" headers = { 'Authorization': '{{jwt_token}}', 'Content-Type': 'application/json', 'user-id': '{{userid}}' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
										
java / unirest

Copied!

Unirest.setTimeouts(0, 0); HttpResponse response = Unirest.post("https://dev.cluster.apps.enrichmoney.in/order-api/v1/order/place") .header("Authorization", "{{jwt_token}}") .header("Content-Type": "application/json") .header("user-id", "{{userid}}") .body("{\r\n \"user_id\": \"{{userid}}\",\r\n \"trading_symbol\": \"NATURALGAS25JAN24\",\r\n \"exchange\": \"MCX\",\r\n \"price\": 230,\r\n \"transaction_type\": \"B\",\r\n \"price_type\": \"LMT\",\r\n \"quantity\": \"1\",\r\n \"disclosed_quantity\": \"0\",\r\n \"product_type\": \"I\",\r\n \"trigger_price\": \"0\",\r\n \"retention_type\": \"DAY\",\r\n \"after_market_order\": \"No\",\r\n \"remarks\": \"\",\r\n \"book_loss_price\":10,\r\n \"book_profit_price\":15,\r\n \"trailing_stop_loss\": 0.0,\r\n \"lot_size\": 1250\r\n}") .asString();
										
nodejs / axios

Copied!

var axios = require('axios'); var data = '{\r\n "user_id": "{{userid}}",\r\n "trading_symbol": "NATURALGAS25JAN24",\r\n "exchange": "MCX",\r\n "price": 230,\r\n "transaction_type": "B",\r\n "price_type": "LMT",\r\n "quantity": "1",\r\n "disclosed_quantity": "0",\r\n "product_type": "I",\r\n "trigger_price": "0",\r\n "retention_type": "DAY",\r\n "after_market_order": "No",\r\n "remarks": "",\r\n "book_loss_price":10,\r\n "book_profit_price":15,\r\n "trailing_stop_loss": 0.0,\r\n "lot_size": 1250\r\n}'; var config = { method: 'post', maxBodyLength: Infinity, url: 'https://dev.cluster.apps.enrichmoney.in/order-api/v1/order/place', headers: { 'Authorization': '{{jwt_token}}', 'Content-Type': 'application/json', 'user-id': '{{userid}}' }, data : data }; axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); }) .catch(function (error) { console.log(error); });

Mail Us

api-support@enrichmoney.in

Call Us

044 40063663/044 35000470

Powered by Enrich Money