Hi All, i am new to java programming..can anyone please guide me on how to use the websocket for obtaining tick data using kiteconnect java library..tried using the example provided in github but that throws an exception .. com.rainmatter.kitehttp.exceptions.KiteException at com.rainmatter.ticker.KiteTicker.subscribe(KiteTicker.java:277) at com.harjee.Examples$9.onConnected(Examples.java:362) at com.rainmatter.ticker.KiteTicker$2.onConnected(KiteTicker.java:157) at com.neovisionaries.ws.client.ListenerManager.callOnConnected(ListenerManager.java:76) at com.neovisionaries.ws.client.WebSocket.callOnConnectedIfNotYet(WebSocket.java:2177) at com.neovisionaries.ws.client.WebSocket.onReadingThreadStarted(WebSocket.java:2132) at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:78) at com.neovisionaries.ws.client.ReadingThread.run(ReadingThread.java:59)
Hi Sujith, i am simply using the exact code as given in the example file (Test.java & Examples.java) at github. i havnt made any change other than the key, access token etc. so i dont understand why it doesnt work
Hi @harjee, Please go through the code, it is a working example which we use for testing. You must be missing something. Please read and understand stuff before you implement it.
Once you call ticker.connect(), an onConnected callback is called, try logging inside that and check if it is connected.
Can you print kiteException.message?
Check out structure of Kite Exception here.
Print message and post it here.
message="ticker is not connected"
code=504
pls help. thanks
Can you paste your code here?
Please go through the code, it is a working example which we use for testing.
You must be missing something. Please read and understand stuff before you implement it.
Once you call ticker.connect(), an onConnected callback is called, try logging inside that and check if it is connected.