Unable to place orders today

magger
magger edited January 25 in Python client
Today I have received the following error twice while the script tried to place an order.

error computing charges: invalid transaction type: sell
Type of error : class 'kiteconnect.exceptions.GeneralException'

The script, while placing order calculated the quantity depending on the cash and margin requirements and sends the quantity derived to the function.
  • rakeshr
    rakeshr edited January 25
    Can you give the complete request param for the order_margins call?
    Also, you seem to be sending the wrong value for transaction_type, it should be Uppercase SELL. Go through the input params details.
  • magger
    Hi Rakesh, I changed the transaction_type in order parameters for margin calculation from 'buy' to kite.TRANSACTION_TYPE_BUY and it rectified the error. I guess there must be some recent change because today is the first time it showed this error. You can close this thread.
This discussion has been closed.