kiteconnect.exceptions.InputException: Missing or empty field `product`

BulkDealAlert
kiteconnect.exceptions.InputException: Missing or empty field `product`
  • sujith
    You need to send product type while placing an order. It can take values like NRML, CNC or MIS.
    You can check out the example here.
  • BulkDealAlert
    Last 15 day to my "BO" order code working fine.
    But last 2 day to not working same code.Give unnessary error.
    I think your version problem

    kiteconnect.exceptions.InputException: Missing or empty field `squareoff`

    Plz help urgent basis....I am waiting your reply asap.
  • BulkDealAlert
    BulkDealAlert edited May 2018
    code (I am using "BO") order

    order_id = kite.order_place(
    tradingsymbol="TCS",
    exchange="NSE",
    quantity=1,
    transaction_type="BUY",
    order_type="LIMIT",
    price=2354,
    squareoff_value=2,
    stoploss_value=1,
    variety="bo",
    validity="DAY",
    )


    kiteconnect.exceptions.InputException: Missing or empty field `squareoff`
  • sujith
    The squareoff_value and stoploss_value are squareoff and stoploss now. This is a part of Kite Connect 3 APIs.
  • BulkDealAlert
    I am also try already it. squareoff and stoploss is also not working on same code and library,provide some example related to python.
    Is need to upgrade also library,if yes your side than please explain how and share some link related to python.

    and one more thing is possible to "CO" order in set stop-loss like "BO" order in number like 1,2,3 instead of share price descending value.i know your answer no,but you have any idea related.

    Example:
    suppose "TCS" share price 2500 .I want TCS share buy on market price.My order hit time share price 2505.Mean "CO" order Execute 2505 for TCS share.but my target maximum get loss only 10 point,so how set stop limit in point instead share price value. in current case i need to set TCS Stop loss hard code form 2495,

    My Problem is i know which share i want but i have no current value of share.so i want to share any cost of market price but with stop loss.
    please reply with code example if possible.
  • BulkDealAlert
    when i am use squareoff ,It say no kite property,I think need to version upgrade also.
    Please provide link
  • BulkDealAlert
    TypeError: order_place() got an unexpected keyword argument 'squareoff'

    after upgrade kiteconnect version 3.7.0 latest.
  • BulkDealAlert
    please reply i am waiting. my all work stop due to problem of order_place() got an unexpected keyword argument 'squareoff'. My all services are stop.why remove old version ,both version not working same time.before upgraded you should prepare document and all testing regarding.
  • zartimus
    zartimus edited May 2018
    @BulkDealAlert
    Upgrade your kiteconnect client https://github.com/zerodhatech/pykiteconnect/#installing-the-client as v3 is active now. `pip show kiteconnect` should show 3.7.0. Migrate your code to support v3.
    Examples: https://github.com/zerodhatech/pykiteconnect/tree/master/examples
    Your place_order [https://kite.trade/docs/pykiteconnect/v3/#kiteconnect.KiteConnect.place_order ] should look something like this.
    order_id = kite.place_order(
    variety=kite.VARIETY_BO,
    exchange=kite.EXCHANGE_NSE,
    tradingsymbol="TCS",
    transaction_type=kite.TRANSACTION_TYPE_BUY,
    quantity=1,
    product=kite.PRODUCT_MIS,
    order_type=kite.ORDER_TYPE_LIMIT,
    price=2354,
    squareoff=2,
    stoploss=1,
    validity=kite.VALIDITY_DAY,
    )
  • BulkDealAlert
    after try all thing its not working,I upgrade all version pip,install visual studio,c++ dependency but all is vain


    1) pip install --upgrade setuptools
    Requirement already up-to-date: setuptools in c:\users\administrator\appdata\local\programs\python\python37\lib\sit
    e-packages (39.2.0)

    2) > pip install --upgrade kiteconnect

    import pkg_resources
    Traceback (most recent call last):
    File "", line 1, in
    File "C:\Users\ADMINI~1\AppData\Local\Temp\2\pip-install-b13fil0n\pypiwin32\setup.py", line 121
    print "Building pywin32", pywin32_version
    ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Building pywin32", pywin32_version)?

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in C:\Users\ADMINI~1\AppData\Local\Temp\2\pip-install-b
    13fil0n\pypiwin32\
  • BulkDealAlert
    please send what exactly need for install, i have all code on aws server,limited free space.so please give best way to resolved this,i am waiting your helpful response
  • zartimus
    @BulkDealAlert python 3.7 is not a stable release. Please use a stable python build.
  • BulkDealAlert
    I am new python developer.Let me know how stable python build.
  • zartimus
    @BulkDealAlert no probs. You can track release schedule for 3.7 here. https://www.python.org/dev/peps/pep-0537/#release-schedule. Any version <= 3.6 is a stable build. Can you replace the existing installation with 3.6 and follow the steps. Let me know the details if you get stuck anywhere.
  • BulkDealAlert
    I am doing all upgration
    1) Pip,python
    2) install c++ 14
    3) c++ Builder tools
    But not upgrade kite 3.7,

    Please help what wrong here i am doing
  • zartimus
    @BulkDealAlert Are you saying that you did all the upgrade including python3.6, pip, C++ 14, Builder tools?
    Can you post the full traceback logs here if you hitting any error?
    Also go through this thread once https://kite.trade/forum/discussion/3910
  • BulkDealAlert
    p-install-gbnk_w4q\pypiwin32 is being added to sys.path
    import pkg_resources
    Traceback (most recent call last):
    File "", line 1, in
    File "C:\Users\ADMINI~1\AppData\Local\Temp\2\pip-install-gbnk_w4q\pypiwin32\setup.py", line 121
    print "Building pywin32", pywin32_version
    ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Building pywin32", pywin32_version)?

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in C:\Users\ADMINI~1\AppData\Local\Temp\2\pip-install-gbnk_w4q\pypiwin32\
  • BulkDealAlert
    Thanks zartimus, Its working now.
    All problem only python3.7 version,Its working python3.6.5.
This discussion has been closed.