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.
How many data points are transferred by web socket per second or per minute in python?
Websocket streams as data received from the exchange. There is no fixed value to it. Depends on subscribed contract movements, etc.
Is there any data loss if I d…
You can use WebSocket stream, it broadcast tick data as received from the exchange.
PS: There can be no guarantee of ticks coming every 200/300ms, exchange broadcast ticks only if there is any change in the tick packet fields.
We have sent only one 40X request since morning, but too many requests is coming.
This is not possible at all. You need to re-check all your programs spun up.
@namratasonawane
As said above in the announcement thread, we have started throttling 40X(invalid requests) per IP based. So, in your case(of handling multiple users from the same IP), even if you don't breach previous rate limits per user, but the…
for number of lots can I fill the quantity as below orderParams.quantity
You need to enter the quantity in the multiplier of lot size for NFO. You can get a lot size detail for an instrument from the instrument list.
Also can you please let me know …
@jeevan_bhatt
You are exceeding the order limits of the day as described here. Debug your program and make sure to not exceed the rate limits. You can follow the steps mentioned above in the top thread with header If you are continuously getting 4…
@namratasonawane @AbhyudayaCodes25
If you follow the rate limits for order placement, in no way you will be affected, even for any 40X status orders as you won't encounter with throttling slide period, as these get triggered only if you breach the …
Any disconnection error in the websocket debug logs?
Have you added an on_error callback? This would throw the required error message when the connection is closed.
an API ("https://api.kite.trade/orders") which is giving all order statuses as list
No, here status field for each order shows only the current status of the order. Follow the documentation here to know about each orderbook field. You can retrieve t…
What to do to resolve this. Kindly guide us.
As said above you need to find and kill those requests.
You need to check your existing scripts/codebases and validate/sanitize the request fields in order to avoid sending 40X requests.
does running 500 stocks in websocket at the same time would cause any delay
No, it won't. Are you sure about using the correct instrument token on websocket stream?
Maybe paste here/DM me the websocket code, specifically the tick stream method (on_t…
Your kiteconnect app is active. Can you explain in detail, what do you mean by my api is blocked?
If continuous 429, means you need to add more delay and have all requests within the reach of the API rate limit.
will there be a delay from website to websocket?
No, there won't be any delay between the kite web marketwatch ticks and the kiteconnect websocket stream, both use the same source binary packet. Just make sure, you aren't blocking the main ticker th…
I just tried to punch an iceberg order with 3802 QTY, it punched well without any issues. (for NIFTY)
I am curious Why Does API accepted that order at first place?
....quantity=3802, price=0.05, trigger_price=0, iceberg_legs=3,
3802 qty gets split i…
As one can see the candles using the historical API and shown on charts is vastly different. The opening itself has a massive difference of 7 points.
We use the same WebSocket stream to plot historical candles on the kite charts. So, until you are h…
RuntimeError: This event loop is already running, while connecting 3 websocket connections
Looks like, you are already running 3 WebSocket streams(maximum allowed connections). You need to stop all previous active connections and then initiate the n…
You can check the status_message field to know the details if the field is not modified.
As the above-linked thread says, you can find rejection reason in the status_message available in the order history.
The same MS updates are happing in Zerodha web version too
No, your conclusion on this is wrong. We just logged the kite web marketwatch ltp update and the kiteconnect websocket stream for an active NSE-EQ contract, both are matching perfectly fine…
We don't have this feature as of now in APIs. Available only in the Zerodha console. For now, you will need to maintain this manually on your end. Maybe maintain a pledge stock dictionary at your end, with tradingsymbol:qty.
We have replied to your query on this thread. Go through it and please post all further related replies/queries on the same thread instead of creating multiple threads.
The delay is caused here because of not posting complete code flow(including err…
Yes, SSL problems are quite hard to find, you will need to do this on your end. Sometimes it's related to SSL lib, sometimes related to requests from abused IPs, multi-thread locking, etc. Maybe debug all possible scenarios one by one. This thread m…
so would it make sense to use the current PC time stamp for the tick data using LTP mode of websocket?
Yes, you may if you are just concerned about raw OHLC data for that period. Basically, the exchange timestamp represents the timestamp of the rece…
Is the open price the tick at 9.30am, the close price is the tick at 9.35min , high and low is the values between 9.30 to 9.35pm.. is this how 5min OHLC of 9.30 is formed?
The candle period is always represented by the start of that period range i.…
def getticks(apikey, accesstoken):
kt = KiteTicker(api_key=apikey, access_token=accesstoken)
logging.basicConfig(level=logging.DEBUG)
You need to call getticks(apikey, accesstoken) method at first, to Initialise the ticker instance, as per your code…
But the quote data is not providing the timestamp but its shown in the documentation.
No, quote mode won't have timestamp data, only full mode has. The same is explained correctly in the packet structure documentation.
peer dropped the TCP connection without previous WebSocket closing handshake
SSL error: sslv3 alert bad record mac (in )
Looks like your other thread created is closing the main connection. Maybe you can try without a multi-threading setup.
the product type received from kite.history() API call is same. It should be converted into new product type. Also, it is not refreshed into the orderbook.
No, there will be no effect on the historical order book data but, position data will reflect…
How do we replicate this scenario for testing(We are using web sockets to let LTP update).
You can try placing a contract on a very active contract, with a high gap between close and high price.
the main thread dies after initiating the kite ticker
If you are using the ticker in threaded mode, you need to keep the main thread active to keep the daemon threads running. This explains in depth.
Can you paste here the complete disconnection log…
Order modification was success on the api, also received the Order Update callback from WS, but the timestamp on which it was updated on KITE Web platform was showing 1 min difference
Did you fetch the order history for that order_id and checked all…
after the order was not executed on LIMIT , my system modified it to MARKET, normally for any order placed/modified the same is updated on KITE platform, but in this case the order timestamp didn't match, this OMS didn't return any error message
Do…
What are the ways to get FINNIFTY from NSE Exchange?
Are you looking for FINNIFTY Index? If yes, you need to use NIFTY FINANCIAL SERVICE i.e "NSE:NIFTY FIN SERVICE".
StatusCodeError: 400 - "{\"status\":\"error\",\"message\":\"Invalid order params.\",\"data\":null,\"error_type\":\"InputException\"}"
This means, either form-encoded input parameters is sent wrong/missing or wrong Content-Type header being used. You…
Is there in any no. of order modification limit per order i want to use this for trailing SL
wanted to know how many times i can modify order is there any limit...?
Yes, go through the documentation here.
Will this provide the data for both new orders and order modifications?
Yes, go through python client documentation here.
Can you please help me with a sample python code to pull orderbook and listen to the order updates?
We don't provide 1:1 coding…
Trying to place iceberge order getting " place_order() got an unexpected keyword argument 'iceberg_legs'".
iceberg_legs keyword is correct. You need to update kiteconnect package to lastest : pip install kiteconnect --upgrade
"The market order was rejected since there are no trades in this instrument. Try placing a LIMIT order"
What is the understanding behind this?
This was introduced last month based on this circular from the exchange.
restarting the script, the execut…
Doesn't Websocket postbacks support AMO orders? Is there any other way to fetch these details other than Postback (WebHooks)?
No, you won't receive websocket/ webhook postback updates for AMO orders. You will have to fetch the orderbook to check the…