Take your api_key out of quotes. What you have written is literally 'api_key'. It should be actual api_key like 'XXXXXX'. Like this:
headers = {
'X-Kite-Version': '3',
'Authorization': 'token {}:{}'.format(api_key,access_token)
}
There is no problem from KiteConnect. You must be doing something not correctly as in the thread posted above by Sujith Sir. Read it and generate access token properly.
Yes. Actually,the seconds value doesn't matter,so you don't need that. Kite stores data in minute candles. So,you will get minute candles only even if you pass seconds value.
https://kite.trade/forum/discussion/10798/how-can-i-purchase-kite-subscription-for-historical-data-i-have-api-account#latest. Why you don't understand anything at once??
Sujith Sir already told. Use websocket update as an event to fetch orderbook and update positions. Whenever you get an update, instead of looking at it's status ,call order history and check the latest status from there.
At the end,it's your choice. In your case,you said you place limit orders,then websocket updates would be better beacuse it will update you directly when the order is filled,but through order_history(),you have to call it every few seconds to check …
This forum is dedicated to Kite Connect APIs. For other issues at zerodha,write to support here:
https://support.zerodha.com/.
https://support.zerodha.com/category/your-zerodha-account/account-modification-and-segment-addition/segment-addition/…
Did you initialize kite object properly??
https://kite.trade/forum/discussion/5414/exception-while-placing-the-order-inputexception-invalid-api-key-or-access-token
Its not an issue of Kite Connect. Please post only about issues of Kite Connect APIs here. For now,this error is happening due to incompatible requests or urllib module. Upgrade your requests module. Refer this thread:
https://stackoverflow.com/q…
I don't understand one thing. Why do you even need order id for orders not placed from api?? I mean if you place an order manually,what will you do with it programatically??
Look,I will make it clear.
1. For order updates,you can use either postback or on_order_update from websocket.
In both the cases,you won't get the first status of a order,if it's not sent from the api.
2. There is no way to get directly update…
Exit order is only for co. How can you exit a order which is completed?You have to place a reverse transaction type order with the same quantity you have to exit a position.
@umasha To know all the stages a order has gone through,you can save the order id. And call kite.order_history(order_id). Check structure of order history here:
https://kite.trade/docs/connect/v3/orders/
On_order update has the same structure as postbacks. https://kite.trade/docs/connect/v3/postbacks/. For margin mapping, after you take or exit a position,call margins(). And check the utilised span and exposure key. Do necessary calculations and pu…
@umasha
(a). You don't need to subscribe to a token for its order update via websocket. Did you define the on_order_update function and assign the callback ?? https://kite.trade/forum/discussion/5980/on-order-update-not-working
(b) You can't a…
Yes,for orders not from api,you won't get the first status. You can read in detail here:
https://kite.trade/forum/discussion/6863/kiteconnect-postback-queries
It's not zerodha or exchange delay. Exchange time is when the order was registered with the exchange,and the 'time' is the timestamp when the order got filled.
I don't much about network issues. Just read a few articles on this forum. If this error would be happening with every api,then it would be connection error. But if it's only with positions,then i don't know what's causing the. problem. You can try …
Postbacks: https://kite.trade/docs/connect/v3/postbacks/
Websocket on_order_update:
https://kite.trade/forum/discussion/5980/on-order-update-not-working
Also,this read timeout is due to your connection error. Is it happening only with posi…
Download csv of all Nifty 50 stocks from here.
https://www1.nseindia.com/products/content/equities/indices/nifty_50.htm .
Create symbols list with this automatically.
Volatility is india vix. NSE assumes interest rate at fix 10 percent but that's not true. So,its better to use future price,which includes interest rate and dividend. You can read here: https://sensibull.com/docs/mathsandmarkets.html
No, that's not correct way to fetch intraday data. Actually, KiteConnect has a weird way of sending data. What happens is that if your 'from' and 'to' are not exactly the timestamps of the start and end of the candle,then it doesn't send the data as…
Smallest timeframe for historical data is 1min. If you want data every second,you have to use websocket. Read here:
https://kite.trade/docs/connect/v3/websocket/
For every tick data,you need to have server setup at the exchange. Read more about …
Well,I never saw variations like this so can't really tell what to do. What's the 'to' parameter you are passing?? Is it the current time?beacuse if you pass the 'to' as the current time,then the ltp at that sec comes as the close value of the last …
Use orderbook for synchronous order updates.
Or, you can use if statements. Like, let's say you put order for 100 quantity. And the first postback says the filled quantity is 50,second says 30. You can use if statement to check if the 2nd postbac…
You can read about websocket streaming issues and the solutions here:
https://kite.trade/forum/discussion/8019/faqs-on-pykiteconnect-specific-to-python-client#latest