A django library for tracking and storing the prices of assets over time.
Project description
django-candlestick
django-candlestick is a django library for storing price data for stocks, assets, currencies, and other tradeable instruments.
Setup
Install:
$ pip install django-candlestick
Add to installed apps:
INSTALLED_APPS = [
...
"django_candlestick"
...
]
Migrate:
$ python manage.py migrate
You now have a database of tradeable instruments and their prices.
Use
from django_candlestick.models import Instrument, Bar
apple = Instrument.objects.create(
symbol="AAPL", name="Apple, Inc.", currency="USD", timezone="US/Eastern"
)
bar = Bar.objects.create(
open="320.13", low="319.88", high="321.4", close="320.17", volume=3115337,
timestamp=1579887000, resolution="H", instrument=apple
)
print(bar.datetime) # 2020-01-24 12:30:00-05:00
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for django_candlestick-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19a38d8b92bff9e975508578db76b3953839ad42c7c7ac4352d0120012fd7708 |
|
MD5 | ff3d630df50285bedf449957e92736f7 |
|
BLAKE2b-256 | 4d14c9184b96c0863a5fcf18aa897415c7451a341aef791a3320f916bedc1919 |