websocket not connecting

pranksterguru
hi,
i am having trouble connecting to websocket to get the stream data

below is the websocket i am trying to hit
wss://websocket.kite.trade/?api_key=hy59xb1lelt0u7mh&user_id=DG1532&public_token=XXX

it doesnt throw any error, it simply doesnt go to connect event. when i entered this socket url in browser it says 'the website cant be reached'.
  • pranksterguru
    also, does the websocket return any handshake confirmation message? when i send connect request, it doesnt give me any welcome message
  • Vivek
    Did you check if you are getting any error while connecting? when websocket gets connected you will get heartbeat message every second.
  • pranksterguru
    heart beat message is sent every minute when the web socket is connected or when we subscribe?

    also, i dont think i am getting connected tot he websocket in the first place... it returns me refuses handshake message
    "closed with exit code -1 additional info: draft org.java_websocket.drafts.Draft_10@6a9a915f refuses handshake"

  • pranksterguru
    finally, we were able to connect to the websocket. it was issue with our framework

    @vivek @Kailash but, why are the price being returned in INT? dont you think price will have fractions to it? what is the use of getting intra day price in INT when the prices fluctuate in paise?
  • Kailash
    The INT prices are actually in paise. For currencies, you have to divide the number by 10000 (to get 4 decimal places) and for everything else, by 100.

    I realise that this is not mentioned in the documentation. Just added.
Sign In or Register to comment.