Skip to main content

binanceus-python

A lightweight Python wrapper for the binance.us public API.

Uses binance-connector-python for API connectivity.

I am in no way affiliated with Binance or Binance US. Use this at your own risk.

Quick Start

Install binanceus-python: pip install binanceus-python

Here's some example code to get started with:

from websocket_bs.client import BsWebsocketClient
import time

# start real-time ticker stream for symbol BTCUSD
symbol = 'BTCUSD'

ws = BsWebsocketClient()
ws.subscribe(symbol)
ws.start()


# print live ticker feed
try:
    while True:
        book_top = ws.get_book_top(symbol)
        bid = book_top[0]
        bid_qty = book_top[1]
        ask = book_top[2]
        ask_qty = book_top[3]
        print(f'{symbol} SPOT orderbook_top: ({bid:0.4f}, {bid_qty})  ({ask:0.4f}, {ask_qty})')
        time.sleep(1)
except KeyboardInterrupt as e:
    print("Program finished.")
    ws.stop()

Contributing

Contributions, fixes, recommendations, and all other feedback is welcome. If you are fixing a bug, please open an issue first with all relevant details, and mention the issue number in the pull request.

Contact

I can be reached on discord at Nenye#5335, or through email at nenye@ndili.net. Otherwise, feel free to open a PR or Issue here.

Metadata

Release files for binanceus-python 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for binanceus-python 0.1.0
File Size Uploaded Provenance Actions
binanceus-python-0.1.0.tar.gz 4.3 kB Without provenance Details for binanceus-python-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for binanceus-python 0.1.0
File Interpreter ABI Platform Actions
binanceus_python-0.1.0-py3-none-any.whl Python 3 none any Details for binanceus_python-0.1.0-py3-none-any.whl

Total release size: 9.0 kB

Release files / binanceus-python-0.1.0.tar.gz

Download URL binanceus-python-0.1.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c9a2ac29726208b31223584d3090b9931743bb3d304db192ea90822e93cb658f
BLAKE2b-256 checksum
How to use checksums
2fe57a9b1828f680493b238fd1fcfcee80ae09215643613d5a908d1aca016000
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.7 Darwin/21.3.0

Release files / binanceus_python-0.1.0-py3-none-any.whl

Download URL binanceus_python-0.1.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b901b3f25813156b08c4d5bdfc31554066bb15103f45446cb0c3d43add87f822
BLAKE2b-256 checksum
How to use checksums
e8c7c2192322bee2f496f2fcb8b298dd2a0c4973e470758f343c156d18db0141
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.7 Darwin/21.3.0

Security for binanceus-python 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page