Convert Position From MIS TO CNC

ravishastry
What are the values for the below arguments in the convert position function?
transaction_type
position_type
old_product
new_product
  • rakeshr
    You can check all request parameters detail here.
  • swami_rs
    I am getting this error while trying to convert my MIS position to NRML. Can someone help me on this.
    GeneralException: Enterd Qty cannot be greater than Net qty
  • rakeshr
    GeneralException: Enterd Qty cannot be greater than Net qty
    As the error message states, you seem to be entering a higher quantity than available. Can you paste here your complete request params?
  • ravishastry
    kite.convert_position( kite.EXCHANGE_NSE,
    'JINDALSTEL',
    kite.TRANSACTION_TYPE_BUY,
    kite.VALIDITY_DAY,
    quantity=1,
    old_product=kite.PRODUCT_MIS,
    new_product=kite.PRODUCT_CNC)

    These are the parameters that I have passed & I am getting the below error:

    InputException: Invalid `position_type`.

    Can you please guide.
  • sujith
    @ravishastry,
    You can check out the documentation here.
  • ravishastry
    yes, as per the documentation the position type can be kite.VALIDITY_DAY or kite.VALIDITY_IOC and both did not work. can you tell us whats wrong in the parameters I have stated above?
  • rakeshr
    The position type should either Day or Overnight. Check all position param field detail here.
  • ravishastry
    ravishastry edited January 2021
    Hello again.

    Please note that I am passing "kite.VALIDITY_DAY" for "position_type" & exchange as kite.EXCHANGE_NSE, as given in the API call below & still I am getting the error "InputException: Missing or empty field `exchange`"

    kite.convert_position(
    tradingsymbol='ITC',
    exchange=kite.EXCHANGE_NSE,
    transaction_type=kite.TRANSACTION_TYPE_BUY,
    position_type=kite.VALIDITY_DAY,
    quantity=1,
    old_product=kite.PRODUCT_MIS,
    new_product=kite.PRODUCT_CNC)

    PS: I have also tried with tradingsymbol = "NSE:ITC" but that does not work as well.



    Can you please help me resolve this? Is there anyway I can talk to the expert or can I be called back at 9980415001.
  • rakeshr
    @ravishastry
    There was an issue regarding this position conversion param, which has been fixed. You need to update your Python Kiteconnect package and check the same. Update using pip install --upgrade kiteconnect .
    Also, you seem to using the wrong position_type, it should be small letter 'day' or 'overnight'. Check param detail here.
  • prashantq
    @ravishastry was your issue resolved?
    can you please share a snippet of your code where you use convert_position?
    i dont need the logic but just interested in the parameters and the sequence in which you put them.
  • ravishastry
    ravishastry edited January 2021
    Hi, I upgraded to the latest version of kiteconnect(3.9.0) & I changed the position to 'day' as well, but I am still getting the same error.
    Please let me know the solution for the same.
  • prashantq
    FYI. I have asked for a follow-up from @rakeshr in this thread. Please keep an eye on this thread as well to see which one of this thread gets an update.

    https://kite.trade/forum/discussion/9162/kite-convert-position-kiteconnect-exceptions-inputexception-missing-or-empty-field-exchange
Sign In or Register to comment.