Kite historical provide candles till daily timeframe. so for weekly and monthly candles, we have to resample them.
below codes can be directly applied to historical data for getting weekly and monthly candles
df['date'] = pd.to_datetime(df['date'…
you can refer to the below code snippet.
from kiteconnect import KiteConnect
from kiteconnect import KiteTicker
token_file = str(datetime.datetime.now().date()) + ' token' + '.txt'
if token_file not in os.listd…
Instead of CSV, you may use excel to download individual sheets.
import pandas as pd
df_EQ = pd.read_excel(f"https://docs.google.com/spreadsheets/d/1fLTsNpFJPK349RTjs0GRSXJZD-5soCUkZt9eSMTJ2m4/export?format=xlsx", sheet_name = 0)
You can't get LTP using the library name - KiteConnect.
You have to create kite's object first and then call the LTP.
Refer to below pseudocode-
kite = KiteConnect(api_key=api_k)
data = kite.generate_session(request_tkn, api_secret=api_s…
Yes, @shivesh1987 It's mandatory to enable TOTP before placing an order through API.
During generating a session you need to enter TOTP. Once your access token is generated it won’t ask for TOTP again till your access token is valid for the next da…
When you will be logging in to kite for the first time, you need to pass the request token in kite.generate_session() . Once session is generated and you get access token in data,save access token into a text file.
If the session fai…
To read the spreadsheet from the given URL, you can follow the given steps.
1. Every Google spreadsheet contains a sheet ID.
ex - this sheet has ID = 1fLTsNpFJPK349RTjs0GRSXJZD-5soCUkZt9eSMTJ2m4
2. copy and split the URL till that sheet…
hi @[email protected]
If this is the error "Maximum Allowed Order Request Exceeded"
this happens when you try to place more than 2000 orders.
In your orderbook you may not be able to see 2000 orders.. this maybe because.
your algo may be placing o…
hi @[email protected]
If this is the error "Maximum allowed order modifications exceeded."
this happens when you try to modify an order more than 25 times.
please see this thread https://kite.trade/forum/discussion/2760/no-of-request-to-api
call order_history(for placed buy order)
suppose you stored buy order history in ord_details accordingly place sell order from that details
squareOff_order = kite.place_order(variety=kite.VARIETY_REGULAR, exchange=ord_details['ex…
You will get the status of any particular order by using 2 methods without any rate limit-
1. You can use order_history API call. Pass the limit order Id to the order_history function.
2. By using WebSocket call - o…
When we call quotes via API, we get 'last_trade_time' in its response along with other feeds.
If it contains time near to current time then you may conclude that the market is open.
this difference is not too big to worry about. Also this is caused since you are placing market order.. If you do this by limit order this difference will never occur ( but that may also lead to partial execution of your pair)
the logic you have posted above seems fine.
What the the difference between the limit you were expecting and which you actually got?
Although arbitrage algo is possible and not very difficult to implement.
Kite Connect is provided for a single user by default. It is for personal use only.
If you are developing a platform that is for mass then you can write to kiteconnect(at)zerodha.com and write to compliance team to get multi-user a…
Yes, you can do algorithmic trading in stocks on listing day like other stocks.
You will get its instrument token and other necessary details from Kite API's Instrument call to send orders to exchange.
there can be many methods to do this.
here is how I do it..
read the WebSocket data at 9:19:59 am then from the data pull out ohlc...
open = data['ohlc']['open']
low = data['ohlc']['low']
close = ltp at…
when you place an order it returns order id.
order_id = kite.place_order(tradingsymbol="INFY",exchange=kite.EXCHANGE_NSE,transaction_type=kite.TRANSACTION_TYPE_BUY,quantity=1,order_type=kite.ORDER_TYPE_MARKET,product=kite.PRODU…
if you are a beginner in algo trading then this series can help you...
also, I have shown how to make full orb code in some last lectures.
The problem is solved,
My algo was pushing orders for invalid quantity ... as the code was in try-except block I was not able to see the reason. Thus exceeding order limit.
A big thanks.
You may now close this thread.