@admin i have not seen response from 19days, responsibility and reliability are my new questions.
Posts made by Kamal
-
RE: AB1004 error code
-
RE: AB1004 error code
@admin thanks for the response, I'm facing while generating the token.
-
RE: AB1004 error code
@admin thanks for the response, I'm facing while generating the token.
-
RE: AB1004 error code
@admin thanks for the response, I'm facing while generating the token.
-
RE: AB1004 error code
@admin i'm also facing same error.
{"message":"Something Went Wrong, Please Try After Sometime","errorcode":"AB1004","status":false,"data":null} -
RE: "YOUR USER ID OR PASSWORD IS INVALID","errorcode":"AB1007"
@admin did you get any chance to take a look? why can't you automate these kind of routine activity?
-
RE: "YOUR USER ID OR PASSWORD IS INVALID","errorcode":"AB1007"
@admin i reset my password but still not able to login, can you take a look?
-
RE: "YOUR USER ID OR PASSWORD IS INVALID","errorcode":"AB1007"
@admin usually how much time it will take to migrate? I submitted Google Sheet and updated the same here
-
RE: "YOUR USER ID OR PASSWORD IS INVALID","errorcode":"AB1007"
@admin Please migrate my id as well.
Client ID: V183756 -
additional/user info needed in redirect url
Is there any way i can get user information in redirect url (like user_id=ABC1234 or if i add any text during API call, it returns me along with redirect url)?
https://smartapi.angelbroking.com/publisher-login?api_key=xxx
I am building a app, it should identify which user has authenticated?
-
RE: WebSocket functionality issue
Thanks for the response,
I used same code for getting market depth. Total buy/sell volume. As per Official documentation says, "tbq/tsq" gives the numbers. But not present in API response.
32 tbq Total buy quantity
33 tsq Total sell quantitytask="dp"
Sample Output:
Ticks: [{'bno': '5', 'bno1': '14', 'bno2': '29', 'bno3': '26', 'bno4': '40', 'bp': '430.40', 'bp1': '430.35', 'bp2': '430.30', 'bp3': '430.25', 'bp4': '430.20', 'bq': '2778', 'bq1': '6556', 'bq2': '15776', 'bq3': '8624', 'bq4': '17065', 'bs': '450', 'bs1': '2518', 'bs2': '13472', 'bs3': '5992', 'bs4': '8936', 'e': 'nse_cm', 'name': 'dp', 'sno': '1', 'sno1': '16', 'sno2': '34', 'sno3': '23', 'sno4': '43', 'sp': '430.50', 'sp1': '430.55', 'sp2': '430.60', 'sp3': '430.65', 'sp4': '430.70', 'tk': '3045'}]I am trying to get "bid/ask" volume along with LTP, any alternate?
Thanks in advance,
Kamal. -
RE: WebSocket functionality issue
Could you help or can you share working code including packages along with versions
-
RE: WebSocket functionality issue
@rajanprabu Thanks for your response
smartapi-python==1.2.9
websocket-client==1.1.0 -
WebSocket functionality issue
Hi All,
I am using below code to get bid/ask volume.- from smartapi import SmartConnect
#from smartapi import WebSocket
from smartapi import SmartWebSocket
obj=SmartConnect(api_key=api_key)
data = obj.generateSession(clientId, password)
FEED_TOKEN=obj.getfeedToken()''' SBIN'''
token="nse_cm|3045"
task="dp" #'mw'|'sfi'|'dp'
ws = SmartWebSocket(FEED_TOKEN, clientId)def on_tick(ws, tick):
for i in tick:
if 'tbq' in i.keys():
print(i['tbq'])
print(i['tsq'])
ws.stop()def on_connect(ws, response):
ws.send_request(token,task)def on_close(ws):
ws.stop()ws.on_ticks = on_tick
ws.on_connect = on_connect
ws.on_close = on_closews.connect()
Challanges:
- While importing lib, from smartapi import WebSocket facing (C:\Users\kamal\anaconda3\lib\site-packages\smartapi_init_.py) error. Tried from smartapi import SmartWebSocket & it is working fine
- Ticker is not giving task 'dp', instead looping the task 'hb'.
__on_open################
{'task': 'cn', 'channel': 'NONLM', 'token': 'XXXXXX', 'user': 'XXXXXX', 'acctid': 'XXXXXX'}
2021-06-21 17:18:04.942797 : Start task in the background
{'task': 'hb', 'channel': '', 'token': 'XXXXXX', 'user': 'XXXXXX', 'acctid': 'XXXXXX'}
2021-06-21 17:18:34.953644 : Start task in the background
{'task': 'hb', 'channel': '', 'token': 'XXXXXX', 'user': 'XXXXXX', 'acctid': 'XXXXXX'}
2021-06-21 17:19:04.957672 : Start task in the background
{'task': 'hb', 'channel': '', 'token': 'XXXXXX', 'user': 'XXXXXX', 'acctid': 'XXXXXX'}
{'task': 'hb', 'channel': '', 'token': '0999895434', 'user': 'V183756', 'acctid': 'V183756'}
HeartBeat Sending Failed --> this is in loop after stopping manually.- I had to stop manually, tried but service running in background not able to stop.
I just need market depth, can someone help me/correct my code?
- from smartapi import SmartConnect
-
how to close websocket?
I tried to get LTP using websockets and able to. However not able to close the connection, keep on getting the LTP for every tick. Can someone help me with the code, how to close the connection (ws.connect(threaded=True) opens the connection, but how to close or disconnect the connection).