Metadata-Version: 2.4
Name: lux-dex
Version: 1.2.1
Summary: Python SDK for LX
Home-page: https://github.com/luxfi/dex
Author: Lux Network
Author-email: dev@lux.network
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28.0
Requires-Dist: websocket-client>=1.4.0
Requires-Dist: grpcio>=1.50.0
Requires-Dist: grpcio-tools>=1.50.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.20.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# LX Python SDK

Official Python SDK for the LX - High-performance decentralized exchange with perpetual contracts.

## Installation

```bash
pip install luxfi-dex
```

## Quick Start

```python
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](../../API_DOCUMENTATION.md) for complete reference.

## License

MIT
