I just want to know that how would I know the Index performance during opening market hours. Like SS provided below:-
Group Details Private
SmartAPI Group
Member List
-
How can I get Index performance with % change.
-
lost charts study templates
I lost all my charts study templates.
There is no proper response from angel one .
this might have been happen due to recent mobile app update from play store .
-
RE: please share some example of WebSocket 2.0 response data
@Jaydip-Garala you are able to get bid ask price from websocket?
-
RE: please share some example of WebSocket 2.0 response data
@Jaydip-Garala you are able to get best five data Buy/Sell prices (in websocket streaming) than please help me i am not able
-
Invalid totp
// server.js const express = require('express'); const { SmartAPI } = require('smartapi-javascript'); const WebSocket = require('ws'); const path = require('path'); require('dotenv').config(); const app = express(); const port = 3000; // Middleware app.use(express.json()); app.use(express.static('public')); // Initialize SmartAPI let smart_api; try { smart_api = new SmartAPI({ api_key: process.env.SMART_API_KEY, // Your API Key clientId: process.env.CLIENT_ID, // Your Client ID clientSecret: process.env.CLIENT_SECRET // Your Client Secret }); console.log('SmartAPI initialized successfully'); } catch (error) { console.error('Error initializing SmartAPI:', error); process.exit(1); } // Store session data let session = null; // Session check middleware const checkSession = (req, res, next) => { if (!session || !session.feedToken) { return res.status(401).json({ success: false, message: 'Not logged in or session expired' }); } next(); }; //login code test app.post('/api/login', async (req, res) => { try { console.log('Login attempt started...'); const { client_code, password, totp } = req.body; if (!client_code || !password || !totp) { throw new Error('Missing required login parameters'); } console.log('Generating session...'); const data = await smart_api.generateSession(client_code, password, totp); console.log('Full API Response:', JSON.stringify(data, null, 2)); if (!data || !data.jwtToken || !data.feedToken) { throw new Error('Session generation failed, missing tokens.'); } console.log('Session generated successfully:', { hasAccessToken: !!data.accessToken, hasRefreshToken: !!data.refreshToken, hasJwtToken: !!data.jwtToken, hasFeedToken: !!data.feedToken }); session = data; smart_api.jwtToken = data.jwtToken; smart_api.feedToken = data.feedToken; res.json({ success: true, message: 'Login successful', sessionInfo: { hasAccessToken: !!data.accessToken, hasJwtToken: !!data.jwtToken, hasFeedToken: !!data.feedToken } }); } catch (error) { console.error('Login error details:', error); res.status(500).json({ success: false, message: error.message || 'Login failed', errorDetails: error.toString() }); } });
clientcode:"K624646"
-
Invalid totp
Here is my code
// Initialize SmartAPI let smart_api; try { smart_api = new SmartAPI({ api_key: process.env.SMART_API_KEY, // Your API Key clientId: process.env.CLIENT_ID, // Your Client ID clientSecret: process.env.CLIENT_SECRET // Your Client Secret }); console.log('SmartAPI initialized successfully'); } catch (error) { console.error('Error initializing SmartAPI:', error); process.exit(1); } // Store session data let session = null; // Session check middleware const checkSession = (req, res, next) => { if (!session || !session.feedToken) { return res.status(401).json({ success: false, message: 'Not logged in or session expired' }); } next(); }; //login code test app.post('/api/login', async (req, res) => { try { console.log('Login attempt started...'); const { client_code, password, totp } = req.body; if (!client_code || !password || !totp) { throw new Error('Missing required login parameters'); } console.log('Generating session...'); const data = await smart_api.generateSession(client_code, password, totp); console.log('Full API Response:', JSON.stringify(data, null, 2)); if (!data) { throw new Error('Session generation failed, missing tokens.'); } console.log('Session generated successfully:', { hasAccessToken: !!data.accessToken, hasRefreshToken: !!data.refreshToken, hasJwtToken: !!data.jwtToken, hasFeedToken: !!data.feedToken }); session = data; smart_api.jwtToken = data.jwtToken; smart_api.feedToken = data.feedToken; res.json({ success: true, message: 'Login successful', sessionInfo: { hasAccessToken: !!data.accessToken, hasJwtToken: !!data.jwtToken, hasFeedToken: !!data.feedToken } }); } catch (error) { console.error('Login error details:', error); res.status(500).json({ success: false, message: error.message || 'Login failed', errorDetails: error.toString() }); } });
Response
Generating session...
Full API Response: {
"status": false,
"message": "Invalid totp",
"errorcode": "AB1050",
"data": null
}
Session generated successfully: {
hasAccessToken: false,
hasRefreshToken: false,
hasJwtToken: false,
hasFeedToken: false
}ID: "k624646"
any one help me to solve this.
-
RE: Internal Server error for all requests
Hello, any update on the solution regarding this issue @admin @Moderator_1 @Moderator_2 @Moderator_3 @moderator_4 @bhaveshjain @batman1234 ?
-
RE: Internal Server error for all requests
@ash_0001 no that's not the error, since I re-logged in, also tried creating new api credentials, still the error persists, only for the M85437 id.
Oddly enough, the same code is working perfectly fine with other users.@admin @Moderator_1 @Moderator_2 @Moderator_3 @moderator_4 I request you to kindly look into this once, since the Internal Error error is still returning on the M85437 ID even after changing the API App credentials and re-authenticating.
-
Internal Server error for all requests
Dear @admin @Moderator_1 @Moderator_2 @Moderator_3 @moderator_4 ,
I'm facing Internal server errors for client M85437 while making any request for placeorder, orderbook or positionbook.
I'm using the python smartApi library, and I tried re-logging, yet getting the same error.
here are the logs for your reference:
-
orderbook:
[E 250124 09:56:36 smartConnect:246] Error occurred while making a GET request to https://apiconnect.angelone.in/rest/secure/angelbroking/order/v1/getOrderBook. Error: Internal Error. URL: https://apiconnect.angelone.in/rest/secure/angelbroking/order/v1/getOrderBook, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.193.147.98', 'X-MACAddress': '4b:1f:e0:38:06:ac', 'Accept': 'application/json', 'X-PrivateKey': 'NlUMc4oQ', 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {}, Response: {'message': 'Internal Error', 'errorcode': 'AB2001', 'status': False, 'data': None} -
positions:
[E 250124 09:56:36 smartConnect:246] Error occurred while making a GET request to https://apiconnect.angelone.in/rest/secure/angelbroking/order/v1/getPosition. Error: Internal Error. URL: https://apiconnect.angelone.in/rest/secure/angelbroking/order/v1/getPosition, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.193.147.98', 'X-MACAddress': '4b:1f:e0:38:06:ac', 'Accept': 'application/json', 'X-PrivateKey': 'NlUMc4oQ', 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {}, Response: {'message': 'Internal Error', 'errorcode': 'AB2001', 'status': False, 'data': None} -
placeTrade:
[E 250124 09:30:13 smartConnect:246] Error occurred while making a POST request to https://apiconnect.angelone.in/rest/secure/angelbroking/order/v1/placeOrder. Error: Internal Error. URL: https://apiconnect.angelone.in/rest/secure/angelbroking/order/v1/placeOrder, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.193.147.98', 'X-MACAddress': '4b:1f:e0:38:06:ac', 'Accept': 'application/json', 'X-PrivateKey': 'NlUMc4oQ', 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'variety': 'NORMAL', 'exchange': 'NFO', 'tradingsymbol': 'BANKNIFTY30JAN2548600PE', 'symboltoken': '39480', 'duration': 'DAY', 'transactiontype': 'SELL', 'quantity': '45', 'producttype': 'CARRYFORWARD', 'ordertype': 'LIMIT', 'ordertag': '4945', 'disclosedquantity': '0', 'price': '512.0'}, Response: {'message': 'Internal Error', 'errorcode': 'AB2001', 'status': False, 'data': None}
[E 250124 09:30:13 smartConnect:339] API request failed: {'message': 'Internal Error', 'errorcode': 'AB2001', 'status': False, 'data': None}
I request you to kindly look into it and give me a resolution for the same.
Thank you.
Lookiing forward to a quick resolution. -
-
Unable to login: stuck at Enter Pin
Dear @Moderator_1 @Moderator_2 @admin ,
Currently, we are facing issues with the login method using [https://smartapi.angelbroking.com/publisher-login]We are getting the error "Something went wrong. Please try after some time" after entering the login pin, and as a result, the login process is stuck there.
This issue has been noticed for multiple trading accounts.I've attached the screenshot of the error visible in the browser for your reference.
I request you to look into this issue and solve it at the earliest, as our trading has been completely halted due to it today.
Looking forward to a quick resolution.
Thank you!