I was wondering if one can place CNC (delivery) orders on Zerodha using Ask Price as the trigger. For example, buy up to 50 quantity of XYZ Ltd., if best Ask Price in the order book is below Rs 130.
This would be of great help, especially in ill-liquid counters.
Thanks in advance for the replies!
Fantastic thought provoking question. Tradescript doesn’t allow us to access order book data and therefore we are unable to see Price Ladder. But Zerodha does provide L2 Data in Pi and API. We can use KiteAPI to access order book data and make all the conditions for order execution on it.
Sample code for Best 5 Bids
url = "wss://ws.kite.trade?api_key=" + KiteAPIKey + "&access_token=" + Kite_access_token
ws = websocket.WebSocket()
ws.connect(url)
###########################################
subscript = '{"a": "mode", "v": ["full", [738561, 56332]]}'
ws.send(subscript)
while(MarketHrs == True):
data = ws.recv()
thread.start_new_thread(processTickData,(GLOBALS,data,))
Thanks for the reply.
I am not a tech guy, so if there was such on option on something like Streak, for example, it would be great for me.
At least, there should be a notification system if not an automated limit buy order if and when the Ask Price is below your threshold.
Are the Streak people reading this?
Hi @Kunal_Kothari, Streak uses Close price to trigger entry/exit (i.e after order execution). However, your requirement is checking the bid/ask i.e before order execution. Currently, this cannot be implemented in Streak.
Thanks for the reply. I just want to let the Streak people know that I (and many others) would gladly pay good money for this functionality - for buy orders to be automatically executed on the basis of the Best Ask Price threshold that I specify beforehand. It would be a godsend!