@rogerrajeev32 Read properly. Bhavcopy has ohlc for the whole day. So,only daily candles are changed. Lower time frame candles are still made by the ticks received by zerodha.
https://tradingqna.com/t/why-are-the-ohlc-values-on-daily-and-hourly-charts-different/17495/2
Trade did happen at 131,zerodha just couldn't capture the ticks at that time.
If you want to buy options,there is no margin,just premium is needed,so,multiply ltp by lot size . For margin for selling options,use the margin api:
https://kite.trade/docs/pykiteconnect/v4/#kiteconnect.KiteConnect.order_margins
https://kite.tr…
Check this,maybe you have the same problem.
https://kite.trade/forum/discussion/10912/not-able-to-place-amo-orders-using-kite-api#latest
Are you using variety 'REGULAR'?? If yes,try 'regular'.
If you just need last 5 min data and 1 day historical data,i would say it's better to use historical data api rather than websocket. About your historical data being empty,you are passing wrong dates, it's 2022 ,you're passing 2021 . And if you h…
Nothing should be inside on_ticks except receiving ticks or the helper function. On_ticks is just to receive ticks. All the required calculation should be done in helper thread. I wish your system works properly during market hours.
What's the error you are getting when placing orders?? Do you have enough margin to place a sl and limit order at once?? That could be the error too. If you don't place orders inside try-except block as in the documentation,if any exception occurs,y…
1. Yes,it is ok to place orders from api and then cancel them from web or app . I have done this several times.
2. Are you sure you didn't accidentally left any order open or maybe your code would be running,and it placed another order afterwar…
Check now. The change is 0.03%. Kite is under maintenance at night time,the prices you see are last trading day's price for few hours. If you look clearly,the ohl are also as of the last trading day i.e. Tuesday's. On Tuesday,it was 1.61% down.(You …
@kamalv Read the documentation properly. Sujith sir told in the above thread too. The close price in the quote response is the close price of the previous day. So, you don't need to save anything. To calculate net %change just do ((ltp/close)-1)*100.
Read this :
https://kite.trade/forum/discussion/1576/change-percentage
Only for indices, KiteConnect(quote) is sending net_change. And it's true,i just checked,net_change for equities and derivatives are 0 too. I tried with nifty and bank nif…
Yes. Filter the data of specific instrument by specifying the instrument token. Like, 17850CE instrument token is 10135554. So,
for tick in ticks:
if tick['instruement_token']==10135554:
_17000_CE_ltp=tick['last_price']
@Kamalv I tried rn. It's giving me the net_change correctly. To calculate %change,just do (net_change/yesterday's close)*100. For which instrument are you using quote call??
Make a dictionary with keys as the strikes' call and put. The value of each key should be a dictionary with all the required data,like price etc. Means,we are creating a dictionary of dictionaries.To start,just put the values as empty strings or Non…
The close price of any period is the ltp of that given period. Like,for 1minute interval data, the close price of let's say,9:20 candle is equal to the ltp at 9:20:59.
Log in to developer's forum using the email/password associated with the app. That's the only way. Or atleast if you have email,use forgot password option.
Yes, it's possible to send 1000 requests/sec through python. But what's the point, KiteConnect anyways has a rate limit of 10r/s for orders.
https://kite.trade/forum/discussion/2760/no-of-request-to-api
https://kite.trade/forum/discussion/3490/query-on-avfailability-of-historical-minute-candle-data-and-corporate-actions . The smallest time frame available is 1minute. Tick data is only streamed live during market hours through websocket. It is not s…
hhttps://www.nseindia.com/products-services/equity-derivatives-nifty50
Quantity freeze is reviewed monthly.
You can write this data in your program and check every month start. Or you can download the xls file given on this page under quantit…
This is the login url https://kite.zerodha.com/connect/login?v=3&api_key=xxx. You will get a request token after you login in the url.
Below is the correct way to generate access token:
kite=KiteConnect(api_key=api_key)
data=kite.gen…
@sunderskite You don't need to read the whole file manually. It's impossible : . You can use csv module to extract required data from it. It hardly takes 2-3 seconds.
You have to fetch daily data and then build higher time frames from the data.
https://kite.trade/forum/discussion/7585/getting-weekly-and-monthly-data-ohlc-candles-by-using-historical-data-api
You have to fetch instruments dump.
Like kite.instruments().If you want instruments for specific exchange you can specify like kite.instruments('NFO').
You can read here:
https://kite.trade/docs/connect/v3/market-quotes/#instruments
…
This forum is for KiteConnect api . For queries regarding kite platform,you can ask here https://support.zerodha.com/ or
https://tradingqna.com/ . For now,yes,you will get margin benefit from open positions,but,you should have enough margin to s…
You can subscribe up to 3000 instruments/shares in a single WebSocket connection, and for single API key you can have 3 WebSocket connection, so you can stream maximum of 9000 shares for a API key.
Your trading symbol is wrong . It should be BANKNIFTY21DEC35500CE.
Refer this thread:
https://kite.trade/forum/discussion/5574/change-in-format-of-weekly-options-instruments#latest
while True:
try:
print(kite.instruments('NSE'))
break
except requests.exceptions.ConnectionError:
continue
To handle any exception,catch it and then just use try-except block as i showed. In this c…
I don't know the logic you are using. How can i say if there is any logical error?? If there would be any syntax error, python would show error. Actually,if you are doing algo trading,first you should try 2-3 trades manually according to your strate…
for k,v in dict.items() is used when you have to iterate over all the keys and values of a dictionary. In your case,you only need the instrument_token from every dictionary(tick) in the ticks. So,it will be called like i told in my above comment. Th…
If orders take too long to execute,then it means your code is still processing the strategy part. You maybe doing some heavy computations. How much time it takes to fire order once buy/sell signal is generated??
You are not processing the ticks correctly. I told you that ticks is a list of dictionaries. So,it should be not ticks['instrument_token']==nse[i].
It should be like:
for tick in ticks:
if tick['instrument_token']==nse[i]:
pass