Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

LiveCandles

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

LiveCandles

API for getting live OHLC candle-stick data of Indian Stocks for free

  • 0.0.2
  • PyPI
  • Socket score

Maintainers
1

API for live OHLC feed

PyPI version License

Installation

You can install project using pip:

pip install LiveCandles

Description

Use this API for getting live OHLC candle-stick for free, it will relay the data of time intervals from 5 to 59 minutes starting from the next mutiple for 5 minute.

It has two modes for getting data as shown below:

  1. It simply web scraps the google finance webpage to get live current price and converts in to OHLC candle. Code for it is
data  = LiveCandles.ohlcStream('5minutes',indexCode = "NIFTY_50")

while True:
    price = data.stream()
    #use price as per your need
    print(price)
  1. It will use multiprocessing to set open, high, low, close values simultaneously
from LiveCandles import ohlcStream

if __name__ == '__main__':    
    data = ohlcStream("5minutes", indexCode = "NIFTY_50")

    while True:
        price = (data.streamMP())
        #use price as per your need
        print(price)

Arguments:

  1. First argument is interval should be specified as '5minutes' number can be anything from 5 to 59

  2. indexCode(optional) to be specified to get index candle as per google finance code

  3. stockCode(optional) to be specified to get stock candle as per google finance code

DISCLAIMER

Data generated is not very accurate, due to netwrok latency, call restriction. Avoid using for taking order placing decsions on it's basis. One can override getCurrentPrice() method for more reliable price fetching.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc