ANL

About

Username
ANL
Joined
Visits
3,164
Last Active
Roles
Member

Comments

  • @ketansp I have been able to achieve 5ms benchmark for 9000 instruments by doing all the processing in application memory. What programming language are you using? I am using Python. 5 ms is very good, but there are some other issues that may affect…
  • @TradeTastic I would say 9K is a fantasy count. Actual liquidity/active tradable instruments are very very less than 1K, say 500 instruments. 9K is actually for who makes a candle chart or for doing complete market analysis for companies like broki…
  • @ketansp What I stated was the performance difference between Postgres and Redis. As said earlier, "the right tool in the right context." I don't need 9K instruments; even if I have just 10 instruments, that's enough, so in my case, Redis is better …
  • To conclude: in memory DB for critical operations, disk based DB for non critical operations. Selecting SQL or NOSQL is purely subjective. Postgres is not good for critical operations, which are disk based. You must consider any in memory database f…
  • The normal naming convention is not like BANKNIFTY24J1651000PE; it is like BANKNIFTY2471651000PE and BANKNIFTY25MAR48000PE but from October onwards they changed to the month first letter instead of the month number. For March, it is like BANKNIFTY25…
  • I am sure nobody will answer properly regarding your query. liquidity is a variable, it depends upon the strategy or methodology each person has. Nobody can really find the liquidity; this is the ultimate truth that I hardly understood long ago. I a…
  • There is no July contract ready in the exchange, so it will not be available in the kite instrument csv dump file as well. for more deatils you can go through csv file: Here
  • You have to generate access token manually as per the regulation by the exchange. check for more details : Access token timing
  • I have a couple of ML logics that I have developed for long term purposes. I am specializing in LFT, so it really does not work, so not using it right now. Have been able to achieve profitability without brokerage and transaction costs Whatever you…
  • @ketansp Well, if you just want to store and sort tick data, then 1 GB of RAM with i5 or base variant processor is sufficient, but if you want to do many critical operations and heavy computing, then you should have high end. Why do we need to store…
  • Go through: Access token timing
  • According to your logic, 3 scripts are running synchronously, so your three programmes will call the quote API three times per second or at the same time. This may lead to hit rate limit. 1 r/s per app. If you setup multiple apps, this won't be an i…
  • The symbol is wrong. You don't get data by using the wrong symbol. Check the latest instrument dump file. Here
  • Order placement calls will only count as individual order calls; Order modifications are permitted up to 25 times.
  • @pd_DataFrame The terminology Tick by tick data and tick data are different, Go through: TBT data To mitigate this, I am considering subscribing to Zerodha's APIs as a backup for tick-by-tick data for all NSE equities. Zerodha only provides tick da…
  • I cant understand why you put kws.stop() , kws.conect() inside on_ticks() ? Don't put any tick calculations inside on_ticks() it will block your ticks if you do that. try this: def on_close(ws, code, reason): ws.stop() Include this threa…
  • You can call any trading instrument through loops following with API limits. It does not matter how many numbers of instruments you call; whatever you do should be within the API limit. Go through: API Limit & FAQ & Kite API Docs
  • Kite API doesn't provide instant option chain data; Kite provides only WS connections with Rest API service to get basic parameters. To get option chain data, you have to build it at your end with a WS connection. Go through: FAQ You can also depen…
  • Hey, One thing I missed to mention is that the charge of 4K + GST per month is for only 1 websocket connection, and you can't open multiple WS connections like Kite API. This charge is only for 1 WS + 50 tokens without REST API. You can't use the…
  • What about option premium? As far as I know, Premium wouldn't remain the same for the whole day as the Spot price. Option premium will change, and spot price will also change if it is tradable. If premium changes, all other parameters will also chan…
  • Kite provides historical data for trading options and equity; you may check with other NSE data vendors for expired data. I think it is a very expensive and inappropriate approach to subscribe to other data vendors for historical data. For just 50 t…
  • KIte API does not provide expired option data, go through: Historical candle data , Thread The possible way is to setup a WS connection, store tick data in any database, and create a candle for the required time frames. you have to do at you end.
  • KIte API doesn't provide those data in a single call you have to make at your end. You can fetch from instrument dump file : Strike Price, Spot Price, Expiry Date All the other data that you need to develop
  • Most beginners, or those who are unfamiliar with coding or APIs, will accuse Zerodha of hiding their egos and refuse to acknowledge that they are taking the wrong approach. That is the most common behaviour of humans. How come you so sure about it? …
    in Feed issues Comment by ANL August 21
  • Go through: Access token timing
  • @rakeshr I heard from Kailash that they are starting to test with Clickhouse. I don't know when they finished the testing.
  • @rajdkumar Choosing good DB, I want to say that the right tool in the right context. You can use any database, but make sure that you choose the right one for your logic. you can use any open source DB SQL and NOSQL If you want to do critical ope…
  • When posting a thread, you forgot to specify the actual problem. At its core, this forum is for developers who are familiar with APIs and algorithmic trading. Kite API does not provide code rewriting code or assistance in developing a strategy or lo…
  • Kite API doesn't provide a sandbox feature. you have to do at your end
    in Dummy API Comment by ANL August 16
  • If you use the API for order placement and the limit is exceeded, you will get an order placement error, which is listed in the exceptions and errors. Check common HTTP error codes and exception types. Read the documentation carefully.
  • Using the exception method, when your API limit exceeds it will hit the exception with 429: Too many requests to the API (rate limiting) Go through : Exceptions and Errors You can get API limits by doing different approaches so that you can avoid …
  • Yes, the KIte API provides live tick data and not tick-by-tick data that you need to set up a colocation in NSE. Kite API provides snapshot tick data through websocket streaming; you can fetch and process live tick data through any efficient DB. On…
  • You mean the API limit? When you call a quote or historical data multiple times, you get an error. Is that what you mean?
  • Rakesh has already stated the token timings, and the logic is simple. Check the logic:
  • Go through: Access token validity
  • @ansubur What should I consider from your quiet response? I am not a part of Zerodha. I am an independent Python Algo developer. I am helping people who are stuck to start or helping people to solve their logic issues as much as I possibly can. I w…
    in Feed issues Comment by ANL August 5
  • check your inbox
  • This can be done through any cloud service or cloud database Yes.
  • Go through this thread: Here If you require multi-login functionality, Zerodha cannot provide it unless you have mass production but you can overcome this by using different efficient approaches. It requires only your coding skills and the right lo…
  • @ansubur he live market feed is updating very slowly. Updating just once in every 10 seconds. This is happening in particularly in NSE Index segment data only. 1. Did you check with another instrument ? And what time period did you get delayed? 2. …
    in Feed issues Comment by ANL July 29
  • Kite doesn't have option chain data; you can stream real time tick data through the Webscocket API and create a custom option chain.
  • Yes, Postback is also an option but the Kite team says: For individual developers, Postbacks over WebSocket is recommended, where, orders placed for a particular user anywhere, for instance, web, mobile, or desktop platforms, are sent. So using WS …
  • Two approach, 1. WS on_order_update, To listen for order updates, you must write your own logic. 2. Polling API for order status Kite team doesn't suggest polling the order status; a better approach is to listen to the on_order_update efficie…
  • Ok. The logic is very simple. import time list_ = ['symbol1', 'symbol2', 'symbol3', 'symbol4', 'symbol5', 'symbol6', 'symbol7', 'symbol8', 'symbol9', 'symbol10', 'symbol11', 'symbol12', 'symbol13', 'symbol14', 'symbol15', 'symbol16', 'sy…
    in Basket order API Comment by ANL July 15
  • You may not understand the logic of the iceberg order. You can slice one order into multiple orders with small quantities. This is helpful when you have large orders and slowly place them one by one. This helps reduce the impact cost of execution in…
    in Basket order API Comment by ANL July 14
  • As per your query, you want to place basket orders, not iceberg orders. A basket order means that you can place multiple orders at the same time. Iceberg orders are different. Kite API does not have a basket order API, so you can't place it via API,…
    in Basket order API Comment by ANL July 13
  • Basket orders are not available on Kite API. check this thread: Thread Basket margins API is available Here , You can check basket margins with available margin in your account. Create a list or order queue to place multiple orders. You can pl…
    in Basket order API Comment by ANL July 12
  • The Kite API doesn't provide freeze Qty. You have to do it at your end. Check out this https://kite.trade/forum/discussion/13972/freeze-limits/p1
  • I checked again, For 100 tokens they are charging 4400 + GST. This should be either FNO or EQ. Kite Connect is scalable and low-cost, but those who need less latency can try GDFL.
  • @kakush30 I have not used GDFL, so what is the pricing? Per ws, how many tokens can be subscribed?
  • @kakush30 You can use both GDFL and KIte API. If you use the KIte API for order placement and GDFL for ticks, then the issue is solved, but it costs more. If you get a good trading income, then it's okay to manage.
  • @kakush30 Latency is the main issue. The stability of the Kite Connect API is good, but there are some narrow range opportunities for sub minute scalping with the Kite Connect API that we need to dig deep. There are other data vendors that provide …
  • @rohanrg What I learned from my experience is that we can't exactly find liquidity because it will generate and vanish in milliseconds or seconds. Most liquidity providers are HFT, and they are market makers. As a retailers, we have many limitation…
  • in AWS latency Comment by ANL June 20
  • Go through the API documentation here: API documentation & FAQ
  • You may refer to this thread about API poll limits: API Limits
  • @sujith It would be better to close this thread. I have decided to tweak my logic rather than the Kite Connect logic. You could have answered the question about whether it is possible or not.
  • @tradernoob I had used the TrueData Velocity feature but not the API service, but it is widely used and I am not sure about the latency. The main problem I am facing is that I am working on a trading strategy that needs the current issue to be solv…
  • @tradernoob I have read all of your threads before in Q&A. If you are a pure seconds based trader and want to scale up, I think the current issues will kill your strategy. PS: I look up to Zerodha as the leading stock broker in the API space. An…
  • @sujith @rakeshr @themohammedfaisal If there is a few millisecond discrepancy in the timestamp between the current and exchange timestamps, it is acceptable and normal for retailer trading. Please include milliseconds for all timestamps, as now…
  • 1 second delay will not be a big issue for traders with strategies more than 10 minutes, but this delay will kill traders who trade in seconds. @tradernoob I am wondering why no one raised this as a serious issue, though a lot of people use the Kit…
  • + I don't see any clock drift issues: Local time: Sat 2024-05-18 11:35:16 IST Universal time: Sat 2024-05-18 06:05:16 UTC RTC time: Sat 2024-05-18 06:05:17 Time zone: Asia/Kolkata (IST, +0530) System clock synchronized: yes NTP service: active R…
  • @themohammedfaisal Yes Agreed. LTT will vary depending on the instrument's liquidity. The current delay is beyond that; the current time and exchange timestamp should match, right? I have checked many times and tested with simple dummy code for time…
  • Any help would be appreciated. created this thread yesterday. I have been paying KiteConnect for years. I can't take a trade due to this issue. tick time mismatch: some ticks have same time:
  • Today I noticed the same issue. I just added up the exchange timestamp, and it is 1 second below the ticks I am receiving. Some ticks show on time; both the current time in my system and the exchange timestamp are equal.
  • You may refer to this thread: https://kite.trade/forum/discussion/2760/no-of-request-to-api
  • To sum up, I have noticed some instruments time differences are high, like a difference of 5 seconds or more. Is this definitely because of the last traded time of illiquid or far OTM instruments? The last traded time will print when there is a las…
  • Why do you need an independent program to get on_order_update? You can consume the same in either of those existing ws connections. The entire order handling program is considered a separate program.
  • Currently, I am running three subscription programs with the on_order_update program. Is this because of legacy reasons? Any exception for on_order_update in future?
  • Yes. You can use WebSocket to get order updates. It is not like polling using kite.positions() You can use on_order_update() and it is an event driven asyncrounous call. You will get order updates as updates are out of order. you have to do at your …
  • You can refer to this thread: https://kite.trade/forum/discussion/2760/no-of-request-to-api
  • You can refer to this thread and watch a video on access token retrieval and login: https://kite.trade/forum/discussion/13862/algo-trading-from-server-using-kite#latest & FAQ: https://kite.trade/forum/discussion/1994/a-curated-list-of-things-r…
  • Your question was 1: Would I have to manually generate my access token What I mean Kite API does not have the feature to generate access token automatically. You can use the Selenium driver on your end, but prefer to generate manually. A…
  • You can download all instrument file : https://api.kite.trade/instruments Filter BFO for BSE and then segment BFO-OPT or BFO-FUT
  • 0xc0000374 signifies a heap corruption error, indicating a problem with how memory is managed in the application. So, it may be caused by memory or thread mismanagement in your code. It seems you are using Spyder IDE from Anaconda Env on Windows. …
  • 1. Would I have to manually generate my access token, and feed it to my backend code in my server at the market start time everyday? Is there a way to automate this? And how long is the validity of one access token ? You have to generate access tok…
  • I can't respond without seeing your code.
  • 1. You may have included heavy computation inside on_ticks; that's why you got error. 2. Websocket will restart again if you have not included ws.stop() in your code. Solution: 1. Don't put heavy computation or logic inside on_ticks, as it is runn…
  • I can't see any issue with the quote code. It seems fine. check the steps: Check that the api_key and access_token are correctly set. 1. from kiteconnect import KiteConnect kite = KiteConnect(api_key="your_api_key") # set the access token for the…
  • Can't find any problems with the symbol, which was valid until today. Without a code or detailed log report, it is not possible to find the reason. check your order parameters: For BSE exchange=kite.EXCHANGE_BFO You may have used NFO instead of BF…
  • You can stop ws : kws.stop() Check out for more details: https://github.com/zerodha/pykiteconnect/tree/7df83ddcdbd5f74b4be6ae558b3b6a6dbfe05d94 & https://kite.trade/forum/discussion/12649/clean-way-to-stop-close-kite-websocket-connection
  • Yes. You can unsubscribe the tokens. Try this ws.unsubscribe([tokens]) You can check detail explanation: https://kite.trade/forum/discussion/comment/19217/#Comment_19217
  • You have to subscribe tokens using WebSocket 1. Try DB then fetch 2. Try native dictionary then fetch Quote ltp is a snap of WebSocket so You will not get data at the exact time you require. kite.ltp is an inefficient way to fetch data. You ca…
  • You can close this thread. I developed the solution.
  • @rakeshr Furthermore, while placing the order, we get initially OPEN, then COMPLETE. That is a normal case as it shows the same order in Kite Web as well, but while fetching through on_order_updates, I get COMPLETE first, then OPEN. What is the r…
  • Furthermore, while placing the order, we get initially OPEN, then COMPLETE. That is a normal case as it shows the same order in Kite Web as well, but while fetching through on_order_updates, I get COMPLETE first, then OPEN. What is the reason? I h…
  • You can check this thread : https://kite.trade/forum/discussion/2760/no-of-request-to-api
  • You can check pykiteconnect GTT examples: https://github.com/zerodha/pykiteconnect/blob/7df83ddcdbd5f74b4be6ae558b3b6a6dbfe05d94/examples/gtt_order.py Kite Connect 3 / API documentation https://kite.trade/docs/connect/v3/gtt/
  • GTT orders are not considered normal orders, so when you place a GTT order, it will create a trigger ID, not an order ID like placing normal orders. You will only get the order ID when the GTT order gets triggered. 1. You have to store the GTT tri…
  • You can check Zerodha's bulletin, as it is clearly mentioned that GTT orders will not trigger. You can place GTT orders, but it will not trigger, may be the reason it was working fine when placing GTT.
  • It would be helpful if someone could respond to the query.
  • @nikhilalgo I would like to add the statement that finding imbalances is an extremely amateur way of doing analysis and is not relevant in the modern trading world. What is happening in the market is exactly opposite what we learned from the books.…
  • ok. What is the current average order placing speed for LIMIT, MRKT, and SL LIMIT?
  • @sujith Please respond.
  • in addition+ Hmmm, kinda. I have multiple scripts running, so yeah, making a lot of kite.quote API calls again and again. Is this the reason for the error? Is it related to IP address or Kite API? I mean, I have subscription to 7 Kite APIs, but only…
  • @KamalChhirang WebSocket is faster than any API. As you know, the Quote API is just a snap of WebSocket streaming. You can connect WebSocket with a simple dictionary and then fetch the live updates. Don't put any heavy computations inside the on_tic…
  • @sujith Can you please shed some light on how this error occurs?
  • IOC will cancel automatically if it is not matched, but I want to cancel at a specific time. My strategy is to cancel if it reaches a specific time. I am getting the same error if I place a limit order.
  • I want to cancel a pending IOC order as it is not COMPLETE. The status of the order is still in TRIGGER PENDING or OPEN.