No,you have to fetch orderbook and then filter by checking status of every order.
If status is not one of COMPLETE, CANCELLED,or REJECTED,that means it is a pending order.
You can use stop and close methods whenever you want to close the websocket.
https://kite.trade/docs/pykiteconnect/v3/#kiteconnect.KiteTicker.stop
https://kite.trade/docs/pykiteconnect/v3/#kiteconnect.KiteTicker.close
Yes, because the data on KiteConnect doesn't have milliseconds precision. So,various statuses can have the same timestamp ,as this process happens instantly.
https://kite.trade/docs/connect/v3/orders/#placing-orders
You can store orders ba…
This can't be. If there was any problem with the websocket on that day ,this forum would have been flooded with queries about this issue.
Not only this,the Kite web/app use the same websocket data. If there was an issue,every user of Kite would…
Exchange timestamp is the timestamp when the tick was sent by the exchange.
It doesn't necessarily mean that there was a trade at that timestamp.
Refer this thread:
https://kite.trade/forum/discussion/comment/40088/#Comment_40088
Please read the documentation properly:
https://kite.trade/docs/connect/v3/websocket/#quote-packet-structure
The volume is actually the volume traded for the day.
You would have fetched these quotes on a day when these contracts were no…
https://kite.trade/forum/discussion/comment/23960/#Comment_23960
The postbacks are asynchronous updates sent by the OMS.
It is not recommended to use postbacks to update order database at your end.
Use postbacks as an event to fetch orde…
Technically,yes ,a websocket connection once established will stay forever,until it it closed(manually or connection errors).
So,it will work even after expiry of KiteConnect subscription.
But, connection errors can happen anytime and afte…
I don't see any delay with any api calls at my side.
This looks like your local network problem.
The KiteConnect python client has a default timeout of 7 seconds .
https://github.com/zerodha/pykiteconnect/blob/8e36dde9fe34bb0c7c5677a…
Only a single session is allowed per API key. You can use the same access_token/session to run multiple programs independent of each other. You need to just make sure to not cross the rate limits :
https://kite.trade/docs/connect/v3/exceptions/#a…
No, KiteConnect python client doesn't use matplotlib at all.
You can view all the dependencies here:
https://github.com/zerodha/pykiteconnect/blob/8e36dde9fe34bb0c7c5677a4dc0fb0b1beb40787/setup.py#L44
This is only possible when you are i…
Better,go on the Kite app and learn to manual trade first.
Still if you don't understand,then write to Zerodha support team:
https://support.zerodha.com/
Stop trying to sway this forum into a 'how to trade' forum.
You have been war…
KiteConnect APIs don't provide components of indices.
You can know about various indices and their components from the NSE website:
https://www1.nseindia.com/products/content/equities/indices/broad_indices.htm
It should be kc.GTT_TYPE_SINGLE. Here,'kc' is the current initialised KiteConnect object.
And, don't use quotes around that.
Please read the documentation properly:
https://github.com/zerodha/kiteconnectjs/blob/7d94fb87794e6819bfbd2e914e…
There are rules on every forum.
This forum is only for KiteConnect APIs ,not to teach you programming.
Your error isn't a KiteConnect error.
Nowhere in the terms and conditions of KiteConnect APIs has been written that we would provide p…
This forum is purely dedicated to technical queries related to KiteConnect APIs.
We don't provide support for programming issues or any other local issues. And this has been mentioned uncountable times on this forum.
About your hate com…
1. Learning python,and using basic common sense would solve this issue.
You are getting key error and not any error from KiteConnect (the status is 200).
Now,I would leave it on you to find the error.
2. Going by your previous discussions, …
There is no error in the KiteConnect Node JS client.
You should learn basic programming(logical operators) first before doing algo trading.
Otherwise,you would write such posts and mislead other users.
You should learn about 'AND' ope…
KiteConnect python client doesn't use matlplotlib.
I have a feeling you are not using the KiteConnect APIs , actually you have come on this forum from the google search.
If so,then we only deal with technical queries related to KiteConnec…
Please read the official documentations:
https://github.com/zerodha/pykiteconnect/blob/8e36dde9fe34bb0c7c5677a4dc0fb0b1beb40787/kiteconnect/ticker.py#L342
https://kite.trade/docs/connect/v3/
Most of the common questions have already b…
The try-except is used to stop the program from terminating.
But the websocket will close if there's an error.
If you want reconnection,then don't call stop method inside on_close.
How can anyone exactly indentify the issue without knowing the values of these variables??
This error occurs due to mismatch between the exchange and tradingsymbol.
Paste your exact request parameters.
The 3000 orders per day limit includes all the orders ,not just 'COMPLETED' ones ,even the rejected or cancelled orders count ,and also those which are rejected by the mini RMS.
You have posted a similar query previously:
https://kite.trade/forum/discussion/11748/exception-occurred-httpsconnectionpool-host-api-kite-trade-port-443-read-timed-out
You have to use try-except block to handle any exception.
https://kite.trade/forum/discussion/10953/connection-error-1006-connection-was-closed-uncleanly-websocket-connection-upgrade-failed-429
Yes,you shouldn't be having more than 3 websocket connections(3 KiteTicker objects).
Why do you need 22…
KiteConnect doesn't provide data for expired options.
However,you can use continuous historical data API to get data for expired future contracts:
https://kite.trade/docs/connect/v3/historical/#continuous-data
Trading qna is the right place to ask these questions:
https://tradingqna.com/
This forum is purely dedicated to technical queries related to KiteConnect APIs.
No, putting price=1 would not work, because the lower circuit for an instrument with price as 58 would be much above 1,so the order will be rejected.
If you just want to execute at current market price, without any price protection,just send ma…
This is not helpful.
You have to check for error under on error callback:
https://github.com/zerodha/javakiteconnect/blob/836822ba12a43fe695d9b6e7ce36c437c09f3e42/sample/src/Examples.java#L584
Or,run javakiteconnect with debug logs on an…
We only deal with technical queries related to KiteConnect APIs on this forum.
You have to contact Tradetron regarding this issue.
We don't offer support for 3rd party applications.
You can't use order IDs in the place orders/gtt APIs.
If you want to trade intraday,then you should use MIS product,not CNC.
And then you shouldn't place gtt, just place a limit order like you would do on Kite app/web.
The KiteCon…
You have to use historical data API:
https://kite.trade/docs/connect/v3/historical/
or you can build candles at your end using websocket and store them:
https://kite.trade/docs/connect/v3/websocket/
Please go through the documentati…
You have to check the last_price from websocket and keep modifying your sl order .
https://kite.trade/docs/connect/v3/websocket/
https://kite.trade/docs/connect/v3/orders/#modifying-orders
https://github.com/zerodha/gokiteconnect/blob/5c181e54ba537d4b6c0280331cbe2dbf194cb347/ticker/ticker.go#L514
There is an example:
https://github.com/zerodha/gokiteconnect/blob/5c181e54ba537d4b6c0280331cbe2dbf194cb347/examples/ticker/ticker…
a. Yes,you can sell but you shouldn't use CNC.
You should use MIS,which literally means Margin Intraday Squareoff.
This product has been made for intraday trading.
If you use CNC,you will get a 'HOLDING'tag in the position,which is happenin…
If you just want to execute orders,you can use the KitePublisher API,which is free.
https://kite.trade/docs/connect/v3/basket/
However,to get all other features of KiteConnect APIs like view positions,stream live quotes over websocket e…
First, about your query,are you subscribing to the instruments in full mode??
Oi,oi day high/low are only available in full mode .
Price change is sent only for indices by the exchange,and not for other tradable instruments.
Price cha…
There is no issue with websocket API.
Everything is correct with NIFTY22AUG18100CE and other instruments.
How can anyone know that you're not talking about today when you have not mentioned it?
If you're not talking about today,then y…
Did you ever read the documentation?
Holdings API is not used for selling the shares.
Holdings API is just to view the holdings.
And what do you mean by using the order_id when selling??
You don't give any order_id in the place order r…
https://support.zerodha.com/category/trading-and-markets/margin-leverage-and-product-and-order-types/articles/difference-in-margins-kite-margin-calculator
The margin you get from API is the correct one always.
Read the documentation properly .
https://kite.trade/docs/connect/v3/orders/
You are using incorrect values for exchange and tradingsymbol.
Tradingsymbol and instrument tokens are different things.
Also,why are you sending price in the or…
Rate limits means how many times you can make a particular request to the API in a given time period.
You can know all the rate limits here:
https://kite.trade/docs/connect/v3/exceptions/#api-rate-limit
No,order history API won't give you updates for partial fills.
There is only a new entry in order history when the status of the order changes.
Until the order is fully filled,it will remain in 'OPEN' state.
So,to get all the trades s…
a. You can use the trades API:
https://kite.trade/docs/connect/v3/orders/#retrieving-an-orders-trades
b. Yes, order history of an order is in chronological order.
You can use the positions API:
https://kite.trade/docs/connect/v3/portfolio/#positions
Every position has a quantity field.
If the quantity is not 0, it's an open position.
Yes,you can get all the latest data for every instrument from historical data API.
https://kite.trade/docs/connect/v3/historical/#historical-candle-data
Instruments dump is a very large file. The instruments api shouldn't be polled continuously.
It only updates once in the morning every trading day.
So ,you can just fetch it once/day and store in your database for that trading day.
Do you understand anything at once??
This is not the forum for non-technical queries.
You have to contact Zerodha support team for these queries:
https://support.zerodha.com/
Now, don't create duplicate threads multiple times.
This forum is purely dedicated to technical queries related to KiteConnect APIs.
KiteConnect just displays the data on Kite.
Rakesh Sir has already responded to your query.
https://kite.trade/forum/discussion/comment/40198/#Comment_40…
No,turnover is not provided directly by KiteConnect APIs.
People keep asking for turnover, change in open interest,data which is derived from the other basic data.
Look, KiteConnect APIs,just provide the tick data from the exchange.
T…
Did you square off your CNC positions today?
https://support.zerodha.com/category/console/portfolio/holdings/articles/kite-funds-page-profit
This might be the reason for both m2m_unrealised and m2m_realised being 0.
You said, you are not getting any data,and the code you showed,you are directly using the method object kite.margins instead of calling the method like kite.margins().
You should have said,you are getting 0 in the section,getting no data and ge…
There is no issue with KiteConnect APIs.
Why don't you just read the traceback of the error in your code instead of writing on this forum for such common mistakes??
This forum is purely dedicated to technical queries related to KiteConnect…
You can get historical day candle data for expired future instruments from continuous historical data API:
https://kite.trade/docs/connect/v3/historical/#continuous-data
If you put it under try-except,you won't get it under traceback.
That's the whole purpose of try-except,to not break the program,if an error occurs.
Still,if you want the exception under traceback without breaking the program,you can do:
…
You can directly print the exception,like print(e) to get the exception message.
Also,your instrument is NIFTY25AUGFUT.
This is not a valid instrument, that's why place order API is throwing InputException.
The correct format for trading…
No,orders API only retrieves orders placed on that day.
https://kite.trade/docs/connect/v3/orders/#retrieving-orders
It doesn't include holdings,but if you buy/sell your holdings that day,those orders would show up in the orders API respon…
You can use the pnl from the positions API.
https://kite.trade/docs/connect/v3/portfolio/#positions
Also go through this thread once.
https://kite.trade/forum/discussion/3166/getposition-is-not-having-updated-value
You need to have a KiteConnect app to use the KiteConnect APIs.
When you create this,you will get both api_key and api_secret.
After that,you have to login as told here:
https://kite.trade/docs/connect/v3/user/#login-flow
A Kite…
A request token is valid only for a couple of minutes, after that it expires.
Make sure to use your request token immediately after logging in to your KiteConnect app.
No, it's not necessary that there is something wrong with the order parameters.
There could be other reasons like insufficient margin etc .
https://support.zerodha.com/category/console/portfolio/holdings/articles/why-is-my-order-getting-re…
You are sending incorrect order_id.
Your order_id is ...409 ,as can be seen in your log.
But,you are sending modify order request for order_id ...255,which must have been already executed .
The exception 'Order placement failed...' is from KiteConnect .
The error,'local variable...' is an python error.
This occurs inside a function.
If you are using the try-except as you showed here in your program with the API call,you wou…
A request token is valid only for a couple of minutes and can be used only once.
Make sure to use your request token immediately after logging in to your app.
https://kite.trade/forum/discussion/3224/session-expired