Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    Python place order is returning an error.

    Python SDK
    3
    3
    22
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      Ontail last edited by

      I'm trying to place a order via API and my script is returning me an error.

      refreshToken= ['data']['refreshToken']
      ^
      Syntaxerror: 'invalid synatx'

      A 1 Reply Last reply Reply Quote 0
      • A
        admin @Ontail last edited by

        HI @Ontail
        obj =SmartConnect(api_key="xxxxxx")

        login = obj.generateSession('xyz', 'xyz@123')

        refreshToken = login['data']['refreshToken']

        print ("This is my refreshtoken::",refreshToken )

        feedToken = obj.getfeedToken()
        print ("This is my feedtoken::",feedToken)

        Try above piece of code.

        A 1 Reply Last reply Reply Quote 0
        • A
          alexsunny123 @admin last edited by

          @admin said in Python place order is returning an error.:

          HI @Ontail
          obj =SmartConnect(api_key="xxxxxx")

          login = obj.generateSession('xyz', 'xyz@123')

          refreshToken = login['data']['refreshToken']

          print ("This is my refreshtoken::",refreshToken )

          feedToken = obj.getfeedToken()
          print ("This is my feedtoken::",feedToken)

          Try above piece of code.

          thanks for the awesome information.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post