WebSocket streaming

darsh
var ws = new WebSocket("wss://ws.kite.trade?api_key=xxx&access_token=xxxx");
this example is already given in document of kite.

but i am using python.
i wrote code:

import json,requests
r=requests.get("wss://ws.kite.trade?api_key=xxx&access_token=xxxx")
x=r.json()
print(r)

But i am getting error:"InvalidSchema: No connection adapters were found "

could you please tell me this error is due to error in code or something else.?

Tagged:
  • sujith
    A websocket API is a long-standing connection which is not like any other HTTP calls. You look up online for more information. You can't make an HTTP call to a websocket endpoint.
Sign In or Register to comment.