Python SDK for LX
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lux_dex-1.2.1.tar.gz
(9.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lux_dex-1.2.1.tar.gz.
File metadata
- Download URL: lux_dex-1.2.1.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2379c36ea7903ebdb52fbcebedcda8b009eb8c65a3abec649281f59e910a58be
|
|
| MD5 |
c67664078cf9d8c8609c7b24d7624aa7
|
|
| BLAKE2b-256 |
80c8a76b01b683c784ac47df91a9135d485a1ce53151495cd89a41effc0910d6
|
File details
Details for the file lux_dex-1.2.1-py3-none-any.whl.
File metadata
- Download URL: lux_dex-1.2.1-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d272c594b99eb694c1533f2bc49b80d1a3e4f8cfc55912acab2095c8480c1461
|
|
| MD5 |
03ef49420f57e783e076a33dae2d2430
|
|
| BLAKE2b-256 |
ffafd4dd9fbea6a569cea220f06a559b353d7e46b00132ad33d01d38e426fb87
|