Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Python Binance | 5,493 | 68 | 55 | 18 days ago | 81 | August 11, 2023 | 493 | mit | Python | |
Binance Exchange API python implementation for automated trading | ||||||||||
Crypto Trading Bot | 2,688 | 10 months ago | 111 | mit | JavaScript | |||||
Cryptocurrency trading bot in javascript for Bitfinex, Bitmex, Binance, Bybit ... (public edition) | ||||||||||
Cryptofeed | 1,925 | 2 | 6 | 8 days ago | 74 | April 02, 2021 | 63 | other | Python | |
Cryptocurrency Exchange Websocket Data Feed Handler | ||||||||||
Node Binance Api | 1,514 | 86 | 44 | 7 months ago | 120 | November 24, 2021 | 291 | mit | JavaScript | |
Node Binance API is an asynchronous node.js library for the Binance API designed to be easy to use. | ||||||||||
Voten | 1,189 | 3 years ago | 13 | apache-2.0 | PHP | |||||
The code that powers voten.co | ||||||||||
Binance | 663 | 115 | 15 | 15 hours ago | 122 | November 24, 2023 | 34 | mit | TypeScript | |
Node.js & JavaScript SDK for Binance REST APIs & WebSockets, with TypeScript & browser support, integration tests, beautification & more. | ||||||||||
Wolfbot | 629 | 10 months ago | 32 | agpl-3.0 | TypeScript | |||||
Crypto currency trading bot written in TypeScript for NodeJS | ||||||||||
Huobi_python | 627 | 2 years ago | 8 | November 17, 2023 | 44 | apache-2.0 | Python | |||
Python SDK for Huobi Spot API | ||||||||||
Ccxws | 599 | 1 | 2 | 9 months ago | 148 | October 08, 2021 | 67 | mit | TypeScript | |
WebSocket client for 38 cryptocurrency exchanges | ||||||||||
Php Binance Api | 578 | 17 | 11 | 10 months ago | 79 | July 07, 2021 | 76 | mit | PHP | |
PHP Binance API is an asynchronous PHP library for the Binance API designed to be easy to use. https://github.com/binance-exchange/php-binance-api |
Handles multiple cryptocurrency exchange data feeds and returns normalized and standardized results to client registered callbacks for events like trades, book updates, ticker updates, etc. Utilizes websockets when possible, but can also poll data via REST endpoints if a websocket is not provided.
Create a FeedHandler object and add subscriptions. For the various data channels that an exchange supports, you can supply callbacks for data events, or use provided backends (described below) to handle the data for you. Start the feed handler and you're done!
from cryptofeed import FeedHandler
# not all imports shown for clarity
fh = FeedHandler()
# ticker, trade, and book are user defined functions that
# will be called when ticker, trade and book updates are received
ticker_cb = {TICKER: ticker}
trade_cb = {TRADES: trade}
gemini_cb = {TRADES: trade, L2_BOOK: book}
fh.add_feed(Coinbase(symbols=['BTC-USD'], channels=[TICKER], callbacks=ticker_cb))
fh.add_feed(Bitfinex(symbols=['BTC-USD'], channels=[TICKER], callbacks=ticker_cb))
fh.add_feed(Poloniex(symbols=['BTC-USDT'], channels=[TRADES], callbacks=trade_cb))
fh.add_feed(Gemini(symbols=['BTC-USD', 'ETH-USD'], channels=[TRADES, L2_BOOK], callbacks=gemini_cb))
fh.run()
Please see the examples for more code samples and the documentation for more information about the library usage.
For an example of a containerized application using cryptofeed to store data to a backend, please see Cryptostore.
Cryptofeed also provides a synthetic NBBO (National Best Bid/Offer) feed that aggregates the best bids and asks from the user specified feeds.
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 Price: {bid:.2f} Bid Size: {bid_size:.6f} Bid Feed: {bid_feed} Ask Price: {ask:.2f} Ask Size: {ask_size:.6f} Ask Feed: {ask_feed}')
def main():
f = FeedHandler()
f.add_nbbo([Coinbase, Kraken, Gemini], ['BTC-USD'], nbbo_update)
f.run()
Cryptofeed supports the following channels from exchanges:
Cryptofeed supports backend
callbacks that will write directly to storage or other interfaces.
Supported Backends:
Note: cryptofeed requires Python 3.8+
Cryptofeed can be installed from PyPi. (It's recommended that you install in a virtual environment of your choosing).
pip install cryptofeed
Cryptofeed has optional dependencies, depending on the backends used. You can install them individually, or all at once. To install Cryptofeed along with all its optional dependencies in one bundle:
pip install cryptofeed[all]
If you wish to clone the repository and install from source, run this command from the root of the cloned repository.
python setup.py install
Alternatively, you can install in 'edit' mode (also called development mode):
python setup.py develop
See more discussion of package installation in INSTALL.md.
Cryptofeed supports some REST interfaces for retrieving real-time and historical data, as well as order placement and account management. These are integrated into the exchange classes directly. You can view the supported methods by calling the info()
method on any exchange. The methods for interacting with the exchange RET endpoints exist in two flavors, the synchronous methods (suffixed with _sync
) as well as the asynchronous which can be utilized with asyncio. For more information see the documentation.
There are a lot of planned features, new exchanges, etc planned! If you'd like to discuss ongoing development, please join the slack or open a thread in the discussions in GitHub.
Issues and PRs are welcomed!
Cryptofeed wouldn't be possible without the help of many contributors! I owe them and all other contributors my thanks!
Support and donations are appreciated but not required. You can donate via GitHub Sponsors, or via the addresses below: