Navigation

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

    Free Python Code for Websocket 2.0 and Get Live Feed Data

    General Discussion
    0
    2
    31
    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.
    • J
      J88913 last edited by

      Please watch the video and download the code from the description.

      Youtube Video

      1 Reply Last reply Reply Quote 0
      • O
        opt_trader last edited by

        @J88913 Thank you Sir for sharing the video. Very grateful and Appreciate!!

        Request a clarification. on line 85 of the code which reads as below, we would be able to fetch the high, low , volume for the day. But how do we code it if we want the details for open, high , low , close, volume and open interest for all ticks say for 1 minute, so we can compile the date into candlestick data of for 1 minute

        LIVE_FEED_JSON[msg['token']] = {'1' :datetime.datetime.fromtimestamp(msg['exchange_timestamp']/1000).strftime('%Y-%m-%d %H:%M:%S') ,'3' :msg['last_traded_price']/100 ,'4' :msg['average_traded_price']/100 ,'5' :msg['high_price_of_the_day']/100 ,'6':msg['low_price_of_the_day']/100 ,'7' :msg['closed_price']/100 ,'8':msg['volume_trade_for_the_day'],'9':msg['open_interest']}

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