Skip to main content

ezbybit

A small Python wrapper around pybit for simple Bybit spot BTC/ETH market orders.

Installation

Install from PyPI once the first release is published:

pip install ezbybit

For local development:

python -m pip install -e .

Usage

from ezbybit import BybitClient

client = BybitClient(
    api_key="YOUR_BYBIT_API_KEY",
    api_secret="YOUR_BYBIT_API_SECRET",
    testnet=True,
)

print(client.get_available_budget_usdt())

Place a market buy order using 80% of available USDT:

response = client.buy("BTC")
print(response)

response = client.buy("ETH")
print(response)

Sell available BTC or ETH:

response = client.sell("BTC")
print(response)

response = client.sell("ETH")
print(response)

By default, buy() uses 80% of available USDT. Pass a different ratio with Decimal:

from decimal import Decimal

response = client.buy("ETH", Decimal("0.5"))

You can also run the local example with environment variables:

export BYBIT_API_KEY="YOUR_BYBIT_API_KEY"
export BYBIT_API_SECRET="YOUR_BYBIT_API_SECRET"
python examples/basic.py

The package also installs a small CLI:

ezbybit --version

Build

python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*

Publish

Publish to TestPyPI first:

python -m twine upload --repository testpypi dist/*

Then publish to PyPI:

python -m twine upload dist/*

Metadata

Release files for ezbybit 0.1.1

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

Source distribution (sdist)

Source distribution for ezbybit 0.1.1
File Size Uploaded Provenance Actions
ezbybit-0.1.1.tar.gz 4.2 kB Without provenance Details for ezbybit-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ezbybit 0.1.1
File Interpreter ABI Platform Actions
ezbybit-0.1.1-py3-none-any.whl Python 3 none any Details for ezbybit-0.1.1-py3-none-any.whl

Total release size: 8.9 kB

Release files / ezbybit-0.1.1.tar.gz

Download URL ezbybit-0.1.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6647851c791ac5e2a0353e99cce254c4b7c730806b72363eae25688dd3bf9d7d
BLAKE2b-256 checksum
How to use checksums
23cbcd07cf549e5b5a5598bffa41d7f68d991bf6a892819ffaf653c7bf9a6979
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / ezbybit-0.1.1-py3-none-any.whl

Download URL ezbybit-0.1.1-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
21c68069edd16f2ce1dc06c95a8771f6211fbd02e62f8b9aac4cf9232b98d51f
BLAKE2b-256 checksum
How to use checksums
0e2c8fe23772a7b38181e1f7ce7425abc025c3a515f12eb13cb2d34b7be6fc31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for ezbybit 0.1.1

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.1 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