GithubHelp home page GithubHelp logo

kitehistory's Introduction

kite-history

GitHub license saythanks

kitehistory is a wrapper around Kite Historical API

Installation :

pip install kitehistory

asciicast

Options :

--symbol                         Stock symbol of the instrument.
--interval                       Time interval for the tick data.
--from_date                      Start date indicating the start of records.
--to_date                        End date indicating the end of records.
--exchange                       Exchange Name. (MCX/NSE/BSE/NFO/CDS/BFO/MCXSX)
--output                         Set flag to save data in csv format
--plot                           Set flag to plot chart in html format
--path                           Specify path to directory to store instruments master 
                                 along with access token keys
--verbose                        Enable verbose logging

Example Usage :

kitehistory -s TCS -i day -f 2017-05-15 -t 2017-06-05 -e NSE -o --plot 

img img

First Time Setup

kitehistory depends on Kite API to fetch instruments master file in .csv. You need to create an appllication at https://developers.kite.trade/apps and export the following keys in your shell

            export KITE_API_KEY='your-kite-api-key'
            export KITE_SECRET='your-kite-secret-key'
            export KITE_REQUEST_TOKEN='your-kite-request-token'

How it works ?

Kite API requires instrument-token to fetch the historical data. The idea behind this wrapper is to fetch the instruments master file and query it for the required symbol to fetch instrument token. Once the token is fetched, it uses Kite's API to get the historical data and saves the output in a .csv ready for analysis etc.

Credits

Contributing

Feel free to report any issues and/or send PRs for additional features.

License

MIT ยฉ Karan Sharma LICENSE included here

I did some data crunching using this library and wrote a blog post about it here

kitehistory's People

Contributors

dependabot[bot] avatar mr-karan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.