ANL

About

Username
ANL
Joined
Visits
1,724
Last Active
Roles
Member

Comments

  • @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.
  • This is very personal. Python offers a rich library that is well suited for both machine learning and data analysis. Python is the language that "most people" use for quant trading because of its ease of use. Python can handle practically all the wo…
  • You can check out this thread: https://kite.trade/forum/discussion/2760/no-of-request-to-api#latest
  • Deciding the program language is very crucial. Before you go with a programming language, you must decide what kind of strategy you have or what time you want to place orders. If your methodology is for high-speed trading, then I would prefer a comp…
  • +In addition: I would like to answer very simply, historical data is for back-testing purposes. You can't use historical data for live trading. If you poll the rest API for the minute candle, you will not get the exact time you require. Generate you…
  • I hope this thread is helpful: https://kite.trade/forum/discussion/3828/last-minute-historical-data#latest https://kite.trade/forum/discussion/2604/convert-ticks-to-candle#latest
  • Zerodha server is not delayed. You can't use historical data for live trading. You can't fetch historical data at minute turnover or for a specific minute of candle data at a specific time, if you prefer. no guarantee and not good polling rest API f…
  • You can check for .net kite documentation: https://github.com/zerodha/dotnetkiteconnect
    in Place Order Comment by ANL January 12
  • You can check kite document: https://kite.trade/docs/pykiteconnect/v4/#kiteconnect.KiteTicker
    in Place Order Comment by ANL January 9
  • @rakeshr You might need to build this relay system at your end, that triggers order placement for another account using a different API key. Is it possible to connect from a single-user API and make order placements for different user accounts? Algo…
  • can you please confirm.
  • @rakeshr > As I understand from the thread you shared, we can't predict the time it's generating the candle, so the poll historical data API is not good for live trading. (e.g., 10.00.00 a.m. candle forming after 10.01.30 a.m. (10s or 20s dela…
  • Can you please share your insights?
  • @sujith @rakeshr can you please share your comments.
  • @sujith I agreed. OHLC derived from the last traded price differs from historical data. I would want to hear what you think about this. Can we trust OHLC derived from last_traded because both historical data and derived OHLC differ? suppose volumes…
  • @rakeshr please advice
  • I had previously worked outside of India. You can use the Kite API just as easily as you would in India. You need a more stable Internet connection. Change the time zone in your code. That's all I can say that technically. You must pay NRI taxes in …
  • @kakush30 Thanks for the suggestion. I have configured Ubuntu on AWS and am connecting via RDP, but it is very slow, even if I have a higher configuration. Could you please advise me on how we can connect a Ubuntu machine from Windows RDP? From the …
  • Rather than you wasting time on a gender test, you may politely express your thoughts. I am sorry if I tagged you. You seem to be completely ignorant of the definition of discussion, which is the act or process of talking about something in order t…
  • @MAG @kakush30 To begin with, I have used Windows since I was a little child. Psychologically speaking, I would undoubtedly think of Windows Side more. I know Windows has a lot of bugs and needs to improve more. It might need more hardware requirem…
  • @sujith You mean in any field in full mode, if ticks have changed, then it will stream the data irrespective of changes in the depth field?
    in Depth OB Comment by ANL November 2023
  • @MAG @kakush30 @rohanrg
  • @kakush30 Database bottlenecks, in my opinion, will arise in both scenarios if the code is not optimized for handling larger data operations or is concurrent, as Zerodha is. They may have bottlenecks as a result of dealing with millions to billions…
  • @kakush30 Redis is not a bottleneck; it is faster than any other DB. If we have learned well, this is one of the best choices. Now I am facing some lag because either my code or my machine has some issues. scrutinizing the lagging issues. What I le…
  • @kakush30 My project has to handle high-frequency data in a live scenario. I think Redis is the best choice. I don't store a lot of data on the local drive as my code logic is different. As of now, I have to handle high-frequency order books. Handli…
  • @rohanrg 1. Could you please give some clarity regarding the way you store data in TimescaleDB? Actually, I am storing OHLC data and some other computations every minute for a 1-minute interval. One code has multiple operations beyond just storing…
  • @MAG What's your opinion of using TimescaleDB over Redis? PostgreSQL DB is storing data on the ROM, not in RAM. TimescaleDB has time series, but Redis also has time series. Redis is using RAM, so efficiency and faster performance are intact in Redis…
  • @rohanrg Thanks The timescale is PostgreSQL DB, and I have not used or tested this DB. If you are facing any delay, I would recommend using Redis. It is faster than other DBs to handle high Fz data. But if you have not tested Redis , then it might b…
  • @rohanrg You stated that you are storing tick data for 650 tokens and then processing OHLC. So, which data storage are you depending on for this process? I think you may have delayed OHLC by 1 minute, right? because in the live scenario, you cannot…
  • @rohanrg I am using a Surface Pro 4 Core/16GB, but it cannot perform as per my needs.  So, that's why I am planning to use a higher configuration. Currently, I have 12 different projects running, and some code should run 24 hours a day. I am confuse…
  • @kakush30 @MAG I have changed my local ISP to Airtel Xstream fiber. Now I get www.google.com ---- Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 4ms, Maximum = 5ms, Average = 4ms …
  • @kakush30 As you stated, you are storing 3 hours of data in the in-built memory. While retrieving from the inbuilt memory, does it have a chance to miss the data? what kind of data you retrieve from the API. If you are retrieving from a websocket,…
  • @kakush30 Thanks, what about Jio ? I think a business leased line is more expensive than a normal home connection.? Which is the best ISP connection to reduce latency below 5 ms? You have mentioned static IP for home, but is it possible? Usually, IS…
  • @vaibhavsharma13 May I know how it is possible?
  • @kakush30 I am using a local ISP, not popular. I getting Minimum = 17ms, Maximum = 17ms, Average = 17ms for api.kite.trade. I know the latency is very high. sometimes the Websocket connection is not stable because of this latency issue. May I know…
  • you can clear the ws.stop() function in your code. this will block restarting check this thread for more clarity https://kite.trade/forum/discussion/8019/faqs-on-pykiteconnect-specific-to-python-client#websocket-streaming
    in KITETICKER Comment by ANL October 2023
  • @MAG If I change to AWS, then the latency of the ISP will not be an issue, right? If you use native Windows RDP for login, the AWS is delayed. or will the ISP latency kill the user experience while using AWS? What is your experience on this matter?
  • @MAG please comment
  • @MAG Except for the efficient virtual machine advantage when commuting and the lower latency, I believe AWS is not ideal for me. I checked the pricing of the instance; it is actually head-over for me to keep the subscription. I am still using the de…
  • Thank you @MAG Can you please suggest an efficient AWS configuration if compared with the AMD 7950X-64GB combo?
  • Thanks @MAG I am using a fiber connection with an RJ45. I will check on this issue with my ISP. I am processing tick data and generating OHLC. I am combining both Websocket streams and the Rest API in my project. The current historical API is fetc…
  • Thank you @MAG Exactly, I am using the Rest API and Websocket API together in one project. I needed to know that faster band width helps faster fetch data. so, Now I've come to the conclusion that faster bandwidth wouldn't help me achieve faster ex…
  • @srinidhihebbar Can you please explain regarding the latency, How we can reduce the latency ?