I am running algo to download prices of option chain at 9:30. Then I check for price of selected options to cross trigger point. On cross of trigger, I place market buy & SL order. The prices of selected options are refreshed every 30 seconds. While the prices are loading/ refreshing without any issue. When trigger gets met lets say after 2 hours, the order placement does not work
Syntax for order placement is correct as I tested same by putting in a fresh code & executed. Would request help to understand that am I missing something
Apologies I am a novice coder, please help me as to what is input exception. May be I can resolve this at my end with that information Also how do I enable debug logs
Thanks will try to run it tomorrow on debug mode when market opens
Have put below command I am using for market order, which seems to be generating input exception. Request if you can look & suggest if there are any obvious errors
Thanks for the clarification. Wanted to check on the point that is stop loss error not getting placed since there is no outstanding quantity or the documentation shared above has some input error
I think I am giving correct ticker, pl take a look at top of screen where I have printed the ticker which I am passing & same error is being generated as pointed above
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "GET /quote/ltp?i=NFO%3ANIFTY22N1718400CE HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade:443
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "POST /orders/regular HTTP/1.1" 400 154
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade:443
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "POST /orders/regular HTTP/1.1" 400 154
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.telegram.org:443
Also how do I enable debug logs
You can checkout pykiteconnect here.
Have put below command I am using for market order, which seems to be generating input exception. Request if you can look & suggest if there are any obvious errors
pe_order_id = kite.place_order(tradingsymbol= PE_ticker, exchange= kite.EXCHANGE_NFO, transaction_type= kite.TRANSACTION_TYPE_BUY, quantity= 50, variety= kite.VARIETY_REGULAR, product= kite.PRODUCT_NRML, order_type= kite.ORDER_TYPE_MARKET)
pe_limitorder_id = kite.place_order(tradingsymbol= PE_ticker, exchange= kite.EXCHANGE_NFO, transaction_type= kite.TRANSACTION_TYPE_SELL, quantity= 50, variety= kite.VARIETY_REGULAR, product= kite.PRODUCT_NRML, order_type= kite.ORDER_TYPE_SL, price= PE_Stoploss, trigger_price= PE_Stoploss+.2)
NIFTY22NOV18300CE
. You can fetch trading symbol detail from the instrument list.