Bring back BO orders with some changes
You can use double-leg gtt order. Check similar thread here.
For other non-API-related queries, you can ask here.
We tried both the above requests. We are getting the same OHLCV value for the mentioned day period.
{'date': datetime.datetime(2010, 5, 24, 0, 0, tzinfo=tzoffset(None, 19800)),
'open': 548, 'high': 607.9, 'low': 548, 'close': 548, 'volume': 6493632…
We have added basket order margin API to the python official package, you can upgrade to the latest version using pip install kiteconnect --upgrade. You can refer to the example here.
NIFTY2162
Are you trying to look for a 24th Jun expiry weekly nifty contract?
If yes, then last Thursday of the month will be expiry for the monthly contract(here 24th June for NIFTY21JUNFUT). For the weekly nifty contract, you need to check for res…
urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 101] Network is unreachable
It's a vm hosted on one server in Bangalore
Seems like you need to open outbound ports to access this. You will have to check more on t…
AttributeError: 'NoneType' object has no attribute 'bio_read'
If you know what is reason Kite is Throwing's this error
This is twisted byte read error.
Are you trying to open multiple sessions at the same time?
Also, can you let us know, more about…
from_date = datetime.datetime(2021, 6, 11, 2, 53, 52, 9701)
to_date = datetime.datetime(2021, 6, 16, 0, 0)
We just checked for the same param, 3:15 candle is showing fine for us.
....
{'date': datetime.datetime(2021, 6, 15, 15, 15, tzinfo=tzoffset(N…
how does calling helper method this way is diferent than calling it inside on_ticks method directly?
As the thread explains, you are creating another ticker thread using threaded=True and let it handle tick data.
INFO:root:Required order margin: 'KiteConnect' object has no attribute 'order_margins'
You need to update your package using pip install --upgrade kiteconnect.
Also for basket orders, will "kite.order_margins()" work or the python call is "kite.bask…
You have to use exchange:tradingsymbol format to fetch quote data for required tradingsymbol. For example, here for Infy jun future:NFO:INFY21JUNFUT.
You can fetch trading symbol, exchange, and other details from the complete instrument list.
But I should point out that I am looking at only NSE scripts.
for most of the scripts (nifty-50 e.g. tokens = 136427780 , 128209924, 136247044),
Above tokens, which you have mentioned is of BSE exchange. You can refer the same under complete instrum…
"C:\Users\ACER INDIA\Anaconda3\lib\site-packages\twisted\python\log.py"
As per the above log, you seem to be running inside Anaconda env. Can you deactivate conda env and then run the code once?
my query is about EQ trades
For EQ trades, these new CNC buy shows on positions only for a day, next day it goes under t1 section of holdings. This article explains it.
{'transaction_type': kite.TRANSACTION_TYPE_SELL,'quantity':stock.get('quantity'),'order_type' : kite.ORDER_TYPE_LIMIT,
'product' : tradingsymbol, 'price' : round(buy_price*0.95,1)}
You are using wrong product type for orders, it should be CNC or NRM…
Historical data API is meant for back-testing purposes, not for real-time execution. For this, you might need to form candles at your end and use as per your need. You can go through a similar thread here.
Yes, it will return an input exception of Order cannot be modified as it is being processed. Try later. In that case, you need to refetch the order book and check the status for the same order. You can go through this thread to know more.
Message: Connection refused for URI https://api.kite.trade/session/token
This is not related to the Kiteconnect session but rather the Redirect URL. Have you set redirect URL on the developer console, as some localhost?
504 Gateway Time-out
We just checked on this, it might happen for few BSE scrip older minute data. You need to handle this Time-out at your end and make the request again. Something like:
from kiteconnect import exceptions
try:
# Fetch historical…
bank Nifty also we will get data from 2015?
Yes, Nifty Bank index day candle is available from 2015 onwards.
Also since we get only 60 days data in one go, can we use a loop to fetch the entire data at once and save it?
Yes.
historic data API for apollohospital for 8th June and its volume was 762347. Whereas when downloaded data using GetQuote() at the end of the day, I got 766456.
Quote call volume include post-market trades as well, whereas historical candle, doesn't …
Is there any api for bulk fetching last period (either minute or 3minute or 5 minute etc) candle data for a list of instruments with a single request.
No, there is no bulk fetching historical data APIs. You need to run this in a loop for a list of i…
In Buy Quantity, Sell Quantity and Last traded quantity the data i am receiving, are those data for that particular tick or it is total number from the market opening time(I mean from 9:15 AM of that date)?
You can go through Websocket ticker respon…
In some instruments - on some dates - record for 9:15 are missing. Not there in 1m and in 3m also.
Can you let us know about those instruments and dates? We will check on those.
I tried to run for this date range separately and found out that it runs successfully a few times and throws an error the other times. It seems random to me.
Is this throwing 504 error, for this contract specific for the mentioned period or for any …
AAKASH
Date Open High Low Close Symbol
25514 2021-01-29 90.70 90.7 89.50 90.00 AAKASH
25515 2021-02-01 90.00 94.5 89.55 93.95 AAKASH
25516 2021-04-27 137.55 143.0 137.55 141.90 AAKASH
Their is no corporate action on this. It's normal price movement …
As you can see..the volume are not matching. 9:15
Volume for 3minute 9:15 candle looks fine to me. The volume for 9:15 3minute candle will be cumulative volume of 09:15 + 09:16 + 09:17 1minute candle. Here cumulatoive volume for 09:15 3minute candl…
@Guhan
HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7)
We are aware about this time-out issue occuring intermittently for few GET queries. We are working on the fix. Will update here once fix is patched.
Fo…
Dates are converted to UTC by default in the Axios HTTP client we use for our Node js client. So, you need to convert it back to IST(Indian standard time) at your end.
I will check more on the other possibility.
But generateSession is not working.
Is it throwing any error? Can you paste the error stack trace here?
Also, if you want to use the current PHP client, please upgrade to PHP >=8.
data=kite.instrument('NFO')
Are you trying to download complete instrument list, too frequently?
Complete instrument list is a memory heavy file, it should be downloaded once at a day start at your end in DB or to excel, etc file and same should be …
tried using "day", and "daily" with continous value as true and NIFTY token number , but still not working
"day" is the correct param, you can check all historical data interval param here.
We just tried "day" and it's working fine as desired.
GetH…
what should I write for "Exchange" in GetQuote command to fetch Nifty Index data?
The exchange would be NSE for Nifty 50 indices. You can go through the complete instrument dump to know, more about the required contract.
No, you will have to map this at your end, using a complete instrument dump. Something like, a function that takes instrument_id as input, matches with instrument dump, and returns required trading symbol. Each Instrument_id is unique for the symbol…
I want to download 1 minute OHLC candle data for BankNifty Options that has expired.
Continuous data is not available for an expired option contract, but only for the futures contract. You can go through this documentation.
def on_order_update(self, ws, data):
self.onOrderUpdate(data)
ticker.on_order_update = self.on_order_update
Yes, you have to use on_order_update, to receive order update stream. No need to add this onOrderUpdate again, you can just print the order u…
If we have to check currently opened positions(MIS or NRML), should we always use 'net' positions and check for positions that have quantity value as non 0?
Yes, you should always use net positions and check for non zero Qty. You can also go through…
is there a possibility of order updates getting missed during the reconnection process
Yes, it is possible, if WebSocket is down during the order_update message, then it will be missed.
once the reconnection is established we can expect those order …
Can you let us know the instrument token for which you are missing last_trade_time field intermittently? Also, let us know the ticker mode you are subscribing to.
Is it continuously happening? If not, then you need to handle this network time-out exception at your end and make the same request again with a few ms delay.
kiteconnect.exceptions.NetworkException
Are you trying to run this during post-mid-night?
As post-midnight OMS runs the BOD process till around 6:30 AM and during that time it will not accept any requests.
pls check my code i have declared it in array only
No, you are passing as a dictionary. You need to pass it as a list of dictionary i.e array here, for example:
order_dic=[
{"transaction_type":kite.TRANSACTION_TYPE_BUY,
"quantity":25,
"order_type":k…
I have noticed the inconsistency in volume (for minute data) as you can see from the screenshots attached
You mean, are these minute candle Volume data wrong? Can you also let us know, your source of comparison?
raise ValueError("unknown bio failure")
builtins.ValueError: unknown bio failure
This seems to be an issue around the OpenSSL package. You can check more about the above exception here.
request_token = " XXXXXX"
You have to extract request_token post successful login from above login_url. You can go through login flow documentation here.
I am trying to capture quote details but not getting volume_traded and some other fields
Also, we just checked Quote mode WebSocket streaming for the same instrument and total volume and other fields are coming fine.
{Mode:quote InstrumentToken:4249…
While fetching historical data for the interval 'day', i am not getting current day's data even after closing, why is it so?
You have to send to-date param as today's date. If still facing the issue, you can paste the exact request param, you are s…
After the Placing order it is stopping run time.kindly guide
Didn't get you on this? After order placement, are those orders not placed. You can go through order placement example for python here.
DEBUG:urllib3.connectionpool:https://api.kite.trade…
Websocket streaming is working fine at our end. Can you paste here the exact error message? Also, make sure you are using the correct access_token. Check out the login flow here.
I am trying to capture quote details but not getting volume_traded and some other fields
Which quote mode are you using full, LTP or ohlc mode?
Please paste raw response, instead of excel sheet. That will give more clarity.
I am fetching data in FULL mode and there might be change in market depth. but there is change in buy_quantity, sell_quantity and volume_traded. If there are not trades and price is same then volume should not change, please correct if I am wrong he…
But after changing status of order
Can you explain more on this?
By changing status, do you mean modifying the pending order? if yes, then which all order fields, you tried to modify.
We are not able to reproduce this at our end.