☰
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.2K
All Categories
0
Incidents
127
Node JS client
38
Go client
769
.Net API client
362
Kite Publisher
532
.Net / VBA / Excel (3rd party)
435
Algorithms and Strategies
969
Java client
1K
API clients
401
PHP client
3.8K
Python client
331
Mobile and Desktop apps
1.3K
Market data (WebSockets)
3.2K
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.