Skip to main content

Candlecraft

PyPI CI Python 3.10+ License: MIT

Unified OHLCV fetching for crypto, forex, and equities — one Python API, multiple data providers, packaged technical indicators.

Stable beta — used in production market-making workflows at 3poch Labs. Powers data for MarketMakingMegaMachine.

Install

pip install candlecraft

30-second example

from candlecraft import fetch_ohlcv, load_indicator

candles = fetch_ohlcv("BTCUSDT", "1h", limit=24)
rsi = load_indicator("rsi")(candles)

print(f"Latest close: {candles[-1].close}")
print(f"Latest RSI: {rsi[-1]['rsi']}")

Features

  • Single fetch_ohlcv() for crypto, forex, and equities
  • Auto provider selection (Binance for crypto, Twelve Data for forex/equity)
  • Typed OHLCV dataclass with validation
  • Rate-limit handling (raise or sleep strategies)
  • 10 technical indicators included in the package (pip install works)

Providers

Provider Asset classes API keys
Binance Crypto Optional (public API supported)
Twelve Data Crypto, Forex, Equity TWELVEDATA_SECRET required
from candlecraft import Provider, fetch_ohlcv

candles = fetch_ohlcv("EUR/USD", "1d", provider=Provider.TWELVEDATA, limit=30)

Indicators

from candlecraft import list_indicators, load_indicator

print(list_indicators())
# ['adx', 'atr', 'bollinger', 'ema', 'macd', 'obv', 'rsi', 'sma', 'stochastic', 'vwap']

macd = load_indicator("macd")
result = macd(candles)

CLI

git clone https://github.com/alfredalpino/Candlecraft.git
cd Candlecraft
pip install -e ".[dev]"

python pull_ohlcv.py --symbol BTCUSDT --timeframe 1h --limit 10 --indicator rsi

Development

pip install -e ".[dev]"
pytest -m "not integration"    # unit tests (no API keys)
pytest -m integration          # live API tests (keys required)
ruff check candlecraft tests

Documentation

License

MIT — see LICENSE.

Metadata

Release files for candlecraft 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for candlecraft 0.2.0
File Size Uploaded Provenance Actions
candlecraft-0.2.0.tar.gz 25.7 kB With provenance Details for candlecraft-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for candlecraft 0.2.0
File Interpreter ABI Platform Actions
candlecraft-0.2.0-py3-none-any.whl Python 3 none any Details for candlecraft-0.2.0-py3-none-any.whl

Total release size: 50.9 kB

Release files / candlecraft-0.2.0.tar.gz

Download URL candlecraft-0.2.0.tar.gz
Size 25.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1aeca53d0a415645927217c7552a04ff0cb5cef7e1b3ea7bc8d3e7eb6b37fe4c
BLAKE2b-256 checksum
How to use checksums
31356c927984b1b9aece25d1213acb17f362f8f9519359d52b78f0aec1f1052a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.

Transparency log

Release files / candlecraft-0.2.0-py3-none-any.whl

Download URL candlecraft-0.2.0-py3-none-any.whl
Size 25.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f06f7545300dd2999066c4a3659cf3c9a2b0e8299c645a73a3e941f0daaf2f0
BLAKE2b-256 checksum
How to use checksums
b93d17204505f08cbc01ba20b2ea449320d99255d75baa824db6c7e8dc82a468
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.

Transparency log

Security for candlecraft 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for candlecraft-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page