pfeed: The Single Source of Truth for Algo-Trading Data. Uniting Traders to Clean Once & Share with All.
TL;DR: use pfeed to manage your trading data; other traders will help you clean it
Problem
Starting algo-trading requires reliable and clean data, but traders often work in silos, each writing duplicated code to clean the same datasets—wasting time and effort. Accessing clean, ready-to-use data is a challenge, forcing traders to handle tedious data tasks before they can even start trading.
Solution
pfeed leverages modern data engineering tools to centralize data cleaning efforts, automate ETL/ELT, store data in a local data lakehouse (Parquet + DuckLake), and output backtesting-ready data, allowing traders to focus on strategy development.
pfeed (/piː fiːd/) is the data engine for trading, serving as a pipeline between raw data sources and traders. It enables you to download historical data, stream real-time data, and store cleaned data in a local data lake for quantitative analysis, supporting both batch processing and streaming workflows through streamlined data collection, cleaning, transformation, and storage.
Core Features
- Download or stream reliable, validated and clean data for research, backtesting, or live trading
- Get historical data (dataframe) or live data in standardized formats by just calling one single function
- Own your data — store locally now, write directly to the cloud later
- Build a local data lakehouse (Parquet + DuckLake) on your own machine
- Interact with different kinds of data (including TradFi, CeFi and DeFi) using a unified interface
Table of Contents
Installation
For more installation options, please refer to the documentation.
# pick your data source, e.g. bybit, and add ray for parallel processing (recommended).
pip install "pfeed[bybit,ray]"
Quick Start
Want to try first? Run
pfeedin your browser — no install needed — at pfeed.pfund.ai.
import pfeed as pe
bybit = pe.Bybit()
feed = bybit.market_feed
1. Download Historical Data
Download historical data
result = feed.download(
product="BTC_USDT_PERP", # or BTC_USDT_PERPETUAL in full
resolution="1minute", # '1tick'/'1t' or '2second'/'2s' etc.
start_date="2026-01-01",
end_date="2026-01-01",
io=pe.ParquetIO(), # None to skip storing
)
df = result.data.collect()
2. Retrieve Stored Data
Retrieve stored data
result = feed.retrieve(
product="BTC_USDT_PERP",
resolution="1m", # 1-minute data
start_date="2026-01-01",
end_date="2026-01-01",
io=pe.ParquetIO(),
)
df = result.data.collect()
3. Stream Live Data
Get streaming data
feed.stream(
product="BTC_USDT_CRYPTO",
resolution="1tick", # or just 'tick' for tick data
# only DuckLake supports storing streamed data for now, set it to None to skip storing
io=pe.DuckLakeIO(),
callback=lambda msg: print(msg),
)
4. Replay Stored Data as a Stream
Replay stored data message by message, like a live stream
feed.replay(
product="BTC_USDT_PERP",
resolution="1m",
start_date="2026-01-01",
end_date="2026-01-01",
io=pe.ParquetIO(), # where the data was stored
callback=lambda msg: print(msg),
)
Supported Data Sources
| Data Source | Data Categories | Download Historical Data | Stream Live Data |
|---|---|---|---|
| Hyperliquid | Market Data | 🔴 | 🔴 |
| Bybit | Market Data | 🟢 | 🟢 |
| OKX | Market Data | 🔴 | 🔴 |
| Binance | Market Data | 🔴 | 🔴 |
Supported IOs
| IO Format | Status |
|---|---|
| Parquet | 🟢 |
| DuckLake | 🟢 |
| Lance | 🔴 |
🟢 = finished
🟡 = in progress
🔴 = todo
⚪ = not applicable
* = paid data
Related Projects
- alphafund - AI-Powered Personal Hedge Fund. Be Your Own Fund Manager.
- pfund — A Complete Algo-Trading Framework for Machine Learning, TradFi, CeFi and DeFi ready. Supports Vectorized and Event-Driven Backtesting, Paper and Live Trading
- pytrade - An Educational Hub for Trading with Python. Where Python Trading Begins
Disclaimer
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This framework is intended for educational and research purposes only. It should not be used for real trading without understanding the risks involved. Trading in financial markets involves significant risk, and there is always the potential for loss. Your trading results may vary. No representation is being made that any account will or is likely to achieve profits or losses similar to those discussed on this platform.
The developers of this framework are not responsible for any financial losses incurred from using this software. This includes but not limited to losses resulting from inaccuracies in any financial data output by pfeed. Users should conduct their due diligence, verify the accuracy of any data produced by pfeed, and consult with a professional financial advisor before engaging in real trading activities.
Metadata
Release files for pfeed 0.0.24
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pfeed-0.0.24.tar.gz | 120.4 kB | Without provenance | Details for pfeed-0.0.24.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pfeed-0.0.24-py3-none-any.whl | Python 3 | none | any | Details for pfeed-0.0.24-py3-none-any.whl |
Total release size: 272.6 kB
Release files / pfeed-0.0.24.tar.gz
| Download URL | pfeed-0.0.24.tar.gz |
|---|---|
| Size | 120.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24f11e7a38339d53cec4dbe3c2e6ed7d8d35b37b867e8365ded07bfa5df257f3
|
|
BLAKE2b-256 checksum How to use checksums |
b5ad17e520aaa2e6cba6bc7a8e4898a18cf7f2228e090c188d01a2d741a84b3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pfeed-0.0.24-py3-none-any.whl
| Download URL | pfeed-0.0.24-py3-none-any.whl |
|---|---|
| Size | 152.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
966644a8d2526db6b9eeade072c37a18601811c2734b131f93d2c69a8386c63b
|
|
BLAKE2b-256 checksum How to use checksums |
a3812bcdde498b4a872057aa92dc166d53496f7befcb8c5f89a56147cd5bce26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for pfeed 0.0.24
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.