Getting Invalid API Key for Top Gainers API
-
this is my command
curl -X POST https://apiconnect.angelbroking.com/rest/secure/angelbroking/marketData/v1/gainersLosers
-H 'Content-Type: application/json'
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VybmFtZSI6IlYyOTgxMTciLCJyb2xlcyI6MCwidXNlcnR5cGUiOiJVU0VSIiwidG9rZW4iOiJleUpoYkdjaU9pSklVelV4TWlJc0luUjVjQ0k2SWtwWFZDSjkuZXlKemRXSWlPaUpXTWprNE1URTNJaXdpWlhod0lqb3hOekEzTXpFeE9USTRMQ0pwWVhRaU9qRTNNRGN5TVRnMk5UUXNJbXAwYVNJNkltWTVZMkV3WVdaa0xXUm1aVFl0TkdJeU9DMWhNVFprTFdOaU56UXhZMk5sTVRRMU9DSXNJbTl0Ym1WdFlXNWhaMlZ5YVdRaU9qUXNJbk52ZFhKalpXbGtJam9pTXlJc0luVnpaWEpmZEhsd1pTSTZJbU5zYVdWdWRDSXNJblJ2YTJWdVgzUjVjR1VpT2lKMGNtRmtaVjloWTJObGMzTmZkRzlyWlc0aUxDSm5iVjlwWkNJNk5Dd2ljMjkxY21ObElqb2lNeUlzSW1SbGRtbGpaVjlwWkNJNkltTTNNREJqWXpobUxXUmhOemt0TXpNeU9TMWhNMkl4TFRKak9XVTNabVJoTXpSalppSXNJbUZqZENJNmUzMTkuVEZtaXFqeEcwa05tQWlaSFl4YkRiX2c3WG9taDY0UXE4Uk9hRDJCeHBBQkJCM0t1VE9LTFNXTGF5NG14N0EzX3hNNzFXakdDNlpLdzN5V1JiY1ZuWUEiLCJBUEktS0VZIjoiRXJIQzdaQVEiLCJpYXQiOjE3MDcyMTg3MTQsImV4cCI6MTcwNzMxMTkyOH0.IV9koO9BYznkt5prdFuhjppthALXlQ0FlVcxsN1KtGvMo0MGiECZ3-CeFnLDA8JtfRWZsH9ilt6DxNjRuK6eGg'
-d '{
"datatype":"PercOIGainers",
"expirytype":"NEAR"
}' -
Hi @Prasanna-k
We are able to consume the API without an error. Kindly share us the client code and curl if possible to analyze further on this issue.
Thanks & Regards,
SmartAPI team -
yes sir same problem occurs v{'success': False, 'message': 'Invalid Token', 'errorCode': 'AG8001', 'data': ''} please resolve this so we can fetch it using Functions Like SmartAPI.xyz
-
Hi @Purushottam
As verified, we are able to retrieve the data for the same request parameter.
Kindly pass all the header parameter as mentioned in the below document and reverify, pls share us the client code if the issue still occurs
Ref: https://smartapi.angelbroking.com/docs/ResponseStructureThanks & Regards,
SmartAPI team