@admin {'26000': {'High': 0.0, 'Low': 0.0, 'Open': 0.0, 'close': 24334.2, 'ltp': 24346.7, 'Bid': 0.0, 'Ask': 0.0}, '26009': {'High': 0.0, 'Low': 0.0, 'Open': 0.0, 'close': 55087.15, 'ltp': 55115.35, 'Bid': 0.0, 'Ask': 0.0}, '38608': {'High': 319.9, 'Low': 92.5, 'Open': 180.9, 'close': 180.25, 'ltp': 96.1, 'Bid': 96.2, 'Ask': 97.25}, '58549': {'High': 1981.3, 'Low': 1428.0, 'Open': 1599.95, 'close': 1552.75, 'ltp': 1458.15, 'Bid': 1458.25, 'Ask': 1465.0}, '57130': {'High': 55929.0, 'Low': 55073.6, 'Open': 55250.2, 'close': 55241.8, 'ltp': 55191.8, 'Bid': 55191.8, 'Ask': 55195.0}, '38610': {'High': 284.0, 'Low': 75.6, 'Open': 146.0, 'close': 156.85, 'ltp': 79.25, 'Bid': 78.35, 'Ask': 78.95}, '120151': {'High': 19.4, 'Low': 13.1, 'Open': 14.15, 'close': 13.45, 'ltp': 17.65, 'Bid': 17.45, 'Ask': 17.65}, '57133': {'High': 24718.3, 'Low': 24310.0, 'Open': 24399.9, 'close': 24418.4, 'ltp': 24395.1, 'Bid': 24394.2, 'Ask': 24395.1}, '38603': {'High': 234.0, 'Low': 83.8, 'Open': 234.0, 'close': 217.45, 'ltp': 148.4, 'Bid': 148.4, 'Ask': 150.15}, '58539': {'High': 705.15, 'Low': 446.1, 'Open': 680.0, 'close': 658.15, 'ltp': 618.0, 'Bid': 618.0, 'Ask': 620.0}}
Posts made by hardip
-
RE: OHL of Index
-
OHL of Index
Why Open, High, Low data not is available in web socket for INDEX( Bank Nifty, Nifty 50, Nifty Next 50 ,Nifty Fin Service, NIFTY MID SELECT) Why only LTP?
-
RE: AMO order
@admin [31m[E 250314 09:20:42 smartConnect:246][39m Error occurred while making a POST request to https://apiconnect.angelone.in/rest/secure/angelbroking/order/v1/cancelOrder. Error: Invalid Order Variety. Value should be NORMAL, STOPLOSS, ROBO.
OrderBook's variety is AMO -
INVALID TOKEN
Error code AG8001-invalid token. which token is invalid?
jwtToken;
refreshToken;
feedToken;
symbol token -
Option Greeks
Option Greeks data is available after market close?
if not mention in doc data not available after market close -
Unsubscribe token
What is right in following:
sws.unsubscribe(correlation_id, mode, token_list1)
or
sws.subscribe(action=0, correlation_id, mode)
or
sws.subscribe(action=0, mode, token_list1)
or
sws.unsubscribe(action=0, correlation_id, mode, token_list1)
or
sws.unsubscribe(action=0, correlation_id, mode, )or
sws.unsubscribe(action=0, correlation_id, token_list1)or
sws.unsubscribe( correlation_id, mode, token_list1)or
sws.unsubscribe(action, mode, token_list1) -
error. ver1.4.8
[31m[E 240321 11:39:06 smartWebSocketV2:212][39m Error occurred during subscribe: [WinError 10054] An existing connection was forcibly closed by the remote host
[WinError 10054] An existing connection was forcibly closed by the remote host -
RE: Python function for Option Greeks
@godboleamit .Not works. getOptionGreeks not define
-
Wrong historical data
. in Nuvama's(pic) was right data but in your excel show wrong. check it.
-
For connection timeout
May be issue with internet connection connectivity if ok then check your internet connection is public connection or private connection, if public connection, change to private connection
-
__version__ = "1.4.1"
SmartApi\smartConnect.py", line 97, in init
self.ssl_context = ssl.create_default_context() NameError: name 'ssl' is not defined
-
RE: Websocket order status in JavaScript
@jayesh_sapkale
/* Order Websocket */
String userClientId = "<clientId>";
User userGenerateSession = smartConnect.generateSession("<clientId>", "<password>", "<totp>");
smartConnect.setAccessToken(userGenerateSession.getAccessToken());
smartConnect.setUserId(userGenerateSession.getUserId());
String accessToken = userGenerateSession.getAccessToken();examples.orderUpdateUsage(accessToken); /** * Order update websocket * * To retrieve order update websocket data * @param accessToken */ public void orderUpdateUsage(String accessToken){ OrderUpdateWebsocket orderUpdateWebsocket = new OrderUpdateWebsocket(accessToken, new OrderUpdateListner() { /** * Check if the websocket is connected or not */ @Override public void onConnected() { log.info("order update websocket connected"); } /** * Handle the onDisconnected event */ @Override public void onDisconnected() { log.info("order update websocket disconnected"); } /** * Handle the onError event * @param error */ @Override public void onError(SmartStreamError error) { log.info("on error event"); } /** * Handle the onPong event */ @Override public void onPong() { log.info("or pong event"); } /** * Handle the onOrderUpdate event * @param data */ @Override public void onOrderUpdate(String data) { log.info("order update data {} ",data); }}); }
-
ChatGTP's answer
Increase Timeout Values:
If you have control over the connection parameters, consider increasing the timeout values. Depending on the library or method you're using to establish the connection, there might be a timeout parameter that you can adjust.
-
Basic needs
A basic requirement is a stable connection to any API. Which has not been resolved till date.
-
ERROR
error from callback <bound method SmartWebSocketV2._on_close of <SmartApi.smartWebSocketV2.SmartWebSocketV2 object at 0x000001B472CBF1C0>>: _on_close() takes 2 positional arguments but 4 were given
-
Error for api login
Here is Error: requests.exceptions.ConnectionError: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/auth/angelbroking/user/v1/loginByPassword (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x0000023118726100>: Failed to resolve 'apiconnect.angelbroking.com' ([Errno 11001] getaddrinfo failed)"))
-
Instruments
Today's 30 nov 2023:-No tokens for year 2023 expiry for futstk