Yes, BO and CO are no longer supported. You can use two-leg GTT to place stoploss. You can go through this thread, which states about trailing stoploss implementation.
I can place an order during on_connect() and get order status in on_order_update callback but not sure return payload. Got some info on search, could you confirm.
This thread explains more on order placement inside on_connect ticker thread. You ca…
Trailing stop loss is no more provided in an individual order product. You might have to logically build this at your end. Something like: when price moves in your direction you will have to modify the stoploss order up/down based on if you are long…
I am generating the access_token properly
Is this error coming only for specific API calls? Or it's coming for all requests?
If for all requests, you need to re-check on the access_token generation. This thread can help.
Is there any way to get live data of all available instruments?
No, we don't have an end-point for the complete instrument dump.
You may consider using Websocket streaming. You can subscribe upto 3000 instruments in a single connection, with 3 conne…
.. orders are placed as required
Are you doing this inside on_ticks websocket thread?
If yes, go through python WebSocket FAQs here.
Is there any maximum limit to the number of tokens we can subscribe to in a single session?
You can subscribe up to …
@trade_then
We do send the total length of the bytes for any given packet(using which you can know mode). You can go through the message packet structure here and refer to B byte description.
By Oct-3, If TOTP is not set, and I am still using old method of entering PIN:
a. I understand that order placement will be rejected
Yes, all order placement-related calls will be throwing 400.
But please confirm that other read-only api's like ltp…
Can you please let me know how to set fixed target and stoploss for NRML through api?
For non-GTT orders, you will need to place two orders one for the target order and one for stop-loss. And when one of your orders is achieved/executed you need to …
I would expect that on Saturday I should get the closing price of Friday.
Friday's close gets updated on the next trading day morning i.e Monday morning.
Its just my main program where I am doing some calculation
This is not recommended. This thread explains more.
There is no error or anything as such.
Have you added on_error callback? This would throw the required error message when the connection …
Actual APIs internally have a 3-second timeout, so 7 seconds indicates an external network issue. You should try changing your local system DNS and check. Go through this article to know the steps to change your local DNS.
Also regarding the first part of question when an orderupdate is received in a callback function can I use it to take further steps in my program?
Yes, you can perform any computation. But make sure you are not blocking the main thicker thread, this…
Yes, we did multiple inspections at our end, including checking response time in our monitoring setup. All seems fine. Maybe, looks like an issue at a few ISPs. If you face this again, can you paste the response of below command:
> sudo apt-get i…
as we don't want manual authenticate process each time when we need to generate login token and to trade.
It is mandatory by the exchange that a user has to log in manually at least once a day. We don't recommend automating login.
if we need to sche…
Yes i cancelled 35 order in single shot from kite app
But next my question is that if i do below any steps then system does not allow me to place order or api and kite app
You are exceeding the order modification limit for a single order(as the maxi…
When does Closing Price get updated after market closed? Is there any specific time?
Yes, it gets updated the next day BOD(Beginning of day) at around 8 AM.
When does zerodha token get expired? In one of the forum I have seen it get expired at 7:30…
Forcing me to try fyers api which is free of cost as well.
AliceBlue don't have this TOTP/2FA
The above circular from SEBI has to be implemented on all trading platforms. So, soon or later it will be coming on all trading platforms irrespective.
E…
I hope this mandatory check of TOTP for each order doesn't add delay to order placement.
It's not required for every order. It's just a minor change in login flow(only) to enable TOTP instead of PIN in 2Factor, to get request_token post successful l…
{"status":"error","message":"Invalid `checksum`.","data":null,"error_type":"TokenException"}
Invalid `checksum`.
You seem to be using the wrong checksum. You can check the .net official example here.
Are you calling kite.positions() inside WebSocket code?
If yes, then it's strictly not recommended. Polling of kite.positions() is not recommended. You will have to do this alternatively, this thread explains more.
I noticed one thing when there is a connection timeout the whole web-socket thread seems to block my other threads.
By other thread, you mean another ticker thread from the main thread, right? In that, if the main thread is blocked/disconnected, oth…
@vijoeyz
This won't be exact behavior as in the Kite Web with respect to F&O margin requirements.
No, both Kite web basket order placement and API order placement in the loop will be the same. Kite web basket also places orders one after the ot…
is there any limit on number of simultaneous websocket connection from one api token ?
Yes, there is a maximum of 3 WebSocket connections allowed per API key. You can go through Websocket FAQs to know about WebSocket subscription limits.
As I am get…
Auto-renewal will be done if you have linked your Zerodha account in the developer console.
You need to write to kiteconnect(at)zerodha.com, for further funds-related queries.
Is it possible you can give the total number of ticks you stream for nifty index or any other product ?
No, we don't store count for the ticks, until we are trying to debug something in the ticker.
i have realized that if my program takes 100% of …
or am I using the right code it is just the issue with anaconda?
Your WebSocket looks fine. You can check the Websocket example code here. It looks like, issue with your anaconda env.
How do we get the dump
You can get full instrument file from here.
will it change daily?
Yes. So, it's recommended to fetch full instrument at start of the trading day.
I just tried on my local setup and it's working perfectly fine.
async function testOrder() {
const order = await this.kite_connect.placeOrder('regular', {
exchange:'NFO',
tradingsymbol:'BANKNIFTY2190936700CE',
quantity:25,
…
You need to provide us more info on this. Is it happening throughout the day or at the market start? Is the order placement timing out? Does the order book gets updated immediately or there is a delay?
Please paste debug log with the timestamp for t…
Is it related to ISP and should I try with diff ISP to fix it? If not, is there anyway I can address it?
We use Cloudflare as the CDN. If your internet service provider's (ISP's) DNS server has some connectivity issue with Cloudflare CDN, there can …
ERROR:kiteconnect.ticker:Connection error: 0 - error parsing tokens
As the error message states, you are sending the wrong instrument token. You need to extract instrument_token field from the full instrument list.
Like if we create basket manually from KITE web we can actually see the margins
You can use Basket margin API to calculate net margin.
analyze it using Sensibull payoff chart.
No, this is not possible using APIs.
TypeError: can only concatenate str (not "list") to str
As the error states, you seem to be passing either api_key or access_token as list instead of string. You need to pass both api_key and access_token as strings for authentication.
Does KiteConnect API provide data for Futures in 5Min or 10Min intervals.
Yes, Historical data provides you candle data for 5Min and 10Min, but it's meant only for backtesting. If you are looking for a live market candle fetch, then you will have to…
The full Instrument list is used for instrument info like instrument_token, trading symbol, etc but not for live market data, so market data like last price, won't be able on full instrument list.
For all live market data, you will have to use Quot…
I just want to create a New Basket add some stocks from publisher
Are you looking to place orders on them at the end?
If yes, then order basket is just a UI wrapper around the list of orders. You can prepare a similar list of orders at your end and…
kc.getHistoricalData(
12492546,
"day",
"2021-08-16 00:00:00",
"2021-08-31 00:00:00",
true
)
This difference is coming up because you are requesting for continuous data(continuous=True(last param field above)).
So, …
kiteconnect.exceptions.NetworkException: Too many requests
As, the error message says, you are exceeding the rate limits, defined here.
More than 2000 thread were calling ltp()
You need to reduce down the number of concurrent threads, with in the r…
Is there a cut off in the morning (say 8:30 am) before which all sessions are expired, even if created the same day (say 8:15 am)?
Yes, it's 7:35 AM. You can know more about this here.
And is there some problem with session reactivation if the sess…
successfully installed ..... kiteconnect-3.6.2 ....
Looks like, it's installing the cached version of 3.6.2 rather than 3.9.4(latest).
Can you paste here the output of pypy3 -m pip show kiteconnect of the same env?
Also, try installing non-cached …
At any point in time if there is an error from an API call, do we need to regenerate the token.
Not necessarily, depends on the error type. Only for permission error or invalid auth i.e HTTP status code 403, you need to regenerate the access_token. …
I just installed kiteconnect package using pypy3 and checked the package detail, KiteTicker is showing fine.
>>>> dir(kiteconnect)
['KiteConnect', 'KiteTicker', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__'…
tdf was getting indexed later than its index was referenced
This would be throwing an index error while closing the WebSocket. on_error gets triggered when the connection is closed with an error.
Would I be able to do the same for any stock options?
No, market orders are not allowed for stock options due to illiquidity. You can know more about this here.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade
These are Debug level logging. Can you re-check, if you are using the logging module in your code?
INFO: --> GET https://api.kite.trade/quote?i=NFO:NIFTYSEPFUT
You are using an wrong symbol. It should be instead NIFTY21SEPFUT.
You can use the instrument list to know more about instrument detail.
I just checked for the same request
kc.getHistoricalData(12492546, 'day', "2021-08-16 00:00:00", "2021-08-31 00:00:00", true)
.then(function(response) {
console.log(response);
}).catch(function(err) {
console.log(err);
}…
Can I download 14th May Expiring Nifty Weekly all the options CE + PE for the last 15 Days of it?
No, Continuous data is available only for futures contracts not for optional contracts. You can read more about continuous data here.
Further how long…
console shows streaming activity, tick_data is blank
Where you subscribed to correct instrument_token?
You can fetch detail of the required tokens from the complete instrument list.
You can check the WebSocket example here for the python clients.
Can I get margin data without placing an order?
Yes, you can use order margin APIs. For python client, you can use order_margins method. You can check the complete example here.
The codes with the current version are not working
Can you let us know, the exact error it's throwing? Maybe paste the complete error traceback here.
Should I update my python version?
Our python package supports the python version higher than 2.7. …
Yes, you can install any specific version, depending on the language client lib. For python, you can check this.
PS: We don't recommend having previous versions as many functionalities would be no more supported.
Can you let us know the reason be…
Have not compared if its the identical data thats being repeated..during closed market, on_ticks shouldn't return anything.. or at best the last data once only?
Yes, as @RED said these are post-market orders(from 3:40 PM to 4:00 PM). You can know m…