so.. what I did was:
==
def on_ticks(ws, ticks):
if tokens!=current_position_tokens
ws.subscribe(current_position_tokens)
tokens=current_position_tokens
==
where current_position_tokens was updated elsewhere ou…
Yeah, that's obvious, but it might not work in scenarios where conditional evaluation is slow, example is my use case where I want to subscribe to tokens of my current positions. Which means, I have to call a webservice to get the current positions,…
Hello @SRIJAN . Thanks! I had a typo, because of which "tokens" didn't have a right value. However, in your opinion it's okay to do this in on_tick? or there is a better place to update the subscribed tokens? in this implementation, it seems subscri…
Okay, possibly .. Thanks! It helps. I'll see the pattern, and hopefully it wouldn't reoccur. However, if it does, I'll cycle back to you.
Kudos to your speed and of response @SRIJAN
That explains Sensibull and NSE side. Thanks, but API results still don't match with it. Do you mean to say that the API still shows the OI numbers from 3:29 PM (prior to market close)? and NSE site ( and Zerodha ) updates it based on what happened …
Thanks @SRIJAN! You rock! You are a huge help!
I have one more question relating to OI, but I'll post it in a separate thread so that it can be tracked easily
So, you mean that's the total OI, not the day change. I was a bit confused because of sensibull implementation: Here are the screenshots:
So, according to what you said, the second screenshot represents the data that I get from OI in quotes respon…
@sujith I stand corrected. I just meant that whoever had this unique idea of naming expiries like this, rather than simply using two digit month names, is... I don't know what to say
@SRIJAN .. I think he means that after gtt is executed, and any order is placed, how can he link back the placed order to the gtt.
@TheBull .. not sure if there is an exact way to to do what you want, however if you see gtt structure, it has the or…
I've just tested your suggestion, and it seems to work fine. Thanks! You guys are awesome! I have one more question, but I'll ask that in appropriate discussion thread..
Yes, I'm using the LTP from the the existing gtt .. something like .. last_price=gtt["condition"]["last_price"]. Which is absolutely correct (like I gave above).
Also, since I also tried to run the code post market, you can even see that LTP is cor…