However,if you want to directly make requests,
you have to pass headers in the headers param in the get function.
Like this:
requests.get(url,headers=headers).
You can read the documentation here for better understanding:
the api works for me but i don't see a function to get the market depth of an instrument in API, is there one i am missing? Also not very clear what i need to pass as headers. can you please share a sample query with me with dummy keys.
https://github.com/zerodha/pykiteconnect
However,if you want to directly make requests,
you have to pass headers in the headers param in the get function.
Like this:
requests.get(url,headers=headers).
You can read the documentation here for better understanding:
https://kite.trade/docs/connect/v3/market-quotes/#retrieving-full-market-quotes
You can read here:
https://kite.trade/docs/connect/v3/market-quotes/#retrieving-full-market-quotes
https://kite.trade/docs/connect/v3/websocket/#quote-packet-structure
What you are passing as headers is correct. The issue is you are adding them to the url. Try to print your url and you will understand.
Actually,it should be done like this:
headers={'Authorization': 'token {}:{}'.format(api_key,access_token)}
And then ,pass this headers dictionary as headers parameter value in the get function.
All the requests go to version 3 by default. So,you only need to mention version in headers,if you want to request a different version of the API.