400 Bad Request Error When Placing Order with AngelOneWebView (React Native + Axios)
-
Hello @sahil08
Can you please share the request body here so that we can have a look on that
Regards,
SmartAPI Team -
@Moderator_3 Sure
{
"variety": "NORMAL",
"tradingsymbol": "SBIN-EQ",
"symboltoken": "3045",
"transactiontype": "BUY",
"exchange": "NSE",
"ordertype": "MARKET",
"producttype": "DELIVERY",
"duration": "DAY",
"price": "",
"squareoff": "0",
"stoploss": "0",
"quantity": "1"
}This is my request body
-
@Moderator_3 This is my request body data
{
"variety": "NORMAL",
"tradingsymbol": "SBIN-EQ",
"symboltoken": "3045",
"transactiontype": "BUY",
"exchange": "NSE",
"ordertype": "MARKET",
"producttype": "DELIVERY",
"duration": "DAY",
"price": "",
"quantity": "1"
} -
@Moderator_3 Hey any update on this
-
@Moderator_3 @admin I have provided the request body , can you please check and provide me the solution
-
Hello @sahil08
Kindly check your header body Since you are not sending the mac address, client public IP and client locla Ip.
Kindly modify the header body then tryRegards,
SamartAPI Team -
@Moderator_3 Are those compulsory values to be passed in header? and I am using React Native and WebView , so X-SourceID should be Web or Mobile ?, please help me with it
-
Hello @sahil08
The value of headers should be as per the documentation as mentioned below
https://smartapi.angelbroking.com/docs/ResponseStructureRegards,
SmartAPI Team -
@Moderator_3 Can you help me to know , how do we get MACaddress and local ip for ios using React Native
-
Hello @sahil08
Open Cmd prompt and type ipconfig/all there you can see
-
Physical Address is the MAC address
-
IPv6 Address is the local ip
Regards,
SmartAPI Team -