Should be fine since yesterday. We did few fixes yesterday around early trading hours as we got to know about the issue. And we logged WebSocket data for the whole of yesterday post that. Haven't encountered any Server-side error post that.
What's …
The code looks fine. Got placement id too,which got printed by print statement MIS Order placed. ID is: 201008004111510. And there is nothing post-print statement to throw an exception.
Websocket only steams live ticks. For different period data, you need to build the same at your end using WebSocket tick data. Can have a look at this thread.
I am getting an exception "The remote party closed the WebSocket connection without completing the close handshake."
Is this happening because of any code side error? Can you paste the complete error stack trace here
You can check the example WebSoc…
How can I get details of an order that I have placed in the past?
We don't provide this feature through APIs for previous/historical order, you will have to manually check-in Console Order History
@GZ5928
Does GET /portfolio/holdings return pnl , avg price only for the current holding or includes previous squaredoff trades pnl also
You can go through this article to understand avg holdings price calculation.
GET /portfolio/positions . Can I …
(403 - Forbidden)
You are getting 403 status here. Either your access_token or API key is incorrect. Re-check on that part. Refer to this documentation to understand login flow.
Post setting access_token (kite.set_access_token(data["access_token"])). Are you getting any error while making API calls?
You can check the example code here.
@sbdavra
We just re-checked all scenario at our end, 3 connections with up to 4000 instruments are working perfectly fine. You get 429 - TooManyRequests, only if you have spawned more than 3 connection.
You need to check the same at your end, that…
429 - TooManyRequests
You seem to be exceeding the rate limit here while making another API call inside Websocket streaming and blocking the main thread. You can check the current rate limit here. You can also refer to this thread to know about the …
As per the Nifty MidCap 150 index document(https://archives.nseindia.com/content/indices/ind_Nifty_Midcap_150.pdf), the index was launched in April, 2016. However, on kite web and historical_data api, I see the index ohlc data before that as well. P…
As I see on Zerodha dashboard, the High and Low are changing constantly.
What values are you comparing with the kite web? Market depth, chart candle.
Can you paste a screen-shot of specific value from the Kite web?
(Note that High Low is coming the…
@MihirGore
I am using the following code (which worked for me last month, as in I was getting live changes in High/Low every second), taken from official Python API
This example code is working perfectly fine.
Can you paste your complete Websocket…
How to get the market quote data for symbols like 'M&M' with following api
For python client, you can directly use ['NSE:M&M'].
For a direct Get request, you need to use URL encoded character of '&' i.e %26. You can check complete URL en…
i can download 1 min data upto last 3 years
Yes, we have historical data for 1-minute candle up to 3 years but max 60-day historical data can be fetched in single request for 1-minute candle, as stated here. So, in order to get data for longer perio…
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "GET /instruments/historical/9552386/day?instrument_token=9552386&from=2020-10-04&to=2020-10-04&interval=day&continuous=0&oi=1 HTTP/1.1" 200 46
For this as well, the mention…
Do I need to keep polling my position and take difference of positions at (t-1) vs position at (t) to find trades?\
By trades, do you mean placed order?
If yes, you can then you can use on_order_update callback. Check documentation here.
@smathur
We want to be able to create a system/app/platform which can place orders/trades for multiple users.
For multi user access app, you need to write to kiteconnect(at)zerodha.com with app details.
GeneralException: Enterd Qty cannot be greater than Net qty
As the error message states, you seem to be entering a higher quantity than available. Can you paste here your complete request params?
TCS20SEP1900CE
It's an expired option contract. You won't be able to fetch historical data for expired option contracts. You can only fetch day candle historical data for Future contracts using continuous data.
@Gopikrishnan
From the above error message, it looks you are sending the wrong exchange name field. Can you paste here the complete params you are sending?
How do I know what is the current version of installed pykiteconnect?
You can check under github package releases section here.
Is doing - pip install --upgrade kiteconnect - enough to upgrade?
Yes
Do I need to take specific care while upgrading?
Ma…
We weren't able to find any active instrument with an instrument token 22686978. You can retrieve the complete instrument list from here. Can you let us know the complete trading symbol/contract name you are looking for? eg: TCS20OCTFUT
Is there any restriction in kite connect app which restrict login only for few session then it stop working
Yes, we allow only one active session for a kite connect app.
@vijoeyz
However, I did not receive on_order_update() callback! Is it not invoked after market hours?
We just checked websocket order update for post market order and all status(open, complete,etc) is received fine.
Find below-attached log for your…
@neel2323
Will the margin computation api help with determining the mis multipliers that I see on (https://zerodha.com/margin-calculator/Equity/)?
Yes, you can know the total margin required for 1 quantity of required symbol, and then you can perfo…
What does it mean, like 10 is a global limit and there are separate limits for APIs?
Yes, combined requests from a unique API key shouldn't exceed 10 req/sec.
@neel2323
1) https://api.kite.trade/margins/equity
2) https://zerodha.com/margin-calculator/Equity/
API MIS Margin https://api.kite.trade/margins/equity is updated by RMS team at regular interval. Seems like they might have missed to update the sam…
@kuldeepchp
so i need to BUY 2 lot, so can i buy 2 lot as single order or i need to place 2 separate BUY order (all orders are NRML).
If product and variety is same, than you can place single order of 2 lots.
@kuldeepchp
I need to split order and place in two part.(first 10 is clear of position, next 10 as new BUY order).
By 10 stocks, you meant 10 different trading instruments/symbol or 10 Quantity of same instrument?
As of now, you need to split the o…
I want to send orders on 2 legs and either both of them should be filled or none
Here, the two orders are on different instruments.
As your one order is dependent on others. You need to handle this at your end. Place the first IOC order, check it's …
@nayan_nandi
How to bulk fetch real time data of 100 or 200 instruments open high low close volume
You can use Websocket Streaming to fetch market depth data upto 3000 instruments. Refer python websocket example code here.
How to handle this data …
Today, there was a delta of 66 points in BNF FUT between kite chart and websocket data
There can be a difference between Websocket Data/OHLC/Quote w.r.t Kite chart/Historical data for an open intra-day candle, because of reasons explained here.
Can …
how to store on_ticks data response of 100 instruments in pandas dataframe with instrument name
You can look to this thread, to pass tick to another thread without blocking main thread and store data.
@Rishant
Collecting enum34>=1.1.6
Downloading enum34-1.1.10-py3-none-any.whl (11 kB)
You still seems to be installing enum34, as per above requirement install log for investpy requirement line 28.
It's an issue from 3rd party lib(investpy) not f…
@Rishant
"AttributeError: module 'enum' has no attribute 'IntFlag'"
As the error message states, it seems to be because of enum py package. You can try uninstall enum by pip uninstall -y enum34 and then do fresh installation.
(Command '/opt/python/…
Q - 1 ==> is volume data is for the particular candle ?
Yes, it's for each interval candle.
for example if i want 9:10 minute data for the particular date than can i pass the 9:10 in the From parameter as well as two parameter ?
from_date - 09:1…
@hsuresh
?continuous=1
For continous data, you can only get day's interval historical data. So, if you are requesting continuous=1, you need to send interval=day.
@rsamikan
If you have a time-consuming operations/computation inside customStrategy(ticks) , then you need to use Queue method, as stated in FAQs thread.
@Jagruti
I want to send orders on 2 legs and either both of them should be filled or none
You want both Buy and sell (both legs) to be executed immediately at the same time?
@rejeesh31
what if I use the OHLC from historical API instead of the 'quote' OHLC?
If you are just dependent on day's OHLC, then you can better use quote OHLC data.
It seems to be happening due to lacking SSL certificates in your Python installation. You can try the below command and then do a fresh installation of kiteconnect python client.
pip install --upgrade certifi
@Rishant
"AttributeError: module 'enum' has no attribute 'IntFlag'"
Looks like either enum package issue or Python path. Maybe you can try out the solution here.
Whenever i tried to close the positional stock in cnc since it's asking to provide me the pin code i am not able to execute the CNC order via API
Do you mean exit holdings CDSL PIN?
If yes, then you can use Holding authorization APIs, to authentic…
And it moves to OPEN --> COMPLETE through the MODIFY route....when I changed the Order Type to "Market".
It has to as you modified a pending order field. You can have look at this documentation for all order status.