Jugad data is a library to download historical stock data
Project description
Documentation
https://marketsetup.in/documentation/jugaad-data/
Introduction
jugaad-data
helps you download historical stock data.
Features
- Supports new NSE website, (All libraries based on old NSE website might stop working)
- Powerful CLI (Command line interface), Even non-coders can use it easily
- Built-in caching mechanism to play nice with NSE. Avoid making un-necessary requests to NSE's website and getting
- blocked
- Optional
pandas
support, You don't have to if you don't want to
Road map
Exchange | Segment | Supported? |
---|---|---|
NSE | Stocks | Yes |
NSE | Stocks F&O | Yes |
NSE | Index | Yes |
NSE | Index F&O | Yes |
Installation
pip install git+https://github.com/jugaad-py/jugaad-data.git
Getting started
Download historical stock data
$ jdata stock --help
Usage: jdata stock [OPTIONS]
Download historical stock data
$jdata stock --symbol STOCK1 -f yyyy-mm-dd -t yyyy-mm-dd --o file_name.csv
Options:
-s, --symbol TEXT [required]
-f, --from TEXT [required]
-t, --to TEXT [required]
-S, --series TEXT [default: EQ]
-o, --output TEXT
--help Show this message and exit.
$ jdata stock -s SBIN -f 2020-01-01 -t 2020-01-31 -o SBIN-Jan.csv
SBIN [####################################] 100%
Saved file to : SBIN-Jan.csv
Download historical derivatives (F&O) data
$ jdata deriviatives --help
Usage: cli.py derivatives [OPTIONS]
Sample usage-
Download stock futures-
jdata derivatives -s SBIN -f 2020-01-01 -t 2020-01-30 -e 2020-01-30 -i FUTSTK -o file_name.csv
Download index futures-
jdata derivatives -s NIFTY -f 2020-01-01 -t 2020-01-30 -e 2020-01-30 -i FUTIDX -o file_name.csv
Download stock options-
jdata derivatives -s SBIN -f 2020-01-01 -t 2020-01-30 -e 2020-01-30 -i OPTSTK -p 330 --ce -o file_name.csv
Download index options-
jdata derivatives -s NIFTY -f 2020-01-01 -t 2020-01-30 -e 2020-01-23 -i OPTIDX -p 11000 --pe -o file_name.csv
Options:
-s, --symbol TEXT Stock/Index symbol [required]
-f, --from TEXT From date - yyyy-mm-dd [required]
-t, --to TEXT To date - yyyy-mm-dd [required]
-e, --expiry TEXT Expiry date - yyyy-mm-dd [required]
-i, --instru TEXT FUTSTK - Stock futures, FUTIDX - Index Futures, OPTSTK -
Stock Options, OPTIDX - Index Options [required]
-p, --price TEXT Strike price (Only for OPTSTK and OPTIDX)
--ce / --pe --ce for call and --pe for put (Only for OPTSTK and
OPTIDX)
-o, --output TEXT Full path of output file
--help Show this message and exit.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
jugaad_data-0.19-py3-none-any.whl
(20.8 kB
view hashes)
Close
Hashes for jugaad-data-0.19.linux-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67292702ffae0b771f903adc748d23a0c8d95cb2e756e7c5b76faa6e932eb341 |
|
MD5 | d2ef32beb952b41ed8df01f8197581e7 |
|
BLAKE2b-256 | a419b03ef8cdfa2612cd58a2b07c9d7b3dfdaf010c44c1d8a10bbd04b63d20bf |
Close
Hashes for jugaad_data-0.19-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb5bf9d753e9ca8134468391208c24e16ac92136b13a028ecfc1ba23530cd72b |
|
MD5 | 868d230ef38e56ccd4edd05f318cf730 |
|
BLAKE2b-256 | 5196d0853b3342680674b22a3ee4f8f5f5dd035519a842de6f0b339cfa5881b1 |