Skip to main content

Add your description here

Project description

trackinsight-data-python

Setup the environment variables

Some variables are read from the environment. Variables found in local .env file are added to the environment (via the dotenv library)

TRACK_API_KEY=YOUR_KEY_HERE # your API key
TRACK_API_DL_WORKERS=10 # number of parallel threads when downloading data
TRACK_API_STORAGE=trackinsight_data # local folder to use when storing data on disk

Usage

import polars as pl
import trackinsight_data_python as API

# You need to add TRACK_API_KEY and TRACK_API_HOST to .env

ccy='usd'

metadata= API.getMetadata()
stamp = metadata["reportsAsOf"][ccy][-1] # get latest stamp for reports

reports = API.getReports(ccy=ccy,stamp=stamp) # reports is a Polars DataFrame, you can use .to_pandas() if needed

nuclear_etfs = reports.filter(pl.col('class_theme').list.join(';') =='Nuclear Energy')

ids = nuclear_etfs["share_id"].to_list();

usd_timeseries = API.getTimeseries(ids=ids,start='2024-01-01',end=None,ccy=ccy)

holdings = API.getHoldings(ids=ids)

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

trackinsight_data_python-0.1.1.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

trackinsight_data_python-0.1.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file trackinsight_data_python-0.1.1.tar.gz.

File metadata

File hashes

Hashes for trackinsight_data_python-0.1.1.tar.gz
Algorithm Hash digest
SHA256 296d16241c0691443c3c1b848cdd894d39c44de0d4f7741e92b9a863f2379f80
MD5 60a8a5e9b82138e0f5d99caa80bb86eb
BLAKE2b-256 7f1e8a44dc0906d32414e8b0fad36ea6241f592f0aa4a561eb6eaca25f1112d0

See more details on using hashes here.

File details

Details for the file trackinsight_data_python-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for trackinsight_data_python-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c8e3b74eb39c4762f0a5f63647efa087e7c6467a575934f159a259042d812945
MD5 46cc50a51b52ff12bcea293dd018027a
BLAKE2b-256 710ed4b92d84a3ac3f98aedde9d5415a0b677be0b08fa179b5a01aa8bf89d606

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