Skip to main content

pfeed: The Single Source of Truth for Algo-Trading Data. Uniting Traders to Clean Once & Share with All.

Discord X Downloads PyPI PyPI - Support Python Versions afterpython Discussions Ask DeepWiki View Code Wiki

TL;DR: use pfeed to manage your trading data; other traders will help you clean it

For illustration purposes only, not everything shown is currently supported.

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 data lake with DeltaLake support, 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 a single function
  • Own your data — store locally now, write directly to the cloud later
  • Build a local data lakehouse (Parquet + DeltaLake) on your own machine
  • Interact with different kinds of data (including TradFi, CeFi and DeFi) using a unified interface
  • Scale using modern data tools (e.g. Polars, Daft) and workflow orchestration frameworks (Prefect for batch processing)

Table of Contents

Installation

For more installation options, please refer to the documentation.

# pick your data source, e.g. yfinance
pip install "pfeed[yfinance]"

Quick Start

Want to try first? Run pfeed in your browser — no install needed — at pfeed.pfund.ai.

import pfeed as pe

bybit = pe.Bybit()  # initialize data client
feed = bybit.market_feed  # this could be {data_source}.news_feed if the data source supports it

1. Download Historical Data

Download data from Bybit and get a standardized dataframe

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',
    storage_config=pe.StorageConfig(storage='LOCAL'),  # store data locally
)
df = result.data.collect()  # polars dataframe by default

2. Retrieve Downloaded Data

Retrieve downloaded data from storage

result = feed.retrieve(
    product='BTC_USDT_PERP',
    resolution='1m',  # 1-minute data
    start_date='2026-01-01',
    end_date='2026-01-01',
    storage_config=pe.StorageConfig(storage='LOCAL'),
)
df = result.data.collect()

3. Stream Live Data

Get streaming data from Bybit

feed.stream(
    product='BTC_USDT_PERP',
    resolution='1tick',  # or just 'tick' for tick data
    callback=lambda ws_name, msg: print(ws_name, msg),
)

Supported Data Storages

Storage Status
LOCAL/CACHE 🟢
DuckDB 🟢
LanceDB 🟢
HuggingFace 🟢
S3 🔴
PostgreSQL/TimescaleDB 🔴

Supported IO Formats

IO Format Status
Parquet 🟢
DeltaLake 🟢
DuckLake 🔴
Iceberg 🔴
Vortex 🔴

Supported Data Sources

Data Source Data Categories Download Historical Data Stream Live Data
Yahoo Finance Market Data, News Data, Fundamental Data 🟢 🟢
Bybit Market Data 🟢 🟢
*Interactive Brokers Market Data ⚪ 🔴
OKX Market Data 🔴 🔴
Binance Market Data 🔴 🔴
Hyperliquid Market Data 🔴 🔴
*Databento Market Data 🔴 🔴
*FinancialModelingPrep Market Data, News Data, Fundamental Data 🔴 🔴
*FirstRate Data Market Data 🔴 ⚪
*Polygon Market Data 🔴 🔴

🟢 = finished
🟡 = in progress
🔴 = todo
⚪ = not applicable
* = paid data

  • 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 - A curated list of Python libraries and resources for algorithmic trading.

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.20

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

Source distribution (sdist)

Source distribution for pfeed 0.0.20
File Size Uploaded
pfeed-0.0.20.tar.gz 175.3 kB Details

Built distribution (wheel)

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

Total release size: 435.8 kB

Release files / pfeed-0.0.20.tar.gz

Download URL pfeed-0.0.20.tar.gz
Size 175.3 kB
Tags Source
SHA-256 checksum
How to use checksums
09ce307e295f94692ee4c66d1fe329a634f5b744f7a456242c884813d2ccedb3
BLAKE2b-256 checksum
How to use checksums
4800f6fd5e47ccdc1c6ac185cf120a811718670a5b405ab5d3e123f82fbc22cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","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.20-py3-none-any.whl

Download URL pfeed-0.0.20-py3-none-any.whl
Size 260.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba1236df103eb3428b794fc90e98b109e0797edf6566022ae12df83f8fbf888e
BLAKE2b-256 checksum
How to use checksums
b682aeffb69d6ad7d7d44060d13ac9c5973b5ed68c2dcb4d616906dca4c0aef7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.0.20 This release

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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