MAG

About

Username
MAG
Joined
Visits
1,491
Last Active
Roles
Member

Comments

  • User user = null; user = kiteConnect.generateSession(reqToken, apisec); kiteConnect.setAccessToken(user.accessToken); kiteConnect.setPublicToken(user.publicToken); user = kiteConnect.generateSession(reqToken, apisec); kiteConnect.setAccessToken(us…
  • The instrument list is public information and hence the kite.instruments() will succeed even if you are not authenticated. But to get any other account information or place /modify orders authentication is needed. Instead of using the kite.instrume…
  • Fair enough and I apologise. But I would like to point out one factor that many people miss. That kite web is separate from kite API. And any feature available on one might not necessarily be available on the other.
  • Is this related to API or kite web/mobile interface? If its related to kite web, you would need to create a ticket with support. And then yes maybe you can post a link to the ticket here and tag one of the devs/moderators to bring it to their atten…
  • Please do not give wrong answers. The most important part of @visasimbus post is the following line Is zerodha kite connect python client has implementation of ticker to get positions when there is a change in position? And the answer to that is a…
  • It answers your question but you do not want to hear it. Sensex is BSE Index/FNO. It clearly says that in BSE icebergs are available for equity only. F&O is not mentioned. So the answer is no for sensex. Same for bankex (BFO-OPT) Everything ne…
  • No you cant do that. The order limits are set at the account level and not the app level. so whether you create one app or ten, you can still make only 10 orders per second, 200 orders per minute and 3000 orders per day. The other api calls like hi…
  • @vaibhavsharma13 please read the FAQ section. It's mentioned there.
  • You will need to run three threads using the threading or multiprocessing modules. However using a single python client to make multiple connections to websocket is a bad idea. This approach just increases the code complexity and the chances of thin…
  • Read the first four pinned posts on the forum. 1. Changes to per day order limits 2. FAQs on Pykiteconnect(Specific to python client) 3. Frequently asked questions(FAQs) 4. A curated list of things related to Kite Connect API Out of these number 2 …
  • @OptionQuant Thanks for such a detailed reply! And, I forgot to mention that all timings in my query are as per 24 hour clock..so for instance by 12:15 am I meant 15 mins past midnight. Some people refer to midnight as 12 as the clock shows 12. But…
  • Many of us here have entire algo setups with code running in the backend doing everything from getting ticks from websockets, computing candles, running strategies and trading/order placement. Some of us also have real time monitoring / reporting of…
  • I would suggest that you try connecting to websocket using backend command line code in the language of your choice - preferably python as its the easiest for anyone to pick up whether someone is adept at another programming language or absolutely n…
  • @OptionQuant Noted - the reply is again involved so will reply by EOD.
  • Disclaimer: Not part of zerodha team but a API user since 2016. They have mentioned in the FAQ's that access tokens are flushed sometime between 5 to 7:30 am everyday. What I have determined from personal experience since the past 8 years is that …
  • All I would say in response is if you are new to api based trading then spend some time to read the documentation and FAQ's carefully. Most of your queries would already be answered there. Then when you start coding, look at sample code and first st…
  • How did you determine that the value for tradingsymbol should be MCX:CRUDEOIL24APR7100CE? Read the documentation carefully. When you ask for a quote the symbol is given as "exchange:tradingsymbol" format. Thats because one can ask for a quote for m…
  • The kite web UI and the API are two separate things. Just because you see something on the web UI does not mean it will / should be available in the API. The API is simple building blocks where you can build any functionality you want. In this cas…
  • Just looked up Quantiply. Quantiply does not seem to support zerodha either officially or unofficially. Either way even if it was supported, you would need to contact them about any issues with their service.
  • You have to use the kite ticker websocket api to get the ticks, process the ticks and compute this or any other detail that you need.
  • Nope! Check the instruments list at https://api.kite.trade/instruments. That contains all the instruments provided/available.
  • @algos Why cant you give details out here itself. Whats the idea behind trying to get people to join an external telegram group? @sujith probably you need to have this conversation internally about contact harvesting on the forums which can be used…
  • If you don't know about the market please learn how the markets work. Understand each component of data and order details well before you start dabbling into API based trading. You can't build a building without having a solid foundation. Similarly …
  • No idea about that. I think you would need to have an official tie up with Zerodha. Some folks do it without a official tieup too but doing so violates multiple SEBI directives. kiteconnect as well as any other broker provided API is designed only …
  • @nikhilds That depends on how you generate your access token. Many people try to automate or semiautomate the flow and in that automation they end up opening a new browser window for kite which logs out the previous session. Keep this simple thing…
  • RTFM, go through the FAQ's and you will realise that there are ratelimits for api calls. You need to maintain the rate limit. The simplest way of achieving this is to have your code sleep for some time between subsequent requests. Please go through …
  • On having a closer look at the screenshot in your first post I see the key as "Authorization" and value as "token api_key D2eho..." when it should be "token api_key:D2eho..." a :(colon) instead of space after api_key. RTFM and copy and paste examp…
  • @swapv18 The instruments call with go through with or without authentication. So the fact that you get the instruments does not mean that authentication worked for the instruments call and is failing for the rest. Another way of saying this is that…
  • @arijit101 Btw this is the link to the comment containing the code. https://kite.trade/forum/discussion/comment/44453/#Comment_44453
  • @arijit101 Also all the formulas are known. You can write your own methods to calculate the charges. I have some post here where I have shared the entire method definition for computing costs. Look it up If you copy that code as is and call it wi…
  • Yes and which is why many of us here run our code on the cloud using AWS/GCP/Azure.
  • Code was working fine till last week and the present week I have been travelling. When computer sleeps after sometime, I get a read timeout error. You clearly were not on your original home network when you originally posted this. You said you are…
  • @mb12 were you trying this out yesterday/today? Your post date is March 16. The second post is today morning. How do you expect to receive market quotes when the market is closed?
  • @gurpreet Thats a library written by someone and made public on the internet. You will have to contact the person owning that library for support. It has nothing to do with zerodha. Also a quick perusal through the code showed at least one severe …
  • Where did you get the line kite.option_chain('NSE') from? Can you post a link to the source? Kiteconnect official api and clients do not have a call for getting option chain. Or in other words a ready made option chain is not available for downloa…
  • @abhi_shah was it a market order? "4. Market orders in all segments will be blocked for the first two minutes of both sessions." from https://zerodha.com/marketintel/bulletin/371327/live-trading-session-on-saturday-march-02-2024 And wonder why your…
  • @Matti Thanks for the update and the link to the circular.
  • Same here python client gives the ticks as a list of dictionaries instead of individual ticks like in golang. And I get an average of 100 ticks per minute or 37500 (+-0-10) ticks per day. And this has not changed in the last few days.
  • You have to write your own logic for this. From 9:15 to 15:30 is 6.25 hours or 375 minutes So at EOD after market close if you want last 1000 candles of 5 minute interval that would be 1000/375*5 = 13.3333 days worth of data. So you would get data …
  • @zerodhaVyankatesh There are N number of ticks per second depending on the liquidity of the instruments. I don't know whats the average but I wouldn't be surprised if a very liquid instrument has hundreds of ticks per second at the exchange level. …
  • @zerodhaVyankatesh The OHLC information will never match exactly as we get a subset of ticks from the exchange. As long as they are close, you shouldn't worry. Right now I don't do comparisons. But when I started out, I used to do so and they were a…
  • @pareshbhatiya What programming language are you using? How are you trying to get the quotes? Are you using the websocket or are you using the kite.quote method/call? Without proper details how do you expect anyone to guess whats going on at your e…
  • @vaibhavsharma13 your comment is incorrect. @khalid kite.ltp API call only returns the instrument token and last price. - Check the documentation at https://kite.trade/docs/connect/v3/market-quotes/ or https://kite.trade/docs/pykiteconnect/v4/#k…
  • Check this thread for reference. https://kite.trade/forum/discussion/comment/45901/
  • There was no issue at all. How were you searching for the banknifty instruments? Are you creating symbol names on your own or referencing them from the instrument list? Thats a common mistake many people do. I think you might be making the mistake …
  • @trd1 Ok. Have you tried getting the tickdata, generating candles from that data and then comparing how it fares. Or candles from other sources like tradingview or kite web or Investar?
  • Absolutely no idea about the 3:05 candle. But then its the 'historical' data api. Its not supposed to be used for current day data and esp for any live trading. Again as said earlier, I am not a member of the zerodha team. I am a long term user of t…
  • This should answer your query. https://support.zerodha.com/category/trading-and-markets/trading-faqs/articles/ltp-doesnt-match-close A somewhat similar logic applies to open price too which is why many users complain that the open price has changed…
  • First of all - your systems should never run on local time. They should use NTP to sync their time to reliable NTP servers. Second, if you want minute level candles for live data, the only reliable way is to use the kite ticker to subscribe to the t…
  • Refer to my understanding of the topic based on discussions in my circle. https://kite.trade/forum/discussion/13704/sebi-banning-api-based-trading#latest This is all due to 1. Unregulated fintech companies providing algo trading as a service. 2. …
  • If you are new here, please spend some time going through the forums. This topic has been discussed multiple times and there is a very specific reason the access token validity is set to one day. All the information is out there in the faq's and fo…
  • @naveen278 I am not part of SEBI or even Zerodhas team. But I have spent quite some time reading and researching this topic. My learning and common sense tells me that if you want to provide a service where you provide the algo but it runs on indivi…
  • Such kind of forum posts are not useful to anybody. What do you mean when you say "i am not able to fetch request token even if i have bought the interactive api from developer.kite". The request token is returned when you send a http request like…
  • Any idea why these prices keep changing? Are you getting the current days live data?
  • @Mr_rajatmishra the documentation is clear - if the documentation shows instrument_token then thats what you need to provide in the api call. Computers and programming are very specific. If a system/api is designed to take instrument token as input…
  • Read the heading carefully - "algo platforms and strategy providers" You are mixing up things. There are individual traders using the api to trade. And then there are these so called algo trading platforms and algo trading strategy providers who pr…
  • Its been absolutely stable at my end for last few days. And if there was an actual issue, there would be a lot more folks complaining on the forums. It's either to do with your code or your internet connection.
  • From my observations it can be anything from 30 seconds to a few minutes. Historical API is meant for backtesting. It's not meant for intraday or live trading though many users try to use it for that purpose. From Zerodha's point of view, getting …
  • You get all index details at NSE website - https://www.nseindia.com/market-data/live-market-indices Click on any index name to get the details For eg, I scrolled down and clicked on Nifty Auto under sectoral indices which got me to this link https:…
  • There are multiple things here which i need to go over one by one so I will give a proper detailed response later in the day after market close.
  • For those complaining about 504 errors, I assume you trying to make the kite.quote API call again and again multiple times in a continuous loop. Is that right?
  • @r95990 the only way to properly debug this is to print a tick as its received by on_ticks and then print the very same tick passed on to the feed_data method. In order to format the output better, add the following lines to the beginning of your fi…
  • @sujith When the tokens are cleared, can there be an additional check for age? If one wakes up at 5 am and create a new access token for the day, ideally, it should not be cleared at around 6:00 am.
  • I have coded in my algo that for last day of expiry on any given month is considered as monthly expiry. If it is monthly expiry symbol formation is different. Due to which it got broke. Now i am not sure how to take it forward in future to handle th…
  • same browser, same session, 6-8 kite tabs Can you walk me through the flow. If I understand the steps you take, maybe it will help me spot a probable cause for this issue.
  • @r95990 'mode': 'quote' says it all. You need to change the mode to full. In quote mode you will not get market depth. in your on_connect method you would first subscribe to the instrument tokens and then set the mode to full as follows def on_con…
  • when I open multiple bookmarked tabs at once, it logs me out of all the sessions on kite web @pseudo Are these bookmarked tabs in the same browser and browser session? How many tabs are you opening?
  • If you read through the documentation and the pinned FAQ's you would have realised that this is by design. The exchange mandates that each user needs to log in manually everyday that they are trading. So if a user is allowed to call https://kite.ze…
  • it started running fine after some time without any change, and the error was random when i ended up sending wrong strikes to quote Ok, but this means there is some logical error in your code that is unresolved and could come back to haunt you late…
  • This is an error in your code. However without a debug trace or looking at your code, no can determine whats wrong. There should have been an accompanying line before this mentioning the line number where this error occurred. But this is definitel…
  • Today is BANKNIFTY weekly expiry for the last week of January 2024. BANKNIFTY monthly expiry was on the last Thursday of Jan 2024 i.e. 25th Jan 2024. The logic is simple - till date for BANKNIFTY, the weekly expiry is every Wednesday. Monthly expir…
  • You can try that - but there are no guarantees it will work. We have no idea whats going on with your broadband internet connection other than the fact that its flaking. And most home broadband connections are like this. They will have temp conn iss…
  • Login flow i.e. data = kite.generate_session("request_token_here", secret="your_secret")needs to happen just once a day in order to generate the access token. Once the access token is generated you can save it. And then you just need to initiate th…
  • Are you running this on a home broadband connection or on a cloud/datacenter server like AWS etc? If its home broadband, its probably an issue with your broadband connection flaking.
  • mode': 'quote' Try setting the mode to full. I use the full mode and I get timestamp as well as last trade time. I havent tried but I think in quote mode timestamp is not sent. I remember reading about this on some other thread.
  • In the python client each tick received is a list of dictionaries as denoted in https://kite.trade/docs/pykiteconnect/v4/#kiteconnect.KiteTicker. Scroll down and search/look for the section below the line "Tick structure (passed to the on_ticks call…
  • Can you use one access token on multiple machines? yes. Can you use one access token on Multiple algo providers like tradetron and quantiply? Yes. But its definitely not a good idea. Unless you have a way of ensuring one app does not modify orders …
  • I can help you. But before I do, I need to know your background. Can you answer each of the following questions. 1. Are you an active trader/investor? 2. If yes, How long have you been trading/investing in the markets 3. Do you have programming expe…
  • You need to log in manually everyday. Thats an exchange mandate. And everyone here does the same. The only variable that varies everyday is the request token which needs to be generated manually So what you can do is script it up such that it prom…
  • @vishwas This is not possible via the API. For this you have to generate your own maps based on data from nse website in the market data section https://www.nseindia.com/market-data/live-market-indices
  • 403 forbidden is an access denied error. Has your api app subscription expired or are you using an expired access token?
    in Login issue Comment by MAG January 4
  • Please read the documentation all your queries are already answered there. https://kite.trade/forum/discussion/2760/no-of-request-to-api This clearly mentions that the rate limit for the historical api is three requests per second. Its obvious you …
  • You can/need to write your own code to do this. 1. Place the order 2. Monitor the position at your end using tick data. 3. Exit the position if either stoploss or target is hit. The idea of the API is just that. You have the building blocks to bui…
  • @shivdas_b it might be something to do with your code. I have been punching orders from AWS and its always instantaneous.
  • If you know the dates, all you need is these three cli commands curl "https://api.kite.trade/instruments" > instrumentlist.csv cat instrumentlist.csv | grep NFO-OPT | grep -i "BANKNIFTY" | grep -vE "MIDCPNIFTY|FINNIFTY" |grep '2024-01-03' cat in…
  • Yes AFAIK there was a company called ACI which was a penny stock and got delisted somewhere around 2016. Allied Computer Intl
  • Just log out of both developer console as well as kite.zerodha.com Then log into kite first and then the developer console and see if the issue resolves.
  • @ashishbajaj If the orders are originating from your app; using the API; then you can configure the postback url which points to your server. So when any order actions are completed the Zerodha api servers will send a post request with the order det…
  • @Aashu88 BANKNIFTY,10023170,39153,0.0,NFO,BANKNIFTY23D1346800CE,0.05,46800.0,CE,NFO-OPT,2023-12-13,15 BANKNIFTY23D1346800CE is weekly option strike that expired yesterday. 2023-12-13 If you want the corresponding instrument symbol for the current w…
  • All the data is available. I compute my own PNL for each trade I take, Plus PNL of open positions in real time. I am wondering if I am missing something and not understanding your query.
  • Check the api rate limits here - https://kite.trade/forum/discussion/2760/no-of-request-to-api
  • Pardon me but If I may add my own two cents here: Options instruments are derivatives and their price can change due to various factors, the most important of these being: 1. Price of the underlying asset changes and this will result in the price …
  • Anything and everything is possible @ashishbajaj. It all depends on your market knowledge and coding skills. You can look at smallcase, streak, coin, sensibull etc. These are all tools/products developed based on the same kiteconnect api. You can f…
  • @spartacus Glad to help. Please also note that any change tracking logic will only apply to fundamental/spot instruments on the NSE and BSE and not derivative instruments (FNO) . The instrument tokens for derivative instruments could be recycled ove…
  • @Balaganga https://pasteboard.co/ZvF6rjqXiPh6.png Please look at the documentation. I have attached the screenshot above. Your instrument call is wrong. Instead of inst=kite.instruments("NSE") you have to do inst=kite.instruments(exchange="NSE")
  • https://www.just-food.com/news/indias-lt-foods-buys-back-daawat-foods-stake-in-salic-saudi-arabia-partnership/ I checked the instrumentlists for today and found the instrument token for LTFOODS which is 3536897. Then i used Linux cli tools to searc…
  • @manmohan3108 Which OS are you using? This will enable me to respond in a way that you can understand. If you are using or conversant with Linux, I can give you CLI based explanations. If you are using windows, you will need to use excel. Once yo…
  • @spartacus Can you let me know a time frame when it was named as daawat? a month ago? a year ago? etc. I know the answer. But i want to doublecheck and confirm before I give you a proper answer will do so after the market close. In the meantime if y…
  • Will respond with solution as well as suggestions later in the day. Its market time now.