Guide · Agent skill
How to use the Cryptofeed skill for live exchange market data
Updated · written with AI from the project's own documentation and checked against our catalogue data
The cryptofeed skill teaches an AI agent how to use the cryptofeed Python library, which connects to many cryptocurrency exchanges at once and delivers live prices, trades and order book updates in a consistent format. This guide is for readers who may never have used an agent skill and want the agent to write working market data code. By the end you will know what the skill does, how to install it, how to ask for help in plain language, and what to check before running the code it writes.
Quick start
- 1Download the ZIP. Download the cryptofeed skill ZIP from the download link on this page.
- 2Install the skill. Unzip it into ~/.claude/skills/ for all projects or into a project's .claude/skills/ folder, or upload the ZIP under Settings → Capabilities → Skills in the Claude apps.
- 3Install the library. Run pip install cryptofeed in your Python environment, adding the [all] extras only if you need storage backends.
- 4Ask for what you need. Describe the exchange, symbol, data channel and storage you want in plain language.
- 5Review the generated code. Read the callbacks and feed list, and confirm which channels need API keys before running anything.
- 6Run with one feed first. Start the script with a single exchange and symbol, check the output, then add more feeds.
What is an agent skill and what does this one do?
An agent skill is a folder of instructions and reference files that an AI agent loads when a task matches it. This skill is named cryptofeed and covers the cryptofeed Python library for real-time cryptocurrency market data.
Once installed, the agent knows how to set up feeds for many exchanges, receive normalized data, explain callbacks and point to storage options such as Redis, MongoDB or Kafka. The skill itself does not run anything or connect to exchanges. The code it helps you write does that when you run it.
- Writes FeedHandler setup code for one or more exchanges
- Explains callback functions for ticker, trade and order book data
- Describes normalized data across exchanges, including symbols, timestamps and channel names
- Points to backend options for writing data to storage
How do you install the cryptofeed skill?
Download the skill ZIP from the download link on this page. Then choose one of two routes depending on how you use your agent.
For Claude Code, unzip the file into your personal skills folder at ~/.claude/skills/, or into a project's .claude/skills/ folder if you want the skill only for that project.
In the Claude apps, open Settings, go to Capabilities, then Skills, and upload the ZIP there.
- Personal (all projects): ~/.claude/skills/
- Single project: .claude/skills/ inside the project folder
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
How do you trigger the skill with natural requests?
You do not need a special command. The skill is meant to be used when your request involves real-time cryptocurrency market data, WebSocket streaming from exchanges, order books, trades or tickers, or building a data pipeline with a storage backend.
Describe what you want in plain terms and name the exchanges, data types and storage you need. The more specific you are, the closer the code will match your setup.
- "Write a cryptofeed script that streams BTC-USD ticker data from Coinbase."
- "Show me how to get top-of-book and trades from Binance and Kraken into Redis."
- "Explain how the callbacks in this cryptofeed example work."
- "Give me a cryptofeed NBBO feed across Coinbase, Kraken and Gemini."
What does a basic cryptofeed script look like?
Install the library with pip first. The basic package is enough for most public market data. Install the all-extras version only if you plan to use storage backends.
The pattern is: create a FeedHandler, add one or more exchange feeds with the symbols and channels you want, attach a callback function for each channel, then run the handler. The example below is taken from the skill's reference material.
pip install cryptofeed
pip install cryptofeed[all]
from cryptofeed import FeedHandler
from cryptofeed.exchanges import Coinbase, Bitfinex
from cryptofeed.defines import TICKER, TRADES, L2_BOOK
def ticker_callback(data):
print(f"Ticker: {data}")
def trade_callback(data):
print(f"Trade: {data}")
fh = FeedHandler()
fh.add_feed(Coinbase(
symbols=['BTC-USD'],
channels=[TICKER],
callbacks={TICKER: ticker_callback}
))
fh.add_feed(Bitfinex(
symbols=['BTC-USD'],
channels=[TRADES],
callbacks={TRADES: trade_callback}
))
fh.run()How do you get combined best bid and offer across exchanges?
The NBBO feature aggregates data from several exchanges into one synthetic best bid and offer feed for a symbol. The callback receives the bid and ask along with the exchange each came from. Use this when you want to compare prices across venues in one stream.
from cryptofeed import FeedHandler
from cryptofeed.exchanges import Coinbase, Gemini, Kraken
def nbbo_update(symbol, bid, bid_size, ask, ask_size, bid_feed, ask_feed):
print(f'Pair: {symbol} Bid: {bid:.2f} ({bid_size:.6f}) from {bid_feed}')
print(f'Ask: {ask:.2f} ({ask_size:.6f}) from {ask_feed}')
f = FeedHandler()
f.add_nbbo([Coinbase, Kraken, Gemini], ['BTC-USD'], nbbo_update)
f.run()Which data channels and storage options can you ask about?
Public market data channels include top of book (L1_BOOK), aggregated order book sizes (L2_BOOK), aggregated order book orders (L3_BOOK), trades, tickers, funding rates, open interest, liquidations, index prices and candles. Authenticated channels cover order status, deposits and withdrawals, wallet balances and your own fills.
For storage, the skill lists Redis, Arctic, ZeroMQ, InfluxDB v2, MongoDB, Kafka, RabbitMQ, PostgreSQL, QuasarDB, GCP Pub/Sub, QuestDB and UDP, TCP or Unix sockets. Ask the agent which backend fits your pipeline and it can point you to the relevant option.
- Public: L1_BOOK, L2_BOOK, L3_BOOK, TRADES, TICKER, FUNDING, OPEN_INTEREST, LIQUIDATIONS, INDEX, CANDLES
- Authenticated: ORDER_INFO, TRANSACTIONS, BALANCES, FILLS (these need exchange API keys)
What should you check before running the code?
The skill does not run scripts and does not connect to exchanges itself. Network access happens only when you run the code the agent writes. Review the code, start with a single exchange and a single symbol, and watch the output before adding more feeds.
Code that helps with trading can lose money if it has bugs. The skill covers market data only. It does not place trades, manage funds or give investment advice. Keep API keys out of shared files and use keys only for the authenticated channels that need them.
- Runs scripts: no. Uses network: yes, through the code you run.
- Exchange API keys are needed only for authenticated channels such as balances, orders and fills.
- Backend services such as Redis, MongoDB or Kafka are needed only if you use those storage options.
What are good tips for getting useful results?
Start with one exchange and one channel to confirm the data arrives in the shape you expect. Add exchanges and backends after that works. Include the symbol format each exchange uses, since the skill normalizes data but you still choose the symbols to subscribe to.
Ask the agent to explain callbacks line by line if you are new to Python. The skill's reference files include the library's README, which you can ask the agent to read when you need exact channel or exchange details.
- Begin with a single FeedHandler and a single feed.
- Name the exchange, symbol, channel and storage backend in your request.
- Ask for an explanation of any code you do not understand before running it.
What people use it for
- Multi-exchange price monitoring that prints ticker updates from several venues side by side
- Order book depth analysis that counts bids and asks from a Coinbase L2 book feed
- Trade flow analysis that logs side, amount and price for trades on Binance
- Comparing best bid and offer across exchanges with the NBBO feature
- Building a data pipeline that writes normalized market data to Redis, MongoDB or Kafka
Frequently asked questions
How do I install the cryptofeed skill?
Download the skill ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. In the Claude apps, you can instead upload the ZIP under Settings → Capabilities → Skills.
Do I need to install the cryptofeed Python library too?
Yes. The skill helps the agent write code that uses the cryptofeed library, so you need to install it with pip install cryptofeed in your Python environment. The skill itself does not run code or connect to exchanges.
What are the requirements for the cryptofeed skill?
The source lists Python 3.8 or higher and the pip package cryptofeed. Optional extras such as cryptofeed[all] add backends, and Redis, MongoDB or Kafka are needed only if you use them. Exchange API keys are needed only for authenticated channels.
Is the cryptofeed skill free to use?
This directory lists the skill under the MIT licence. The source does not mention pricing for the skill, so check the licence file in the download for the full terms.
How does cryptofeed compare with using each exchange's API directly?
Cryptofeed gives you one consistent format across many exchanges, with normalized symbols, timestamps and channel names. Connecting to each exchange's API directly means writing and maintaining a separate integration for every venue.
Why isn't my cryptofeed script receiving data?
Confirm the symbol format matches the exchange, the channel is supported there, and the machine has network access. If you use authenticated channels, check that your API keys are set. Start with one feed to isolate the problem.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Choose this skill if you write Python and want an agent to help build multi-exchange market data pipelines, dashboards or research tools. Pick something else if you need to place trades, manage funds, get investment advice, or have no Python experience, since the examples assume working knowledge of Python and pip.
Download the skill