Quick answer
Cryptofeed is an open-source Python library that connects to many crypto exchanges’ WebSocket feeds and normalizes trades, tickers, order books, funding, open interest and liquidations into common objects delivered to your callbacks. Backends write data to Redis, Postgres, Kafka, Arctic and more, making it a common choice for recording tick data.
Cryptofeed at a glance
- Category
- Broker, exchange & data libraries
- Language
- Python
- License
- XFree86
- Does
- Market data
- Markets
- Crypto
- Best for
- Recording order-book and trade data, and real-time signals across exchanges.
- In AlgoGP
- Use the exported strategy object from your own code
Pick it if
Recording order-book and trade data, and real-time signals across exchanges.
Watch out for
Market data only; no order execution.
Cryptofeed strengths and limitations
Strengths
- Normalized feeds across exchanges.
- Book management with checksums where supported.
- Many storage backends.
Limitations
- Market data only; no order execution.
- You manage infrastructure for long-running capture.
Cryptofeed example
pip install cryptofeedfrom cryptofeed import FeedHandler
from cryptofeed.defines import TRADES
from cryptofeed.exchanges import Coinbase, Kraken
async def trade(t, receipt_ts):
print(t.exchange, t.symbol, t.side, t.amount, t.price)
fh = FeedHandler()
for ex in (Coinbase, Kraken):
fh.add_feed(ex(symbols=["BTC-USD"], channels=[TRADES], callbacks={TRADES: trade}))
fh.run()Use Cryptofeed with AlgoGP
AlgoGP does not add Cryptofeed to projects automatically yet, but nothing stops you using them together. Every AlgoGP project exports plain Python with a framework-neutral strategy object, so you can call it from Cryptofeed yourself.
- 1
Design and backtest in AlgoGP
Describe the idea to the copilot and backtest it on AlgoGP’s normalized history.
- 2
Add any bridge to get the adapter core
Adding a bridged framework (for example Backtrader) writes
frameworks/algogp_bridge.py, whoseStrategyBridge.on_bar()returns the orders the strategy wants. - 3
Call it from Cryptofeed
Feed Cryptofeed’s bars to
StrategyBridge, place the returned orders with Cryptofeed, and report fills back withsync().
Cryptofeed connects to Binance, Bybit, OKX, Kraken, Coinbase Exchange, Gemini, Bitfinex, Deribit, BitMEX, KuCoin. Each guide shows how to create the API key, which you can store in the project’s Keys & secrets.
Cryptofeed: frequently asked questions
Can Cryptofeed place orders?
No; pair it with CCXT or an exchange SDK for execution.
Cryptofeed alternatives
- CCXTPython, JavaScript, TypeScript, PHP, C#, GoOne unified API for 100+ crypto exchanges in Python, JavaScript, PHP, C# and Go: market data, balances and orders with the same calls everywhere.
- BarterRustRust libraries for event-driven live trading, paper trading and backtesting, with normalized exchange streams (barter-data) and execution.
- HftBacktestRust, PythonHigh-frequency backtesting in Rust and Python that models queue position and feed/order latency from full order-book and trade data.
- python-binancePythonThe widely used unofficial Python wrapper for the Binance REST and WebSocket APIs, with async support and spot, margin and futures endpoints.
Independent guide. AlgoGP is not affiliated with Cryptofeed. Features, licenses and maintenance change; check the official documentation. Nothing here is investment advice.