@Romit
We check for few active bse script, historical data is fetched perfectly fine.Can you let us know the fetching instrument_token and disconnection error trackback in case of failure?
@AutoTrade
Can you try this thread?
If still facing issue,can you uninstall kiteconnect completely and try pip install kiteconnect --no-cache? And paste the stacktrace if you are getting any error.
@chiragkeswani
Seems to be some issue while initiating new thread under on_tick.Can you implement on_error method and log the error.You can also check this example of multi-threading while non-blocking on_tick thread.
@sathik
How multiple orders are placed by calling place_order() just once.
From above code,it can only happen if an exception occurs before going inside try except block and main try block is repeated again, causing place_order to be executed twice…
@SamarthaJana
As exception states, time-out is happening at OMS end.So,you need to handle those exceptions at your end,fetch order book and see if above order is placed,if the order is executed fetch respective detail or if not executed place the o…
@mapreduce
We tested same code as given above by you and ticks are coming fine at our end.
def initialize(self):
self.kite_ticker = KiteTicker("api_key", "access_token")
def on_ticks(self,ws, ticks):
for tick in ticks:
…
@Vishesh
what is a success response? - I only get orderid in python as return value.
You can fetch complete order_book and filter specific order_id and check for status, it should be 'status': 'CANCELLED'.
@Vishesh
I have 2 threads... one is for python client... and other is for Kite API/ HTTP
Order params remains same in both the request(python client and kite API/HTTP).You need to send trigger_price not stop loss value for CO order.
@V2R
No, you don't have to generate request token for every API request.You generate it once and then store it and use it for rest all API request.
You can check the token generation flow here.
@Vishesh
kite.place_order(variety=co, exchange=NSE, tradingsymbol=RELIANCE, transaction_type=BUY,quantity=10, product=co, order_type=MARKET,stoploss=10)
Here product should be 'MIS',product='MIS'.
The stop loss trigger price is beyond the allowed r…
@Imran
actually, it returned 1 min data at 9:45 candle.
Yeah, that's correct because if you request for 15-minute candle data at it's start,here i.e 09:45 AM, it will have same values as of 1-minute data of 09:45 AM, as current available data is on…
4.We have checked at our end on Visual Studio IDE, it works fine through-out the day.
6.Yeah,all orders placed from Kite Connect APIs, will be shown under kite app/web order book,so you can sell/modify/cancel them from app/web.
@sagaranilganu
1,2,3.You can use any python IDE(PyCharm,Visual Studio,etc).You are comfortable with.
4. Depends on the requirement of your program computation logic.
5. No,both have different order placement source.You can check kite connect underl…
@whity
You are using Publisher basket, right?
We checked below order params at our end and it's working fine for basket order.
{
"tradingsymbol": "11KFL23",
"exchange": "BSE",
"transaction_type":"BUY",
"order_type":"LIMIT",
"product":"C…
@srinath9s
You can subscribe up to 3000 tokens per connection and with one api_key you may open up to 3 websocket connections(i.e total of 9000 instruments).And for a highly liquid script you can expect up to 1 tick per second.
@vijoeyz
Currently,,we don't provide buy date in holding APIs.You can check this manually on console and create buy_date dictionary at your end. Something like:
{'SBIN':'24-01-2019','ONGC':'26-02-2019'}
@mayura
Last_price attribute is float value.You can compare it as below:
quote_nifty=kite.quote('NSE:NIFTY 50')
last_price = quote_nifty['NSE:NIFTY 50']['last_price']
if(comparision of last_price(float value) ):
.........
@hainahoo
What happens when I do web socket subscribe for a symbol two times?
Only unique tokens are subscribed.So,even if you subscribe same token multiple times, it will be subscribed only once.
Do I need to unsubscribe it two times? Or single un…
@mayura
kite.place_order(tradingsymbol="NIFTY1941812500CE",quantity=2*75,exchange="NFO",order_type="MARKET",transaction_type="SELL",product="NRML")
You also need to add variety='regular'.Check all order params here.
kite.quote('NSE','NIFTY BANK')ki…
@sagaranilganu
Yes,you can fetch 1min candle for NIFTY19APRFUT from 01-02-2019 to 31-03-2019.
You need to subscribe to historical data and request to date as 2019-03-31 and from date as 01-02-2019-02-01,check the documentation here.
@raja1sttarde
The exchange re-uses the tokens once expired so you can't store tokens for expired instruments.
We will recommend you to fetch instrument list daily or after every expiry date, check instrument file here.
@jkoracle23
As exception states, time-out is happening at OMS end.So,you need to handle those exception at your end,then fetch order book and see if above order is placed,if not executed place the order again.
@infotrade
At any point of time,you can link only one client id with one API key.To change client id you need to go to developers page and change Zerodha Client id section.
@prmramit
You can use time delta(python datetime) w.r.t current time and input to_date and from_date as delta of 20 candles only.Or you can fetch candle upto current time(for any candle internal) and then slice last 20 candles.
@healthsecure15
You can create holiday calender list at your end and don't run cds program on those day's.Something as below:
cds_holiday_list = ['2019-04-01','2019-04-17','2019-04-19','2019-05-01','2019-06-05','2019-08-12','2019-08-15','2019-09-02…
@meeashok
No,volume field doesn't include pre-market volume.
Is there a way to know pre-market volume quantity separately?
You can use Websocket streaming during pre-market to get volume traded during the same.
@neerleo88
Error: async hook stack has become corrupted
Request is timing out.It can happen at sharp 09:15 because of multiple requests in queue.Can you handle the exception at your end and retry the same with small delay.
@gkninja
Currently,we don't monthly historical candle.But you can form the same at your end by using day candle,as explained below:
Select Open as open price of first day of the month,High as highest value among all day's high for the month,Low as …
@DITamse
com.zerodhatech.kiteconnect.kitehttp.exceptions.TokenException
It's token exception.Can you check if you are given correct API key and API Secret?
@ashwin_tay
The exchange re-uses the tokens once expired so you can't store tokens for expired instruments.
We will recommend you to fetch instrument list daily or post expiry date, check instrument file here.
@vvijay
We don't encourage polling positions API just to fetch latest P&L. You can check out this thread to know how to calculate P&L using live market data.
@kashyapgodhani
CRUDEOIL19MARFUT and CRUDEOILM19MARFUT contract has expired,so you can't find them in instrument file.
BANDHANBNK(token-579329) and DMART(token-5097729) has histirical data for all intraday candles(including 5min and 10min).
Can you…
@karthaalabs
I want to fetch only live price of stocks, maximum I would need 40 stocks live price in a day.
You can use WebSocket streaming in Kite Connect.Check the documentation here.
Which app to use for my requirement? Kite connect or publisher…
@krishmetra
Kite-connect api stopped working with "Gateway Time-out" error.
For which API request, you got 'Gateway Time-out'? Can you paste complete log here?
@sanbanbalu
Nifty and Bank nifty weekly option contract is present in the instrument dump.
You might be querying it with older format.You can look here for recent changed format.
@arjunkw3
We checked at our end, it's working fine.Are you sure,you entered a valid https URL for getting postbacks and also the certificate must be provided by issuing authority,not self signed.
@Guhan
Access token are flushed every day at 7:30 AM and new one is generated every day at 7:35AM.So, make sure you generate access token post 7:35 AM on the same trading day and can be used throughout the day,unless logout.
@samp
If I want to put orders from my own webpage, I won't create a Kite Connect app, still I will need to pay for an API key ?
You need to create Kite Connect app to place order via APIs from your webpage.
Are there such thing as Publisher API key…
@infotrade
For Limit Order,when the Stock CMP reach at entered price it gets executed but If your buy/sell quantity is not available,the remaining Quantity will be in queue waiting. When again CMP will go at that price then your buy/sell price qua…