Unable to convert position getting AB1004 error


  • def convert_intraday_order(instrument_list,ticker,quantity,price):
    params = {
    "exchange":"NSE",
    "symboltoken":token_lookup(ticker, instrument_list),
    "producttype":"DELIVERY",
    "newproducttype":"INTRADAY",
    "tradingsymbol":"{}-EQ".format(ticker),
    "symbolname":ticker,
    "instrumenttype":"",
    "priceden": "1",
    "pricenum": "1",
    "genden": "1",
    "gennum": "1",
    "precision": "2",
    "multiplier": "-1",
    "boardlotsize": "1",
    "buyqty": "0",
    "sellqty":quantity,
    "buyamount": price,
    "sellamount": "0",
    "transactiontype": "SELL",
    "quantity":quantity,
    "type": "DAY",

                }
    response = obj.convertPosition(params)
    return response
    

    convert_intraday_order(instrument_list,"INDIAMART",4,5847.65)