☰
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
153
Node JS client
40
Go client
793
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
993
Java client
1.1K
API clients
404
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
February 2017
Shakthi
February 2017
sujith
Multiple connection in NodeJS
Shakthi
February 2017
in
Market data (WebSockets)
Hi Everyone,
I am a newbie to Kite. Kindly let me know the followings:
1) how to establish multiple connection in nodejs(
https://github.com/rainmattertech/kiteconnectjs
)
2) how to dynamically subscribe instrument tokens in nodejs.
Tagged:
WebSocket
nodejs
sujith
February 2017
Hi
@Shakthi
,
Please take a look at
this
.
Shakthi
February 2017
Hi Sujith,
I read through the doc and I have subscribed for multiple instruments in single instance.
eg:
var items = [738561,14565634];
ticker.subscribe(items);
ticker.setMode(ticker.full, items);
I would like to know if I can subscribe one more item after receiving input from the user by the below statement.
eg: ticker.subscribe([11547906]);
As there is a hard stop at 200 tokens per connection. Let me know how to create a new connection?
sujith
February 2017
@Shakthi
,
Yes, you can subscribe to tokens anytime.
you create one more KiteTicker object and follow same procedure to create one more connection.
Shakthi
February 2017
@Sujith
,
Thanks much.
Do I need to unsubscribe all tokens before subscribing for a new instrument token along with existing tokens. I am unsure on this procedure?
Can I use same api_key,user_id and public_token for multiple KiteTicker object?
sujith
February 2017
@Shakthi
,
You don't have to subscribe to all tokens for subscribing to new token.
Yes, you can use same params. For more info checkout examples
here
.
Sign In
or
Register
to comment.
Please take a look at this.
I read through the doc and I have subscribed for multiple instruments in single instance.
eg:
var items = [738561,14565634];
ticker.subscribe(items);
ticker.setMode(ticker.full, items);
I would like to know if I can subscribe one more item after receiving input from the user by the below statement.
eg: ticker.subscribe([11547906]);
As there is a hard stop at 200 tokens per connection. Let me know how to create a new connection?
Yes, you can subscribe to tokens anytime.
you create one more KiteTicker object and follow same procedure to create one more connection.
Thanks much.
Do I need to unsubscribe all tokens before subscribing for a new instrument token along with existing tokens. I am unsure on this procedure?
Can I use same api_key,user_id and public_token for multiple KiteTicker object?
You don't have to subscribe to all tokens for subscribing to new token.
Yes, you can use same params. For more info checkout examples here.