Unified OHLCV fetching for crypto, forex, and equities with multi-provider support and technical indicators
Project description
Candlecraft
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
OHLCVdataclass with validation - Rate-limit handling (
raiseorsleepstrategies) - 10 technical indicators included in the package (
pip installworks)
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
Related projects
- MarketMakingMegaMachine — Hyperliquid market-making platform ($58.9K live volume at 3poch Labs)
License
MIT — see LICENSE.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file candlecraft-0.2.0.tar.gz.
File metadata
- Download URL: candlecraft-0.2.0.tar.gz
- Upload date:
- Size: 25.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1aeca53d0a415645927217c7552a04ff0cb5cef7e1b3ea7bc8d3e7eb6b37fe4c
|
|
| MD5 |
ad6a38b53602971de68c90d41b5cb9c9
|
|
| BLAKE2b-256 |
31356c927984b1b9aece25d1213acb17f362f8f9519359d52b78f0aec1f1052a
|
Provenance
The following attestation bundles were made for candlecraft-0.2.0.tar.gz:
Publisher:
publish.yml on alfredalpino/Candlecraft
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
candlecraft-0.2.0.tar.gz -
Subject digest:
1aeca53d0a415645927217c7552a04ff0cb5cef7e1b3ea7bc8d3e7eb6b37fe4c - Sigstore transparency entry: 1939803355
- Sigstore integration time:
-
Permalink:
alfredalpino/Candlecraft@ecabb31c6b854e21cbf9aadb68b2da0727dd33c2 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/alfredalpino
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ecabb31c6b854e21cbf9aadb68b2da0727dd33c2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file candlecraft-0.2.0-py3-none-any.whl.
File metadata
- Download URL: candlecraft-0.2.0-py3-none-any.whl
- Upload date:
- Size: 25.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f06f7545300dd2999066c4a3659cf3c9a2b0e8299c645a73a3e941f0daaf2f0
|
|
| MD5 |
3707a86adbb3b73c48ae1adfce75e27f
|
|
| BLAKE2b-256 |
b93d17204505f08cbc01ba20b2ea449320d99255d75baa824db6c7e8dc82a468
|
Provenance
The following attestation bundles were made for candlecraft-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on alfredalpino/Candlecraft
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
candlecraft-0.2.0-py3-none-any.whl -
Subject digest:
9f06f7545300dd2999066c4a3659cf3c9a2b0e8299c645a73a3e941f0daaf2f0 - Sigstore transparency entry: 1939803492
- Sigstore integration time:
-
Permalink:
alfredalpino/Candlecraft@ecabb31c6b854e21cbf9aadb68b2da0727dd33c2 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/alfredalpino
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ecabb31c6b854e21cbf9aadb68b2da0727dd33c2 -
Trigger Event:
push
-
Statement type: