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'…
Hi @nayana
you can refer to the below code snippet.
from kiteconnect import KiteConnect
from kiteconnect import KiteTicker
import datetime
import os
token_file = str(datetime.datetime.now().date()) + ' token' + '.txt'
if token_file not in os.listd…
@devshoe
Instead of CSV, you may use excel to download individual sheets.
ex -
import pandas as pd
df_EQ = pd.read_excel(f"https://docs.google.com/spreadsheets/d/1fLTsNpFJPK349RTjs0GRSXJZD-5soCUkZt9eSMTJ2m4/export?format=xlsx", sheet_name = 0)
df_…
Hi @being
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…
@m1ahess
Request token obtained from the redirect URL expires in a couple of minutes
You have to use access_token obtained from generate_session() throughout the day.
Hello @m1ahess
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…
Hi @devshoe
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
Hello @rishi6696,
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…
Hello @rsamikan
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.
refer this
2. By using WebSocket call - o…
hi @Anbalagan
see this link .. https://kite.trade/docs/pykiteconnect/v3/#kiteconnect.KiteConnect.place_order
use this to make a order with opposite transaction type.
Hello @nayana, you can use finplot, It is a python library.
refer below documentation
https://github.com/highfestiva/finplot
https://pypi.org/project/finplot/
Hii @Rekha
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.
Refer this
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)
Hi @rajatg97
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.
Hi @chiragchopra
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…
@okalex
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.
instrument list
hii @rajeshdua
see these links below.
https://kite.trade/forum/discussion/comment/7729/#Comment_7729
https://kite.trade/forum/discussion/comment/24653/#Comment_24653
hii @ZW2914
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...
so.
open = data['ohlc']['open']
high= data['ohlc']['high']
low = data['ohlc']['low']
close = ltp at…
hii @amandeep179018
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…
hii @hpatel9999
Yes, it will place multiple trades if the condition is satisfied.
You would need to block it programmatically.
see this video for the solution: https://youtube.com/watch?v=_YzPmBPRSN0
hii @samphel
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.
https://kite.trade/forum/discussion/6216/python-and-kiteconnect-series#latest