"message":"Request method not allowed"

mijanur
mijanur edited September 2019 in API clients
Hi, I am getting this error. I am using nodejs. I am new to nodejs dont have enough knowledge to solve this can I get any clue to solve the issue

You can see I was trying to put an order and getting this error.

{ status: 'error',
message: 'Request method not allowed',
data: null,
error_type: 'GeneralException' }

  • sujith
    You need to open this URL on the browser and manually log in. You may refer to user flow here.
  • mijanur
    I have already completed that step.and this access token got from there. Currently getting ticks using websocket using this access token. I also have another question. where will I get instruments codes for ticks to be used on websocket ?
  • mijanur
    I got the list but howto solve this issue ?
  • sujith
    Can you elaborate what is the issue, you are able to receive ticks right?
  • ZI4453
    Why all your tokens and API are posted in public forum unless they are some how magically wrong?
  • sujith
    @mijanur,
    I agree with @ZI4453, please don't post app or account specific tokens on the public threads.
  • rs7683
    I am also able to get ticks but getting "kiteconnect.exceptions.GeneralException: Request method not allowed", when I try to place order. I am using Python APIs and code below to place order.

    order_id = kite.place_order(variety= kite.PRODUCT_NRML,
    tradingsymbol="NIFTY20MAYFUT",
    exchange=kite.EXCHANGE_NFO,
    transaction_type=kite.TRANSACTION_TYPE_BUY,
    quantity=75,
    order_type=kite.ORDER_TYPE_SLM,
    price = 9900,
    product = kite.VARIETY_REGULAR)

    Kindly help.
  • rakeshr
    @rs7683
    You are using the wrong variety and product param. Variety should be kite.VARIETY_REGULAR and product should be kite.PRODUCT_NRML.
    Go through this documentation, to know about all order input param.
  • rs7683
    Thanks rakeshr. I changed and it worked now. :smile:
This discussion has been closed.