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, 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.0.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

topbid-1.0.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file topbid-1.0.1.tar.gz.

File metadata

  • Download URL: topbid-1.0.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.4

File hashes

Hashes for topbid-1.0.1.tar.gz
Algorithm Hash digest
SHA256 fd169e6f1e4f96353912be3335036ebc6281bfc9a83321d58787dafcb748fd01
MD5 9188c7829c3752398c30acb7801a3267
BLAKE2b-256 f6735335285d092015379bd8d5d4b4e2ff334ba512ed02fa74cd9b158b0e6e52

See more details on using hashes here.

File details

Details for the file topbid-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: topbid-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.4

File hashes

Hashes for topbid-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a4bc1926413afb35b5b1171327b7f3ae85dd4b4c7e1d7f4df36cecb17714507c
MD5 901f80d530afa23a47623d4024feeffc
BLAKE2b-256 7c379005dc3e945257209a96e1aaa4742e2dd028f7a993c5f1c3581c05505afb

See more details on using hashes here.

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