'KiteConnect' object has no attribute 'request_access_token'

ZY9634
I am getting this error while trying to check the connectivity . Please find the attached screenshot.
I followed below link.


Tagged:
  • rakeshr
    @ZY9634
    You are using older version of Kite Connect request_access_token has been replaced with generate_session in kite connect 3.You can check complete documentation here.
  • ZY9634
    Thanks for your quick support, I used the sample code shared in your documents, but I got the below error like
    "place_order() missing 1 required positional argument: 'variety'" . Please help
    I tried giving variety=kite.REGULAR or kite.regular but none of them worked. Where can I get list of arguments that are mandatory for each function.

    2)Also in many of the functions it is mentioned like "self" as arguments what does it mean ? what should we give here .
    Ex:
    def orders(self)
    3)And every time we run code the "Request_token" is getting expired and I am ruing the Kite.trade URL+api key in browser to get return key. Please help if there is any shortcut for this activity as I am learning step by step.
  • Imran
    hii ZY9634
    for login have a look on this video https://youtube.com/watch?v=wHLrMyzdgJw&t=72s
  • ZY9634
    @Imran
    Thanks for your quick support. Now I am able to place orders :smile:
    I need help on below , please
    1)I am entering manually "Request_token" every time when I run the script, is there any way (defined function)that system can read from redirect URL. Below is my code.
    rtoken=input("[*]Enter Request Token Here:")----- rtoken is var created by me
    data=kite.generate_session(rtoken,api_secret=asec)
  • rakeshr
    rakeshr edited December 2018
    @ZY9634
    As per exchange norms, you need to log in manually .

    PS: You can save the access token once you get and then use the same for rest of the day.
  • ZY9634
    Dear @rakeshr
    So in that case if we give input as api_key and access_token will it be enough after generating access token once.
  • rakeshr
    @ZY9634
    Yeah, you can store generated access_token once and then use the same for all further API request.
  • XA1938
    Hello everyone,

    i am new to this coding, but as i am from engg background i can catch up in sometime easily.

    i have followed the link give by rakeshr in above chain (https://kite.trade/docs/pykiteconnect/v3/#kiteconnect.KiteConnect.place_order)

    i could only able to complete till getting access token. but while placing orders, something is not going right.. could someone please help me in this.?



    Thanks in Advance
  • rakeshr
    @XA1938
    Product will be CNC not NRML and also add variety = regular.You can check list of all order param here.
  • tamiltrade
    Hi ZY9634

    Have you found out what is the answer for the below question? I also curious to know as I'm trying out this programming in this lock-down.

    2)Also in many of the functions it is mentioned like "self" as arguments what does it mean ? what should we give here .
    Ex:
    def orders(self)

    Sorry, Folks... This may be a naive question as I'm not having programming background. Just trying this out.

    Also thank you @Imran Your YT Videos are of great help.
Sign In or Register to comment.