Skip to main content

No project description provided

Project description

TvData

🇫🇷 Version française

A Python library and CLI for fetching and exporting financial candle data, timeframes, and tickers from your custom API.

Features

  • Fetch candle data in chunks and return as a Pandas DataFrame
  • Export candle data as CSV via CLI
  • List available timeframes and tickers
  • Type hints everywhere for static analysis (compatible with mypy)
  • Examples available in the examples/ folder

Installation

pip install TvData

Usage

Library

from tvdata import fetch_candles, fetch_timeframes, fetch_tickers

df = fetch_candles(
    symbol="AAPL",
    timeframe="1m",
    start=1700000000,
    end=1700003600,
    chunk_size=100,
    api_url="http://candles.macrofinder.flolep.fr"
)
print(df)

# Get available timeframes
timeframes = fetch_timeframes("http://candles.macrofinder.flolep.fr")
print(timeframes)

# Get available tickers
tickers = fetch_tickers("http://candles.macrofinder.flolep.fr")
print(tickers)

See more in examples/example_tvdata.py.

CLI

tvdata candles SYMBOL TIMEFRAME START END --csv output.csv
# Example:
tvdata candles AAPL 1m 1700000000 1700003600 --csv aapl_1m.csv

tvdata timeframes

tvdata tickers

Development

  • Clone the repository
  • Install dependencies: pip install -r requirements-dev.txt
  • Run tests: pytest
  • Check typing: mypy tvdata

License

MIT


🇫🇷 Version française

Une bibliothèque Python et une CLI pour récupérer et exporter des données de chandeliers, timeframes et tickers depuis votre API personnalisée.

Fonctionnalités

  • Récupération des chandeliers en DataFrame Pandas (par lots)
  • Export CSV via la CLI
  • Liste des timeframes et tickers disponibles
  • Typage partout pour l'analyse statique (compatible mypy)
  • Exemples dans le dossier examples/

Installation

pip install TvData

Utilisation

Librairie

from tvdata import fetch_candles, fetch_timeframes, fetch_tickers

candles = fetch_candles(
    symbol="AAPL",
    timeframe="1m",
    start=1700000000,
    end=1700003600,
    chunk_size=100,
    api_url="http://candles.macrofinder.flolep.fr"
)
print(candles)

timeframes = fetch_timeframes("http://candles.macrofinder.flolep.fr")
print(timeframes)

tickers = fetch_tickers("http://candles.macrofinder.flolep.fr")
print(tickers)

Voir plus dans examples/example_tvdata.py.

CLI

tvdata candles SYMBOL TIMEFRAME START END --csv output.csv
# Exemple :
tvdata candles AAPL 1m 1700000000 1700003600 --csv aapl_1m.csv

tvdata timeframes

tvdata tickers

Développement

  • Clonez le dépôt
  • Installez les dépendances : pip install -r requirements-dev.txt
  • Lancez les tests : pytest
  • Vérifiez le typage : mypy tvdata

Licence

MIT

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

tvdata-0.0.1.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

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

tvdata-0.0.1-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file tvdata-0.0.1.tar.gz.

File metadata

  • Download URL: tvdata-0.0.1.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tvdata-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c16bb968d61cbe79b1855b106a5edc0fdf98b180c65939ca8985c93ff5997572
MD5 cfa7a5854d078866a4c05e04f10c3f8c
BLAKE2b-256 82b5efcd0d29fc6e479e78f1528ef904af30ff6d9384ebd08a1aded190acef40

See more details on using hashes here.

Provenance

The following attestation bundles were made for tvdata-0.0.1.tar.gz:

Publisher: pypi.yaml on flolep2607/tvdata

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tvdata-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: tvdata-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tvdata-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d6bff4f3dd15269e01b57c66faea25ef533fc80527a7fd3c5730386f64984dae
MD5 4a4a7be6ebd39523b93448e3620ed737
BLAKE2b-256 6d8aab9a008851d6f5bc9c3b4a47c66fd01820ffb1f894a4d93469ec063db395

See more details on using hashes here.

Provenance

The following attestation bundles were made for tvdata-0.0.1-py3-none-any.whl:

Publisher: pypi.yaml on flolep2607/tvdata

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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