Sandbox for Development Purpose

dhavalsoni2001
I am looking for a sandbox for development purpose, so do we have one?

If not, Can you provide what will be the response when I subscribe to more than 3 sockets? (Is it an array or Is it key-value pair based on instrument token) ?

As mentioned on the document response will not be in JSON so can you provide what would be the exact response in the socket?
  • sujith
    We don't have a sandbox environment.

    The data you receive from the websocket is binary data. You can read more about the packet structure here.
    I would suggest using one of the client libraries instead of reinventing the same thing.
  • rakeshr
    @dhavalsoni2001
    I am looking for a sandbox for development purposes, so do we have one?
    No, currently we don't have any official sandbox. You can have look to this thread.
    If not, Can you provide what will be the response when I subscribe to more than 3 sockets? (Is it an array or Is it key-value pair based on instrument token) ?
    A maximum of three WebSocket connections per api_key is allowed.
    Tick response is a nested-dictionary. You can check the tick structure example here.
  • sagaranilganu
    @rakeshr
    Does this mean that;
    1. The ticker response is a binary stream (e.g :: 00100111 01101001 011 )
    2. Which is to be read as bytes and converted to string ==>> x.decode('utf8')
    3. Then convert to "JSON" format
    4. Result is the nested dictionary what is shown in the sample example.
  • sujith
    @sagaranilganu,
    Yes, the ticker streams data in binary format and the Kite Connect client libraries convert it to the human-readable formats.
  • sagaranilganu
    @sujith ,
    So is it this way ==> "def on_ticks(ws, ticks):" is Kite Connect client library API.

    On callback the data is received in "ticks" and must be read from it.

    "WHEN DATA IS READ FROM 'ticks' => WE DON'T HAVE TO CONVERT BUT IS ALREADY CONVERTED"

    This is the same ready-made data in human-readable format (JSON) as shown in example viz.
    Tick structure (passed to the `on_ticks` callback)
    ---------------------------
    [{
    'instrument_token': 53490439,
    'mode': 'full',
    'volume': 12510, ..........]}

    Request clarify so that I can proceed further!!!
  • sujith
    The way it works is once a client connects to the ticker, he will subscribe for a token by sending a text message and Kite Ticker keeps publishing data whenever there is a change in the live market data.
    The data published from the Kite Ticker will be received by the client. The data is in binary format.

    The client library converts the binary data to the JSON format which is the same as mentioned above.

    If a user defines an on_ticks callback then the callback is called by the library and hence you will see the JSON data.
Sign In or Register to comment.