Getting 400 error in REST-getCandleData API
-
I tried using getCandleData and received 400 error. Double checked Params and headers data but it seems okay to me.
API Details:
URL: https://apiconnect.angelbroking.com/rest/secure/angelbroking/historical/v1/getCandleData
Method: POST
Payload: {
exchange: "NSE",
symboltoken: "12641",
interval: "ONE_MINUTE",
fromdate: "2023-03-24 10:15",
todate: "2023-03-23 09:16",
}
headers: {
Authorization:Bearer jwtToken
,
"X-PrivateKey": "API_KEY",
Accept: "application/json, application/json",
"X-SourceID": "WEB, WEB",
"X-ClientLocalIP": "CLIENT_LOCAL_IP",
"X-ClientPublicIP": "CLIENT_PUBLIC_IP",
"X-MACAddress": "MAC_ADDRESS",
"X-UserType": "USER",
"Content-Type": "application/json",
} -
Hi @Krunal
Apologies for delayed response.
Status 400 occurs when the client initiates bad request/ corrupted request.
As reviewed the request parameter, "fromdate" key dated forward compared to the "todate". Kindly reverify after correcting and let us know if the issue still persists.Thanks & Regards,
SmartAPI team