is there a workaround through which I can download historical futures data?
Yes, you can use continuous data. Go through the documentation here.
PS: Continuous data is available only for FUT contracts not for the options contract.
data = kite.generate_session(request_token, api_secret)
kite.set_access_token(data["access_token"])
This looks fine unless you are assigning the wrong values. Go through this thread.
For live data stream for any trading instruments, you can use WebSocket stream. For historical options data(for current trading contracts), you can use historical data.
Should I include both of their orderid when placing sell order via api ?
Bulk order placement API is not available out of the box. You can loop these orders and place an order at a time. Make sure, not to exceed rate limits for order placement.
Either I might be missing some data
I can't comment on this, unless there is any error log that states frequent disconnection, delaying, etc.
only these many stocks got traded at that point in time
Mostly this will be the case if you are handling ti…
showing nginx 404 not found page
Should be fine now. Apologies for this.
I need to know exactly how Kite implemented
It's sliding throttling period. Go through Throttling Period section above, it's explained in detail.
instrument not found: NFO:NIFTY15DEC18500CE"
You are using the wrong tradingsymbol.
Are you looking for a nifty weekly contract? NIFTY22D1518500CE
Go through this thread to know the format for weekly instruments. Fetch the complete list of trading …
I did it for SL as well and modified the same fields as you. Can see the tag field in orderbook response. Make sure, you are checking tag field only in the orderbook response.
I just checked this and the tag field is showing fine in the orderbook response after modification as well.
Can you paste here your complete request params for the modify order?
What is actually last traded time and exchange time in WebSocket?
The last traded time is the timestamp when actual trade has taken place. The exchange time is the timestamp at which the last tick has come i.e any of the quote fields has changed lik…
The cache tick update was missed in the next day's BOD(beginning of the day process) after the mock trading on Saturday by the exchange.
Is that the expected behavior on non-trading days?
No. All non-trading days except mock trading days announced…
If we add tag in order, they are visible only in the orders list?
Yes, it will be reflecting in the order book response.
Is there a way to filter/access trades or open positions by a tag via API?
The tag field will not be available in position APIs.…
@dknaix
The maximum number of apps allowed per kite connect developer account i.e email_id signup is 20. For more apps, you can signup with a new email id and add more apps.
Also any timeline for getting it back?
No, as said above all BO properties including trailing_stoploss have been depreciated. This article explains more.
is there any sample python code which does it
You can use two-leg gtt. This thread explains mor…
there is a good chance that I could call order_history for all the users at the same time. I could face the API rate limit.
No, this won't be an issue for an extended number of users, if each user has a different app/api_keys.
is it possible to fetch ohlc for previous hour?
Yes, you can for a couple of requests in an extended time. But, the pooling of historical data is not recommended.
twisted.internet.error.ReactorNotRunning: Can't stop reactor that isn't running.
I think this could happen when you don't stop while True loop, so it will keep looping and eventually stop the reactor again. Maybe break the while loop here.
We are checking on this. Meanwhile, you can use a pool connection to avoid this:
pool_value = {"pool_connections": 10, "pool_maxsize": 10,
"max_retries": 0, "pool_block": False}
kite = KiteConnect(...., pool=pool_value)
@dknaix @Guhan
We checked the logs, and don't see any major disconnection drop. We are evaluating more on this, meanwhile do let us know if you are seeing any specific disconnection pattern here.
This thread explains more on your query.
We don't recommend using historical data for live pooling. We suggest generating candles at your end using the live market data provided via Websocket. A few of the resources regarding the same can be found h…
order_id = self.session.post(f"{self.root_url}/orders/{variety}",
This POST request is returning None. You don't seems to be using the Kiteconnect python client. Go the python official client here.
disconnecting very frequently compared to rest days (6-7 times from 9am to 11am).
What was the disconnection reason? Maybe paste couple of logs of the disconnection period.
Also Do threaded WS connection not get killed at day end as the access_token…
Can I use the historical API of other account in the same session , with different kite object?
Yes, you need to make historical API requests using the API credentials including the API key, Access token, etc of the account having a historical API s…
I believe rounding off to 0 and 5 is a requirement by Kite
No, it varies as per exchange/instrument.
You can know about the required tick size of the instrument from the instrument list tick_size column.
You can have a multi-threaded setup, which keeps checking for the current time in a loop and closes the websocket connection based on an condition.
Eg:
.....
your_websocket_code
.....
kws.connect(threaded=True)
while True:
if (current_time > …
Currently, each individual tick is getting triggered in onTick function, as you can refer to the client repo.
To receive an array of ticks, maybe you can remove the iteration and pass on the complete ticks eg: t.triggerTick(ticks), in your local cli…
We flush all sessions including APIs and Websocket around 07:30 AM every day. So, you need to establish a new WebSocket session, the same as APIs. Go through session FAQs here.
Are those AMO orders? Are you placing it from the web or app? Have you added proper callback for order update in websocket?
Go through the above-mentioned thread once.
NFO:NIFTY22NOV18300CE
You are sending the wrong trading symbol, it should only be NIFTY22NOV18300CE. You can fetch trading symbol detail from the instrument list.
OHLC is the day's OHLC. It updates, only when there is a change in the open, high, low, or close price of the whole day, it doesn't update with every tick. Go through the documentation here.
Can i keep the streaming on for 5 full days (24hours) ?
Yes, you can. Websocket connection will remain alive from our end, if there is no disconnection(including network disconnection, etc) from your end.
You can use the stop() method to stop the WebSocket streaming.
can I re-run .connect() again
The ticker can't be restarted in the same process, so you need to re-spun the whole program again.
No, it's not recommended to poll positions and holdings APIs. You can fetch it once and use the value throughout the program. This thread explains more.
iceberg_quantity=750
You are entering the wrong iceberg_quantity, it should not be the same as total qty i.e quantity but quantity/iceberg_legs i.e here 750/2 = 375. Go through the order params documentation here.
I am fetching 15min historical data for NIFTY, API returns 25 candles. From those data I am calculating OHLC for the day and matching OHLC with Zerodha Kite Chart.
Need some clarity here. So, you are fetching 15-minute candle from historical data A…
Might be your local network speed. Can you inspect that?
I just checked the quote OHLC response for a couple of instruments and it's getting completed instantly.