Navigation

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

    azkhan

    @azkhan

    SmartAPI Group

    0
    Reputation
    11
    Posts
    5
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    azkhan Follow
    SmartAPI Group

    Best posts made by azkhan

    This user hasn't posted anything yet.

    Latest posts made by azkhan

    • RE: User Feedback - WebSocket 2.0 Beta Rollout – Python Language

      Hi @admin,
      I am also getting the same msg "In on pong function==> b'ping'".
      Any reason why I am not able to fetch data ?

      posted in Python SDK
      A
      azkhan
    • RE: Open interest in websocket

      @azkhan Any update on this ? @admin

      posted in Python SDK
      A
      azkhan
    • RE: Open interest in websocket

      @admin Thanks 🙂

      posted in Python SDK
      A
      azkhan
    • RE: Python Streaming Tick Data Problem with SmartAPI Websocket's

      @adi3399
      For more Info on websocket go to this link : https://smartapi.angelbroking.com/docs/WebSocketStreaming

      posted in Python SDK
      A
      azkhan
    • RE: Python Streaming Tick Data Problem with SmartAPI Websocket's

      @adi3399
      Go to this link to find the token information of all tradable instruments : https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json

      Then Use this code to get live data streaming for any stock or Index
      Getting started with SmartAPI Websocket's :

      from smartapi import SmartConnect
      from smartapi import SmartWebSocket

      Live_Data_API = " Enter Your API Key Here"

      Username = "Enter Your Angel Broking User name"

      Password = "Enter Your Angel Broking Password"

      #create object of call
      obj=SmartConnect(api_key=Live_Data_API)

      #login api call

      data = obj.generateSession(Username,Password)
      refreshToken= data['data']['refreshToken']

      #fetch the feedtoken
      feedToken=obj.getfeedToken()

      #fetch User Profile
      userProfile= obj.getProfile(refreshToken)

      feed_token=092017047

      FEED_TOKEN=feedToken
      CLIENT_CODE=Username

      token="mcx_fo|224395"

      token="EXCHANGE|TOKEN_SYMBOL" #SAMPLE: nse_cm|2885&nse_cm|1594&nse_cm|11536&nse_cm|3045

      token="mcx_fo|226745&mcx_fo|220822&mcx_fo|227182&mcx_fo|221599"

      task="mw" # mw|sfi|dp

      ss = SmartWebSocket(FEED_TOKEN, CLIENT_CODE)

      def on_message(ws, message):
      print("Ticks: {}".format(message))

      def on_open(ws):
      print("on open")
      ss.subscribe(task,token)

      def on_error(ws, error):
      print(error)

      def on_close(ws):
      print("Close")

      Assign the callbacks.

      ss._on_open = on_open
      ss._on_message = on_message
      ss._on_error = on_error
      ss._on_close = on_close

      ss.connect()

      posted in Python SDK
      A
      azkhan
    • RE: Open interest in websocket

      @admin when is the next major release of smart-API which include OI data ?

      posted in Python SDK
      A
      azkhan
    • RE: Open interest in websocket

      @admin Can you provide any tentative dates when you guys are going to add OI data in web socket streaming.

      posted in Python SDK
      A
      azkhan
    • RE: Python Streaming Tick Data Problem with SmartAPI Websocket's

      @adi3399 please update your SmartAPI Python library.

      posted in Python SDK
      A
      azkhan
    • RE: Open interest in websocket

      @admin

      Any idea when the OI data will be available for web socket streaming ?

      posted in Python SDK
      A
      azkhan