LX Python SDK
Official Python SDK for the LX - High-performance decentralized exchange with perpetual contracts.
Installation
pip install luxfi-dex
Quick Start
from luxfi_dex import LXClient
# Initialize client
client = LXClient(
json_rpc_url="http://localhost:8080",
websocket_url="ws://localhost:8081"
)
# Place an order
order = client.place_order(
symbol="BTC-USD-PERP",
side="buy",
order_type="limit",
price=50000,
size=0.1,
leverage=10
)
# Get funding rate
funding = client.get_funding_rate("BTC-USD-PERP")
print(f"Current funding rate: {funding['rate']}")
print(f"Next funding time: {funding['nextFundingTime']}")
# Subscribe to real-time data
def on_orderbook(data):
print(f"Orderbook update: {data}")
client.subscribe("orderbook:BTC-USD-PERP", on_orderbook)
Features
- Full perpetual contract support
- 8-hour funding mechanism (00:00, 08:00, 16:00 UTC)
- All order types (limit, market, stop, iceberg, etc.)
- Real-time WebSocket subscriptions
- Cross and isolated margin modes
API Documentation
See API Documentation for complete reference.
License
MIT
Metadata
Release files for lux-dex 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lux_dex-1.2.1.tar.gz | 9.1 kB | Without provenance | Details for lux_dex-1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lux_dex-1.2.1-py3-none-any.whl | Python 3 | none | any | Details for lux_dex-1.2.1-py3-none-any.whl |
Total release size: 18.6 kB
Release files / lux_dex-1.2.1.tar.gz
| Download URL | lux_dex-1.2.1.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2379c36ea7903ebdb52fbcebedcda8b009eb8c65a3abec649281f59e910a58be
|
|
BLAKE2b-256 checksum How to use checksums |
80c8a76b01b683c784ac47df91a9135d485a1ce53151495cd89a41effc0910d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / lux_dex-1.2.1-py3-none-any.whl
| Download URL | lux_dex-1.2.1-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d272c594b99eb694c1533f2bc49b80d1a3e4f8cfc55912acab2095c8480c1461
|
|
BLAKE2b-256 checksum How to use checksums |
ffafd4dd9fbea6a569cea220f06a559b353d7e46b00132ad33d01d38e426fb87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for lux-dex 1.2.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.