Skip to main content

Add your description here

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alphaticks_data-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alphaticks_data-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file alphaticks_data-0.1.0.tar.gz.

File metadata

  • Download URL: alphaticks_data-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.2

File hashes

Hashes for alphaticks_data-0.1.0.tar.gz
Algorithm Hash digest
SHA256 da59f1a3b2dcb72956af857be2243961f0881d59a17dff01d748ec5c145f58ab
MD5 869c464ed0acbc9023bc587c8817155d
BLAKE2b-256 9a6a6c57280305469c0ec5c2a96d4cd8a4603c612b0d796777c3a825925a8dd7

See more details on using hashes here.

File details

Details for the file alphaticks_data-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for alphaticks_data-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f32b038227cbb05418ebc9d19cff2b818fb92fef6b506af82cdee0c06d09d000
MD5 9c355e7a4e9c8aad4a7f8ac42358be53
BLAKE2b-256 522dfa304ed84f36dc332a99174f9027d604e4fee2d7e6138ea67d0c1755a8fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page