Skip to main content

Kite History API wrapper

Project description

kite-history
============

|GitHub license| |saythanks|

``kitehistory`` is a wrapper around `Kite Historical
API <https://kite.trade/docs/connect/v1/#historical-data>`__

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 Output filename to save `csv`
--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 TCS.csv --verbose

.. figure:: screens/tcs.png
:alt: 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
-------

- `pandas <http://pandas.pydata.org/>`__
- `Kite API <https://developers.kite.trade/apps/>`__
- `pykiteconnect <pykiteconnect>`__
- `requests <http://docs.python-requests.org/en/master/>`__

Contributing
------------

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

License
~~~~~~~

MIT © Karan Sharma `LICENSE included here <LICENSE>`__

.. |GitHub license| image:: https://img.shields.io/badge/license-MIT-blue.svg
:target: https://raw.githubusercontent.com/mr-karan/kiteHistory/master/LICENSE
.. |saythanks| image:: https://img.shields.io/badge/say-thanks-ff69b4.svg
:target: https://saythanks.io/to/mr-karan
.. |asciicast| image:: https://asciinema.org/a/.png
:target: https://asciinema.org/a/


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

kitehistory-1.4.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

kitehistory-1.4-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file kitehistory-1.4.tar.gz.

File metadata

  • Download URL: kitehistory-1.4.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for kitehistory-1.4.tar.gz
Algorithm Hash digest
SHA256 9852db0289d35ce33335fedfe02b5d4bd0706729d3eeb7d53bc73044c10d9ce4
MD5 92d6c6e55c12764563105800e3a1ba6c
BLAKE2b-256 357a8d0c6b6a5cc404bf0139616a5629b3834c014448f6feb7f17996db1c8388

See more details on using hashes here.

File details

Details for the file kitehistory-1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for kitehistory-1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1b8d454059f673987df6af741f8c9d32c354ead9a33bb41e3e59b06cbd16bd57
MD5 cdcf43cca81ff675187256485b2e568f
BLAKE2b-256 d34770cf34294bf46bd023cbf13fd910b41a8da797c81d2329d7ff8f4227a76e

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