@pvgeorge
Is the scrip trading? Can you tell us the scrip name?
It's always recommended to use Websocket for live ltp update, check the documentation here.
@ayyaz
when i pulled data again in even i got corrected value
We will check this at our end.
Can you let us know the scrip name? Does it occur for all scrip?
@vijoeyz
Async can only effect, if you are continuously placing orders and at the time checking for on_order_update().
Does the first callback of order update happen before the place_order() can return?
No,place_order() is always first.
I find tha…
@naz
was the symbol (token = 85761 ) not trading at that time ?
It was trading as we have day candle data.
We are checking with our data team for missing intraday candle data.
@viral
Tick data coming correct at our end for both NSE:VAKRANGEE and BSE:VAKRANGEE.
{'NSE:VAKRANGEE': {'instrument_token': 3415553, 'last_price': 47.55}}
{'BSE:VAKRANGEE': {'instrument_token': 130926340, 'last_price': 47.45}}
Which client are you …
@vijoeyz
It's always better to collect order_id from response of kite.place_order(),As, both method is async and there can be the discrepancy at your end in capturing order_id in case of multiple placed order in same period from on_order_update met…
@rishiswethan
If we need to place only 3 orders in a second, should we write programmatically to place only 3 orders in each second or the Zreodha Api will take care of placing orders for each second like in a queue?
No, you need to introduce prope…
@ramSurya
To live trade in market , i had found out that the historical data support is not providing the present day data, so we had tried to construct candles for our strategy.
Historical Candle is provided for current day intraday period as well…
@AnujaJ
Yeah, it will have all NFO scrip,you need to loop through whole response and then check for require trading symbol.Something as below for python client:
instrument_file=kite.instruments(exchange='NFO')
for value in instrument_file:
#…
@aakashps1995
No,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.
@mdalvi
__main__ CRITICAL ConnectionError(ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))
It's timeout error, in which API request you got above error.Also, can you log complete error trace…
@thepanoramix
Can you let us know the intrument_name/symbol, can't find it in instrument dump?
Make sure, you are reading instrument_token from this instrument file.
@jamipraveenkumar
Yeah, Historical data APIs is addon to Kite Connect subscription.You need to go to developers console, open required Kite Connect app details page and subscribe for historical data.
@wtdmarketing
Have you installed npm packages globally ?
It's npm env issue.Can you create local env and then install npm and then install kite connect node client(npm install kiteconnect) ?
@thepanoramix
You are requesting quote for wrong instrument_token, we can't find instrument_token of 11302658,11304706,10560002 in instrument file here.
@wtdmarketing
Have you installed npm packages globally ?
Can you check kiteconnect node version using npm view kiteconnect version ? It should be 3.0.1
If not remove older version using npm uninstall kiteconnect and then do npm install kiteconnect.
@Pushwinder
You can call ws.close() inside on_tick method,if you want to close websocket connection based on condition.
eg:
def on_ticks(ws,ticks):
*operation*
if(required condition):
ws.stop()
@rishiswethan
As the error describes, there was gateway time out from OMS.
If NetworkException happens while placing an order you need to handle exception at your end and then check the orderbook(if order already placed),if not then retry placing o…
@Pushwinder
Have you called just_data() method, where kws is defined?
Also, you can remove on_close method , if you want to keep reconnecting even after some error in between.
@Sid_2019
1. What constitutes as Historical data? If I'm using the API say on today (Feb 12, 2019), will Feb 11th's equity prices be part of Historical data??
Yes, you can get Historical data till previous minute formed candle.You can go through th…
@prakash.jj
What is the delay in ohlc data of websockets and quote API?
There is no delay in Websocket data feeds, we stream as we get from exchange.
And every quote call is proxied through WebSocket streaming, that has an in-memory data structure…
@prasamsetty
We fetched historical data for high trading scrip, weren't able to reproduce inconsistency.
Can you recheck now or let us know the params you were sending for historical data?
@ranjithptb
We rechecked Historical data multiple times for SAIL(758529) for 15 minute period,every time got same value as below:
Date,open,High,Low,close,volume
2019-02-08 09:15:00+05:30,49.65,49.65,48.55,49.15,4598324
Can you recheck now?
@ravinder_konka
No, we don't have % change or change in oi data in WebSocket feed.
We provide below oi data:
'oi': XXX, 'oi_day_high':XXX, 'oi_day_low': XXX
@wtdmarketing
We fetched historical candle for same above param for python client:
kite.historical_data(instrument_token=738561,from_date='2018-01-01 09:15:00', to_date='2018-01-31 16:00:00', interval='5minute')
We got last 5 minute candle of 15:25…
@jkoracle23
You can try storing previous ltp in local variable and then use condition to alert, if current feed last traded price is not equal to previous stored ltp, in the same loop you can keep swapping ltp local variable with the latest one.
@himanshu8271
Above screenshot is log of POST request, no error log can be seen.Can you paste complete log ?
Can you check if you are assigning api_secret key?
@aharish
Yeah, it will.Are you sure, you are not blocking on_tick thread?
Can you have look to this thread , if still not resolved can you paste your websocket code here?
@aharish
Make sure, you are not blocking on_tick method by performing any calculation in the same.You need to pass the value to another thread, see the example here.
@mdalvi
We are already looking to timeout error.For time being you can handle timeout exception in your code.
from requests.exceptions import ReadTimeout
except ReadTimeout:
pass
@Guhan
As @sujith said, you can use subscribe and unsubscribe method for subscribing/unsubscribing token in WebSocket connection.Eg:
def on_ticks(ws, ticks):
if(condition for instrument):
ws.subscribe(new token/list of tokens)
w…
@naz
Can you please clarify what is the data historical data API is returning in the below case in 2005 or 1995 when BAJFINANCE was not even in existence ?
BAJFINANCE existed with symbol BAJAUTOFIN, you can check the same in symbol change history o…
@kshitij2608
Is it advised not to use conditions in the tick function ?
Yes, make sure not to block on_tick thread and to pass on the tick value to a different thread for calculation.
You can go through this thread for better understanding.
@keshav_
Today there was corporate action on KPIT, so it started ticking at 9:45 AM instead of 9:15 AM.We have informed data team to look to the tick's data send before 9:45 AM.
@raaghulr
You have defined send() JS method but aren't calling the same when the Submit button is clicked.
You need to call send() when submit button is clicked,as shown below:
@krtrader
How many instruments allowed to be subscribed per WebSocket?
Max 3000 instrument subscriptions can be done in a single WebSocket connection. We have a soft limit of 3 WebSocket connection per API Account.
@Nandu
Is there a possibility to run the websockets in a similar way...Chunk 10000 instrument list into 3000,3000,3000 and 1000 and run it in a loop?
Yes, you can use WebSocket to fetch tick data for 10000 scrips in 4 different threads(not in loop)…
@raaghulr
The problem is when the code is being executed. You are calling the element code gets before the DOM is finished loading. So, you can fix this by moving your JS code after the form initialization i.e at the end of the code.
@AkashTawade
Error in above file:
builtins.KeyError: 'depth'
Websocket subscription mode,auto change from FULL_MODE to QUOTE Mode,if market depth is zero,so you will receive key error in depth for such instruments.
@AmitPal
Yeah, above Network exception occurred once at 11:53AM, we are already looking to it.There are not more than 2-3 Network exception occurrence through-out the day.
@enigma
You might be blocking main thread by not passing on to another thread in correct way.Can you go through this thread to see an example of multi-threading.
@neerleo88
def on_ticks(ws,ticks):
data1 = pd.DataFrame(ticks)
print(data1[["timestamp","last_price"]].to_string(header=False))
insert_tick=insert_ticks(ticks)
You are blocking main thread by using insert_ticks() in same thread, you need to kws.con…
@HBS91
You need to subscribe to add-on Historical APIs and can be fetched from same access_token , you don't need any different redirect URL.Go through this documentation to better idea.