Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. Sukhwant280
    S
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Sukhwant280

    @Sukhwant280

    SmartAPI Group

    2
    Reputation
    52
    Posts
    25
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Sukhwant280 Follow
    SmartAPI Group

    Best posts made by Sukhwant280

    • RE: Unable to get live feed.

      @admin - Thanks. Now I am using below in my code
      AUTH_TOKEN -> jwtToken from response from generateSession('userid', 'password')
      FEED_TOKEN -> refreshToken from response from generateSession('userid', 'password')

      Please confirm if above is not correct, coz still I am getting same response from websockt i.e "Attempting to resubscribe/reconnect...
      In on pong function==> b'\x00'"

      I tried to troubleshoot from my end -> it failing at below step (i.e. row no 310 in smartWebsocketV2.py:

      "token": SmartWebSocketV2._parse_token_value(binary_data[2:27]),

      Can you help me here to understand whats wrong in my inputs ?

      posted in Python SDK
      S
      Sukhwant280

    Latest posts made by Sukhwant280

    • RE: Smart API Login Error

      @admin - this is resolved as the password format was float. just changed to str

      thanks

      posted in General Discussion
      S
      Sukhwant280
    • RE: Smart API Login Error

      @admin i have changed the password to MPIN but still i am getting the below error while fetching candle data

      TypeError: {'success': False, 'message': 'Invalid Token', 'errorCode': 'AG8001', 'data': ''} has non list value for path data. Must be list or null.

      please advise

      thanks
      Sukhwant

      posted in General Discussion
      S
      Sukhwant280
    • RE: Index Futures Token - available

      @Sukhwant280 ignore now it is coming

      posted in Python SDK
      S
      Sukhwant280
    • Index Futures Token - available

      @admin hi,

      not able to fetch smartApi.getCandleData(historicParam) for index tokens
      62809 and 62808

      please advice

      thanks

      posted in Python SDK
      S
      Sukhwant280
    • RE: Guide to secure your SmartAPI Account with two factor authentication

      @ravindra-e Thanks for the code.. Its working for me but it fails when I pass this token to next steps i.e.
      smartApi.getProfile(refreshToken)
      smartApi.generateToken(refreshToken)
      Error is: Invalid json response.

      My understanding is that he refresh token is valid until 5 AM next day, hence I can use the same refresh Token whenever I want to make API calls.

      Please correct me if my understanding is wrong here. Thanks in advance

      @admin , @Ashok - Please help.

      posted in General Discussion
      S
      Sukhwant280
    • RE: App is deleted from Smart account and not able to login

      @admin any eta on the resolution of API issue?

      posted in C#/.Net SDK
      S
      Sukhwant280
    • RE: Unable to get live feed.

      @admin
      I get below response from generateSession. I cant find any relevant for FEED_TOKEN.

      {"status": True,
      "message": "SUCCESS",
      "errorcode": "",
      "data": {
      "clientcode": "XXXXXX",
      "name": "XXXX YYYY",
      "email": "",
      "mobileno": "",
      "exchanges": ["bse_cm", "nse_cm", "nse_fo"],
      "products": ["BO", "NRML", "CO", "CNC", "MIS", "MARGIN"],
      "lastlogintime": "",
      "broker": "",
      "jwtToken": "Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "refreshToken": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      }
      }

      Also, are you referring to below doc ? I cant find anything which explains which field to take from api response. Pleas advise
      https://docs.google.com/document/d/1tZQzU2qNrB98eso6e6yqF3YxvXfK9cn5Xkzw_5jSJL8/edit

      posted in Python SDK
      S
      Sukhwant280
    • RE: Unable to get live feed.

      @admin - Thanks. Now I am using below in my code
      AUTH_TOKEN -> jwtToken from response from generateSession('userid', 'password')
      FEED_TOKEN -> refreshToken from response from generateSession('userid', 'password')

      Please confirm if above is not correct, coz still I am getting same response from websockt i.e "Attempting to resubscribe/reconnect...
      In on pong function==> b'\x00'"

      I tried to troubleshoot from my end -> it failing at below step (i.e. row no 310 in smartWebsocketV2.py:

      "token": SmartWebSocketV2._parse_token_value(binary_data[2:27]),

      Can you help me here to understand whats wrong in my inputs ?

      posted in Python SDK
      S
      Sukhwant280
    • RE: Unable to get live feed.

      @Mnagesh - Below is the code form websocket vs 2

      my question is from where do we get AUTH_TOKEN. I tried adding "Secret-Key" from "Apps & API" section (i.e. this link -> https://smartapi.angelbroking.com/apps) but I get below feeds from websocket.

      Code
      from SmartApi.smartWebSocketV2 import SmartWebSocketV2

      AUTH_TOKEN = 'Bearer eyJhbGciOiJIUzU-w'
      API_KEY = 'qwert'
      CLIENT_CODE = 'X123456'
      FEED_TOKEN = '00998877'

      correlation_id = "nishant_123_qwerty"
      action = 1
      mode = 3

      Websocket feed:
      In on pong function==> b'\x00'

      posted in Python SDK
      S
      Sukhwant280
    • RE: Unable to get live feed.

      @admin - is AUTH_TOKEN same as Secret-Key ?

      posted in Python SDK
      S
      Sukhwant280