Limit order placement failed

RDC232
RDC232 edited January 1 in Python client

kite.place_order(tradingsymbol=symbol_pe,
exchange=kite.EXCHANGE_NFO,
transaction_type=kite.TRANSACTION_TYPE_BUY,
quantity=25,
variety=kite.VARIETY_REGULAR,
order_type=kite.ORDER_TYPE_LIMIT,
price=threshold,
product=kite.PRODUCT_NRML,
validity=kite.VALIDITY_DAY)

I have used the above code to place the order but I am getting the order placement failed error. While when I replace the kite.ORDER_TYPE_LIMIT with kite.ORDER_TYPE_MARKET. The order gets placed and executed without any error. Can anyone help me what is the error in my code.
  • sujith
    You can run pykiteconnect with debug logs on and paste the complete stacktrace here.

    PS: Make sure to remove app and client specific tokens.
  • RDC232
    RDC232 edited January 1
    how can I on debugs in python?
  • RDC232
    RDC232 edited January 1
    This is what I am getting when I enabled debug
  • RDC232
    Kindly help
  • RDC232
    @sujith I did not receive any response from your side.
  • sujith
    You can enable debug logs while initializing kite object, you may refer to the documentation here.

    Based on the error status code 429, it looks like you are getting rate limited.
  • RDC232
    RDC232 edited January 2
    The rate limit is 200. And whenever the code trying to place the order it gives the error. As far as I understand from the rate limit I can place 200 orders per minute. Am I right ?

    Since the order has not been placed and from the beginning I am getting the same error how the rate limit can be crossed. Since I am not getting any error with same code when limit order is replaced with market order that means everything else is correct in the code.

    It seems there is bug in api
  • sujith
    Order placement is capped at 10 requests per second and 200 per minute. Kite Connect API doesn't differentiate between a MARKET order or LIMIT order. These are just different parameters for the same endpoint.
    Kite Connect API is being used by tens of thousands of production apps. It includes our internal apps as well that are being used by millions of users everyday. There is no issue with Kite Connect API.
  • RDC232
    10 requests means 10 orders can be placed in one second. These 10 orders must be visible on the app. But they are not visible on the app. This means order placement failed is coming even when no order has been placed through api.
    Secondly I am not saying api differentiate between limit or market. But it is true that same code is working for market order but not for limit order.
    If there was no error in kite api then it should work for both which is not happening.

    Can you send me screenshot or any other supportive material which justifies your reply that limit order is working properly.
  • RDC232
    I have tried the limit order placement but before placing the order i have introduced a delay of 1 second. Still I am getting the same error
  • sujith
    As mentioned earlier, you need to enable debug logs of pykiteconnect and check the logs at your end.
Sign In or Register to comment.