Skip to main content

Helper library to store current best bid from crypto exchanges APIs

Project description

topbid

Python 3.8 Code style: black

Helper library to fetch and store current best bid from crypto exchanges APIs. Currently supports Binance, Gateio, Kraken and Kucoin.

Requires Python 3.8+

Installation

pip install topbid

Usage

>>> from topbid.orderbook import OrderBook

>>> orderbook = OrderBook("cryptocompare-api-key", ["binance", "kucoin"])
2023-01-01 13:37:00,000 - topbid_orderbook - INFO - Saved mappings from CryptoCompare API for exchange binance
2023-01-01 13:37:00,000 - topbid_orderbook - INFO - Saved mappings from CryptoCompare API for exchange kucoin

>>> orderbook.add("binance", "BTC/USDT")

>>> orderbook.start(update_every=2)

>>> orderbook.get_orderbook_top_bid("binance", "BTC/USDT")
(23130.41, 0.05)

>>> orderbook.delete("binance", "BTC/USDT")

>>> orderbook.stop()

Build

python -m build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

topbid-1.1.0.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

topbid-1.1.0-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page