Skip to main content

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

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

LiveCandles-0.0.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

LiveCandles-0.0.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file LiveCandles-0.0.2.tar.gz.

File metadata

  • Download URL: LiveCandles-0.0.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.6

File hashes

Hashes for LiveCandles-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e4c44cadc606fb72a5f8d1bbd8ab37623de74e003d7ae670607a4c705f01dab9
MD5 614b8c08725938f40ec4be301535270b
BLAKE2b-256 db7edbe0634dfc1f7c2bcbf8da0f59ad7b5fe3d6b114e02d45a54d59b7f6db00

See more details on using hashes here.

File details

Details for the file LiveCandles-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: LiveCandles-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.6

File hashes

Hashes for LiveCandles-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 95abfaa6060dd6fd5ff9070c784942ae3d46813f1f7c6c12d7665be73e5e6c0f
MD5 6563e2905e74e01b6ad447e6136a87af
BLAKE2b-256 177775441cd385d6d6d9398cadce051fc4f9442c8d5f3cfacf84e5103edd469e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page