@kirtipatil
Authentication failed: `api_key` should be minimum 6 characters in length.
Make sure, you are assigning correct api_key as shown under kite connect developer's login.
@sylar
but continuous does not gives intraday history data.
Yes, continous data is available only for day candle.
Anyway to get intraday data for expired contract (within 1 week of expiry)?
No.Currently, we only provide day candle for expired cont…
@jennings
Why is there such a huge variance throughout the day in market-data download speeds?
What do you mean by market-data download here?
Websocket streaming or fetching Quote APIs?
@JeetKumar
BANKNIFTY20FEB30900CE
This is monthly Banknifty contract i.e BANKNIFTY FEB 30900 CE.
BANKNIFTY2020630900CE
This is weekly Banknifty contract i.e Bank Nifty 6th Feb 30900 CE.
@Yopad
However, even if I re-login shouldn't that be the same access token as it's valid throughout the day?
Access_token is only valid throughout the day, until you logout. Once you logged out, you need to generate fresh access_token.
@ramatius
Websocket streaming for all exchange is working fine.
connection was closed uncleanly
This error occurred because of some internal error in your WebSocket code.You can debug the same at your end.
@mnkartik
So when the callbacks are posted from your side, does it get streamed to both the websocket and postbacl url ?
Yes, we stream order update data to both WebSocket callback and postback URL(if you have entered reachable https URL as postbac…
@diptesh1ce3
Is there a way i can see what order was received ? [I want to see exact order with both square off and stoploss value]
You can look for order history on kite UI platform. Go to completed order->select the required order->click on…
@Venkat123
Though it happens very rare, you need to handle ConnectionError at your end and keep performing authenticate until you obtain the access_token after the login flow.
@neel2323
1. On investing.com, closing price on 24th Jan is "31271.70" whereas on Zerodha, it is "31257.00" and on NSE it is "31241.75"
You can have look to this thread.
@tanmay
Maybe you can add the required time delay inside on_tick method instead and give it a try.
Eg.
def on_ticks(ws,ticks):
# Callback to receive ticks.
logging.debug("Ticks: {}".format(ticks))
import time
time.sleep(XY)
@Rohith0808
You can download complete NFO instrument token list using https://api.kite.trade/instruments/NFOto get instrument_token for required NFO contract.
@rasumaya
Your code is working fine at our end. Can you make sure that you have installed twisted properly at your end?
You can follow this method to install Twisted in the window's environment.
@tanmay
I am taking live feed from zerodha through kite.ltp method for whole day.
You can use Websocket streaming as per your requirement. LTP API is not meant for polling throughout the day.
after this too, code sometime stops and error comes that…
@ZW2914
Refer to this documentation for all the above order params.
If any further clarification, you can post it here.Most of the params remains same, you need to change exchange to NFO and product type to NRML/MIS.
@Ramkrishna
10:20:05 Error: Error parsing instrument tokens.
10:20:04 Error: Error parsing instrument tokens.
Can you make sure, you are sending instrument token as number not as string?
@mdskfaisal
Historical Data is an add-on to the kite connect subscription. You need to subscribe to it post subscribing to kite connect APIs.You won't be able to use historical data without base kite connect subscription.
@rvsw
It's because of the URL exceeds the max length. You can fetch quote call APIs max for 605 instruments in a single request. Exceeding that, you need to query it in multiple batches.
@getschwifty
have noticed that the socket output skips seconds often, for example, it goes from 11:59:59 directly to 12:00:01.
Yes, you won't receive tick, if there is no change in any of the WebSocket field, as per subscribed mode.
Does this mean …
@Sudharsan
tradingsymbol=BANKNIFTY20JAN31000PE" -d "exchange=NSE"
Exchange should be NFO, not NSE.You can go through this documentation to know, about complete order params.
@AnkurGoyal
Can you re-check, if you are entering the correct request_token to generate access_token?
Also, once request_token is used to generate an access token. Request token expires immediately after that. And it cannot be reused further, make …
@MW5790
We re-checked the same on kite web and historical data APIs.OHLCV data is matching for the mentioned period.
{'date': datetime.datetime(2019, 12, 31, 15, 15, tzinfo=tzoffset(None, 19800)), 'open': 185.35, 'high': 185.5, 'low': 184.35, 'clos…
@subhojit
2> Is there anything else I need to install?
You need to install the required kite connect client, check all the available client and installation detail.
4> also how to get the request token and access token?
You can check the flow…
@kapilaggr
We are looking at it. For now, you can handle ReadTimeout exception at your end, something like:
try:
Your code logic here
except ReadTimeout:
pass
@gkaranam
We just tested your above threading code at our end and it worked perfectly fine. We created the dummy method for calculate_ohlc_one_minute and RENKO_TRIMA.
Make sure that there is no error inside calculate_ohlc_one_minute and RENKO_TRIMA…
@ajay_kalyankar
If adjustment is done only on day-candle, does that mean we have to do this ourselves on intraday candle ?
Yes, you can re-factor post fetching at your end.
If yes, then is there any API call which will give split ratios date wise …
@Srikrishna_Rowthu
Don't we have "Historical Data" subscription separately? Do we need to pay for live data subscriptions and only then subscribe to historical data?
Yes, you need to first create a connect app(2000), then you can add Historical dat…
@ajay_kalyankar
Found issue with INFY data for 2015-06-12, the OHLC prices are double that of 2015-06-11 or 2015-06-15.
Yes, there was bonus issue of 1:1 on 15 Jun 2015.
I downloaded historical data (5 min interval) for many equities
Corporate acti…
@tanmay
Make sure that you are sending a numerical value format of instrument token as subscription list to Websocket streaming when extracting from excel.
@Akshay15
For python 3.7, you seem to be installing correct wheel.Are you sure that you are on python 3.7(quick python --version would help).
Or else do pip install twisted and let pip install the correct version.
Then go for kiteconnect python cli…
@dhavalsoni2001
I am looking for a sandbox for development purposes, so do we have one?
No, currently we don't have any official sandbox. You can have look to this thread.
If not, Can you provide what will be the response when I subscribe to more t…
@hpatel9999
how to get mtm of all positions using kiteconnect
You can fetch complete position and then add MTM of all positions to get sub-total.Have look to this documentation.
@prateek3211
After sometime the mode is changed to quote on its own even thought I have made no change in subscription mode type.
We checked at our end for same instrument(10224898).Full subscription mode remains through-out.
2019-12-23T11:01:54.22…
@dhavalsoni2001
For the first response post WebSocket connection, you will receive tick for all trading instruments, but post that you will receive ticks only for instruments with the change in any WebSocket field.
@ZW2914
SyntaxError: invalid syntax
Where are you pasting it? You need to use services like curl or postman.
If I want to retrieve the complete data of a future "INFY DEC FUT". what is the code for it?
You can use Quote mode to receive full data.Re…
@Vishy
As the error states, there is insufficient margin availability.You can check both the available margin and required margin in the above rejection statement.
@rajesh_shig
When I post an order from the kite web, I don't receive any postback calls. The web order gets rejected as soon as I create it on the kite web, but don't receive any callbacks.
You won't receive the first postback status of 'OPEN','COM…
@keshav_
The equity margin file is updated manually multiple times during the day by RMS team as per the expected volatility.
Also, have look to this thread.
@ramatius
exceptions.TypeError: datetime.datetime(2019, 12, 16, 14, 19, 53) is not JSON serializable
Are you trying to dump WebSocket dictionary to the JSON object?
If yes, you can follow either of the below approaches to dump to JSON object:
1>…
@amandeep179018
df = pd.DataFrame(records)
You can dump column wise data instead of direct dump.
Are you trying to stream WebSocket data to Excel?
Instead, you can try using Kite XL(3rd party library).
@amandeep179018
Excel does not support datetimes with timezones. Please ensure that datetimes are timezone unaware before writing to Excel.
As the error states, you need to remove timezone from the timestamp field before dumping it to an excel file…
@ramatius
Yeah, above is checked for python client full mode quote call API.
Below response for python client websocket streaming for NFO instrument IOC19DECFUT.OI value is highlighted.
{'tradable': True, 'mode': 'full', 'instrument_token': 1258265…
@Poonia
You can refer this doc to know, about all different modes quote packets availability.
And refer this doc to know the complete quote packet structure.
@ramatius
OI value is coming fine.We just checked quote call for NFO instrument IOC19DECFUT.
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "GET /quote?i=NFO%3AIOC19DECFUT HTTP/1.1" 200 None
{'NFO:IOC19DECFUT': {'instrument_token': 125826…
@saurabh3679
Any unhandled exception in your code will result in on_error which in turn calls on_close. If you need the reconnection logic to kick in, just don't use ws.stop() inside on_close. So, not need of Ticker assignment and method callbacks …
@wtdmarketing
We just installed fresh kiteconnect node.js client using npm install kiteconnect and tested your above code, timestamp returned to us is current_timestamp.Check below response:
[ { tradable: false,
mode: 'full',
instrument_tok…
@adjas
Or the second option would be to simply not wait back for function threads to join back and instead let on_tick just flow without any wait.
Yep, the main motto of separate thread is to, pass on the computation to another thread from on_tick…
@pranit0405
We do provide historical data for the above spots indices. You can get an instrument_token list here to fetch historical data for the above contract.
@Pijus
It is possible that there is a delay because at the opening we fire the AMOs also which will be in tens of thousands and the message queue at the exchange lines also peak at these times. We are constantly working on this to bring this down t…
@itsram90
we are looking for futures continuous data for backtesting 5 min and 30 min for last two year
As stated herein doc, continuous data for an expired contract are only for NFO and MCX FUT contracts not for CDS contracts.
But we do provide re…
@adjas
Only difference I can think between the two runs is the longer processing time due to second function call for second instrument and the related longer delay in control coming back to on_tick
Yeah, you are correct. Longer processing time ins…
@saurabh3679
No, need to restart socket connection again from on_close.You can just remove call back for on_close and socket will be re-connected.
Also, frequent disconnection with time-out shouldn't happen, can you paste your complete WebSocket co…