Skip to main content

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.

Release files for LiveCandles 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for LiveCandles 0.0.2
File Size Uploaded
LiveCandles-0.0.2.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for LiveCandles 0.0.2
File Interpreter ABI Platform
LiveCandles-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / LiveCandles-0.0.2.tar.gz

Download URL LiveCandles-0.0.2.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e4c44cadc606fb72a5f8d1bbd8ab37623de74e003d7ae670607a4c705f01dab9
BLAKE2b-256 checksum
How to use checksums
db7edbe0634dfc1f7c2bcbf8da0f59ad7b5fe3d6b114e02d45a54d59b7f6db00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.6

Release files / LiveCandles-0.0.2-py3-none-any.whl

Download URL LiveCandles-0.0.2-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95abfaa6060dd6fd5ff9070c784942ae3d46813f1f7c6c12d7665be73e5e6c0f
BLAKE2b-256 checksum
How to use checksums
177775441cd385d6d6d9398cadce051fc4f9442c8d5f3cfacf84e5103edd469e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page