☰
Login
Signup
Home
›
Market data (WebSockets)
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.8K
All Categories
0
Incidents
152
Node JS client
39
Go client
791
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
992
Java client
1.1K
API clients
402
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
December 2017
tonystark
Error in subscribing list of tokens
chimirala
December 2017
in
Market data (WebSockets)
Hi Team,
I am trying to subscribe good FnO instruments by passing a list variable instead of a list directly.
#list
of all FnO token (length is around 150)
ins_token=[1,2,3,4,5,....150]
#Using
this list in function receiving the error
def on_connect(ws):
ws.subscribe(ins_token)
ws.set_mode(ws.MODE_FULL, ins_token)
error: Object of type 'int64' is not json serializable
Could you assist where am I going wrong.
Tagged:
WebSocket
token
INSTRUMENT LIST
tonystark
December 2017
I believe you are using pandas. If you are collecting the instrument tokens from any panda data structure it will be of a different type. You will have to convert that to native python integers to subscribe to WebSocket.
Sign In
or
Register
to comment.