Not a valid product code.

suraj
suraj edited May 2016 in Python client
I have developed an automated trading system using python kiteconnect API. My automated trading system today tried placing a SELL order on nifty futures. The order details my automated trading system sent are as follows.

Quantity : 75
Symbol : NIFTY16MAYFUT
Action : SELL
OrderType : MARKET
product : NRML
exchange : NFO

My code ended up saying

File "/usr/local/lib/python2.7/dist-packages/kiteconnect-2.4.3-py2.7.egg/kiteconnect/__init__.py", line 252, in order_place
File "/usr/local/lib/python2.7/dist-packages/kiteconnect-2.4.3-py2.7.egg/kiteconnect/__init__.py", line 376, in _post
File "/usr/local/lib/python2.7/dist-packages/kiteconnect-2.4.3-py2.7.egg/kiteconnect/__init__.py", line 459, in _request
kiteconnect.exceptions.OrderException: Not a valid Product Code

Why am I getting this error? For the same order details my automated trading system placed 4 BUY orders yesteday and and all of them got executed. The account details from where I placed these orders is

Api key : tcywc7nlqmcgad20
Uid : RC0677
  • Vivek
    Vivek edited May 2016
    @suraj The segment(NFO) is not enabled for your account I guess. Try placing same order via kite and if the error is same please contact Zerodha support.
  • suraj
    From kite I placed the order and it executed. I placed BUY orders yesterday from the same account and everything worked fine yesterday.
  • suraj
    I tried to place the same SELL order using the same account and now the order executed. I would like to know why did that error appear earlier.
  • Kailash
    @suraj This should only happen if the product code is incorrect (NFO only has NRML and MIS), or if the segment is not enabled. Unfortunately, these order requests are not logged by the OMS.

    When were these orders placed?
  • suraj
    exactly @ 10:00:43am today.
Sign In or Register to comment.