I just tried to forcefully disconnect the webSocket in the code and the reconnection with resubscription is happening fine.
Reconnect attempt 1 in 2.000000s
Reconnect attempt 2 in 4.000000s
Subscribe again: [884737 63634951 61512711 424961]
Can yo…
Does that mean I can create any number of KiteConnect instances without limitations?
Yes, as @jits_1998 mentioned. You can spin up n-child instances but all requests should be within the rate limit.
How to send multiple Tags? Can I pass the list of tags as an argument while posting order?
You can pass the array of tag. Eg: tag=['TagA', 'TagB', 'TagC', 'TagD']
What is the maximum number of tags that can be included in Tag list?
5
For multiple ta…
Error: Connection error: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)
Go through the websocket FAQs here.
please run it in a loop and check, it is throwing an error, 7 out of 10 times.
I ran it in the loop of 20. Still no issue.
Can you paste here the debug log of the request?
I just tried the below basket order parameters and it's working fine. Recheck your order params and if still facing issue, you can enable debug logs and paste here the complete stake trace.
[{
'exchange': 'NFO',
'tradingsymbol': 'BANKNIFTY23APR37000…
ERROR:kiteconnect.ticker:Connection error: 0 - Can't subscribe to more than 4000 instruments.
Your websocket connection is getting disconnected, because of exceeding instrument tokens. Maximum of 3000 tokens are allowed in an websocket connection. G…
I just checked for a couple of NIFTY contracts and OI is showing fine. Can you paste here the instrument token/contract detail for which OI data is not coming in the websocket streaming?
You seem to be using the Heikin Ashi chart type on kite web charts. You need to change it to default Candle type from the chart types icon and compare.
Timeout settings in an HTTP client specify, not for each API call individually, but it applies to all API calls made by that client. You can assign a timeout value at the initialization of the Kite Connect client.
Eg:
kite = KiteConnect(api_key="you…
I've had a strange issue with my System Temp Folder getting full when I am using the kite web socket through API and at the same time If I log in to the Web console
Is this happening only for Kite web login on the browser or any other browser activi…
I receive close price X from API and on chart its X+4 or any other number.
Both kite web and historical API use the same data source, so it shouldn't be different. Can you paste here the values from both sources?
Does python client doesnt support 3 websocket connections ?
All official kiteconnect libraries support 3 websocket connections.
First two objects are disconnecting again and again.
Can you paste here the disconnection log? on_error callback will sta…
Why specifically are you looking for historical tokens? Continuous historical data?
You can use current instrument tokens for that. Go through the documentation.
$url = "https://api.kite.trade/instruments/NSE";
Above URL returns the trading instruments list, not the live price. Go through the documentation.
To fetch live market data for any instrument, you can use the quote APIs or use this external implemen…
Does Kite API use async programming concept?
As you are using Pykiteconnect here, these APIs are synchronous by default. It internally uses requests HTTP library, which makes synchronous requests.
how do I make sure that all lines of any function a…
The ticker alone stops sending updated data to our listener functions.
For disconnection, on_error is always called, so you need to make sure you are assigning proper callbacks for on_error.
You had selected the category as Market data (WebSockets).
We're not getting the prices for some strike prices.
Make sure, you are using the correct trading symbol with the exchange name. Maybe you can paste here the trading symbols you are facing i…
Yes, exchange tokens are re-used multiple times, especially in different segments. So, it's recommended to fetch the instrument file at the start of the trading day.
Can I use this package in AWS? any known challenges?(earlier I tried to move my algo setup to AWS but kiteconnect package installation troubled me a lot).
This is being used in production at AWS EC2, etc at multiple places. You can paste here the in…
I tried KiteConnect.orders() and KiteConnect.trades() and both returned None.
Are you using this on the correct account? Same client_id as logged-in the kite web?
Below is how the actual Payload is coming, Can someone from Kite check and fix this?:
As explained in the documentation, the payload comes as a byte and it's in JSON format, you need to decode the raw byte reponse. You can decode it as easily as jso…
No, it's same. Make sure you are importing kiteconnect properly and on the latest version. Go through the order margins example here. https://github.com/zerodha/pykiteconnect/blob/master/examples/order_margins.py
failing WebSocket connection (code=1000): "module 'log' has no attribute 'connect'"
Doesn't seems related to websocket connection, but some logging module. Are you using a different "log" module or package?
Can you add below logging level and paste …
The websocket stream is working fine for all trading instruments.
Can you paste here the instrument token for which you are facing the issue?
Make sure, those contracts are still active and not expired.
tradingsymbol="NIFTY2321618000CE"
It's an expired contract, expired on 216 (from tradingsymbol), 16.02.2023. Fetch all contract-related detail from the instrument list.
tradingsymbol="NFO-OPT:NIFTY2321618000CE"
You are using the wrong trading symbol for order placements. It should just be a trading symbol, not along with exchange for order placements here only NIFTY2321618000CE. Check all order placement input para…
, the API will return **day candle records** for the same instrument's expired contracts. For instance, assuming the current month is January and you pass NIFTYJAN18FUT's instrument_token along with continuous=1, you can fetch **day candles** for De…
Even if it says the default is 50, If I change the default to the maximum allowed (300), it still works correctly?
Yes
if I try to make the kws.connect() in the same code (after a certain time)
Are you adding a sleep condition here? As, once you ini…
The above error is related to SSL. The linked thread explains the steps.
Also, can you paste here the complete error stake trace? The above-pasted trace is incomplete?
the order 230208600242733
Your order was rejected by the exchange, with the exchange rejected message. These orders will have exchange_order_id in the order response.
Exception OccuredKiteConnect.place_order() got an unexpected keyword argument 'Stoploss'
You should use trigger_price field for stoploss. Go through the order parameters documentation.
Exchange has recently introduced this range LPP mechanisms rejection from this Monday for Index and stock Futures as well. You can check the detailed circular here:
https://archives.nseindia.com/content/circulars/FAOP55396.pdf
https://archives.nsein…
message: 'The instrument you are placing an order for has either expired or does not exist.'
Your order param looks fine above. Make sure, you are not adding pre and post blank spaces in the exchange and tradingsymbol.
Currently, tagged order(tag field in the order placement) is only retrieved in the orderbook. The option to be reflected in the console would be added soon. We will announce it here and update the kiteconnect docs as well.
ppp = kcon.positions()['day']
As explained in the above-linked thread, pnl field won't be updated in real-time for positions API. This thread explains more.