☰
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.9K
All Categories
0
Incidents
156
Node JS client
40
Go client
793
.Net API client
380
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
998
Java client
1.1K
API clients
404
PHP client
4K
Python client
347
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.