HeartBeats Failed
-
Hi @admin and fellow boarders,
For the last two days,
Im getting this HearBeats Failed message
DRREDDY, 2021-01-14 14:10:00, 5288.05, 5288.9, 5287.25, 5287.25 HDFCLIFE, 2021-01-14 14:09:00, 707.35, 707.35, 707.15, 707.15 HEROMOTOCO, 2021-01-14 14:10:00, 3256.8, 3256.8, 3256.55, 3256.55 BHARTIARTL, 2021-01-14 14:10:00, 581.45, 581.45, 581.45, 581.45 BRITANNIA, 2021-01-14 14:10:00, 3674.0, 3674.0, 3674.0, 3674.0 TITAN, 2021-01-14 14:10:00, 1485.4, 1485.5, 1485.4, 1485.5 ICICIBANK, 2021-01-14 14:10:00, 551.9, 552.15, 551.9, 552.1 ITC, 2021-01-14 14:10:00, 213.9, 213.9, 213.85, 213.85 NESTLEIND, 2021-01-14 14:09:00, 18132.9, 18132.9, 18131.1, 18131.1 EICHERMOT, 2021-01-14 14:10:00, 2871.45, 2871.45, 2868.6, 2868.6 ULTRACEMCO, 2021-01-14 14:10:00, 5572.05, 5574.4, 5570.0, 5570.0 BPCL, 2021-01-14 14:10:00, 419.0, 419.15, 419.0, 419.15 SUNPHARMA, 2021-01-14 14:10:00, 605.1, 605.1, 605.05, 605.05 ASIANPAINT, 2021-01-14 14:10:00, 2662.5, 2663.2, 2662.5, 2663.2 POWERGRID, 2021-01-14 14:08:00, 204.45, 204.45, 204.45, 204.45 SBILIFE, 2021-01-14 14:08:00, 924.65, 924.65, 924.65, 924.65 GRASIM, 2021-01-14 14:10:00, 1020.2, 1020.6, 1020.1, 1020.1 IOC, 2021-01-14 14:09:00, 101.3, 101.35, 101.3, 101.35 JSWSTEEL, 2021-01-14 14:10:00, 395.2, 395.2, 395.05, 395.05 AXISBANK, 2021-01-14 14:10:00, 678.75, 678.9, 678.75, 678.9 DIVISLAB, 2021-01-14 14:10:00, 3700.0, 3700.0, 3699.85, 3699.9 SBIN, 2021-01-14 14:10:00, 307.7, 307.7, 307.7, 307.7 UPL, 2021-01-14 14:10:00, 511.75, 511.75, 511.75, 511.75 NTPC, 2021-01-14 14:10:00, 101.85, 101.9, 101.85, 101.9 INDUSINDBK, 2021-01-14 14:10:00, 969.45, 969.45, 969.45, 969.45 LT, 2021-01-14 14:10:00, 1380.85, 1381.0, 1380.85, 1381.0 KOTAKBANK, 2021-01-14 14:10:00, 1898.0, 1898.0, 1898.0, 1898.0 SHREECEM, 2021-01-14 14:10:00, 24775.35, 24775.35, 24775.35, 24775.35 HINDALCO, 2021-01-14 14:10:00, 261.65, 261.65, 261.65, 261.65 RELIANCE, 2021-01-14 14:10:00, 1963.75, 1963.75, 1963.5, 1963.5 BAJAJFINSV, 2021-01-14 14:10:00, 8741.5, 8744.6, 8741.5, 8744.6 BAJFINANCE, 2021-01-14 14:10:00, 4880.0, 4880.9, 4879.95, 4879.95 ADANIPORTS, 2021-01-14 14:10:00, 534.5, 534.8, 534.5, 534.8 TATASTEEL, 2021-01-14 14:10:00, 704.35, 704.5, 704.35, 704.5 HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed HeartBeats Failed
Am I the only one getting this message ? It could be my code ( live trading using Backtrader ) but I just wanted to know if anyone else has the same issue.
Thanks
-
Hi @PandaTrade ok .
-
@admin
Do not bother it is working fine now.
HAd to reset my password -
@admin
Could you please tell me why is the user blocked here. -
@admin
I get this status when i read the data .i.e return of the obj.generatesession
datais={'status': False, 'message': 'User Is Blocked', 'errorcode': 'AB1007', 'data': None} -
Taking a new SDK live is very risky ( I learned my lesson in the past ). When real money is involved I cant take any risk. I will do my testing for a week before I move this to production. When I get time I will test it..
Thanks
-
Hi @rajanprabu try with this example its already available in read me file kindly update your sdk to 1.2.7.
from smartapi import SmartWebSocketfeed_token=092017047
FEED_TOKEN="YOUR_FEED_TOKEN"
CLIENT_CODE="YOUR_CLIENT_CODE"token="mcx_fo|224395"
token="EXCHANGE|TOKEN_SYMBOL" #SAMPLE: nse_cm|2885&nse_cm|1594&nse_cm|11536&nse_cm|3045
token="mcx_fo|226745&mcx_fo|220822&mcx_fo|227182&mcx_fo|221599"
task="mw" # mw|sfi|dp
ss = SmartWebSocket(FEED_TOKEN, CLIENT_CODE)
def on_message(ws, message):
print("Ticks: {}".format(message))def on_open(ws):
print("on open")
ss.subscribe(task,token)def on_error(ws, error):
print(error)def on_close(ws):
print("Close")Assign the callbacks.
ss._on_open = on_open
ss._on_message = on_message
ss._on_error = on_error
ss._on_close = on_closess.connect()
-
Im using an older SDK for production. Didnt get time to test the new one. But I face Heartbeat failure message twice today.
-
Hi @PandaTrade can you mail us your request and response.
-
@admin any update on this?
@rajanprabu are you able to test websocket streaming?
-
2021-06-01 10:55:23.634091 : Start task in the background {'task': 'hb', 'channel': '', 'token': '092017127', 'user': 'X63314', 'acctid': 'X63314'}``` hello @admin, I am not getting tick data except the above response. could you please paste your sample code for the same.
-
Hi @PandaTrade from smartapi import SmartWebSocket
-
Hi @admin,
from smartapiwebsocket import SmartWebSocket
This is the import that is given in the examples section of github.
When i try to use this it doesn't work.Could you let me know what are the imports that i need to do?
FYI, earlier used thisfrom smartapi import WebSocket;from smartapi import SmartConnect
-
Thats sad :(. Thanks for testing..
-
@rajanprabu yes
-
-
HeartBeats Failed
HeartBeats Failed@admin i am still getting such messages.
Isn't the program supposed to work infinetely?
For me it got ended in 5 mins. -
pip install smartapi-python --upgrade
should in general upgrade to latest version even if you have it installed already..
-
HI @PandaTrade uninstall and install again.
-
@PandaTrade pip install websocket-client
i guess this should do it