client to communicate with alphaticks
Project description
alpha-data-py
A client to fetch data from the alphaticks data base
Installation
You can install alpha-data-py using the following command:
pip install alpha-data-py
Usage
In order to use the library, you need an API key from alphaticks. Go to alphaticks.io, Account -> Licenses -> AlphaData and click on Add credentials.
Now that you have your credentials ready, you can create a client, fetch a security, and fetch the data you need for that security.
import datetime
from adata import Client, FREQ_1M
c = Client(API_KEY, API_SECRET)
secs = c.get_securities()
for s in secs:
if s.symbol == "BTCUSDT" and s.exchange == "fbinance":
sec = s
start = datetime.datetime(2022, 1, 1)
end = datetime.datetime(2022, 1, 5)
it = c.get_historical_ohlcv(sec, FREQ_1M, start, end)
while it.next():
print(it.o, it.h, it.l, it.c, it.v)
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
alpha-data-py-1.0.14.tar.gz
(4.1 kB
view details)
Built Distribution
File details
Details for the file alpha-data-py-1.0.14.tar.gz
.
File metadata
- Download URL: alpha-data-py-1.0.14.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b07c8d6a33ef9a698af26e143f49e5c8674d6d39d4c1138e348bdf582ed7508 |
|
MD5 | 24a83a304b2840f51e33584d4be0f746 |
|
BLAKE2b-256 | bf4570a2185b7f4b8f61c28e6812f6926ffef9b3d5871424b9ef4388532aa5c7 |
File details
Details for the file alpha_data_py-1.0.14-py3-none-any.whl
.
File metadata
- Download URL: alpha_data_py-1.0.14-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e21016ffea5f5c01a2bf1a4fbd22f4bb20189ede400e5b105dc5ac50e7d5d341 |
|
MD5 | 9715f70f5e2ab22bcbe8666450ab30c5 |
|
BLAKE2b-256 | 8620691888191aa6d0a7700711b95e644ee9d35cce025c517b6e1a21e23c4a54 |