Ethereal Python SDK¶
A Python SDK for interacting with the Ethereal DEX.
Overview¶
The Ethereal Python SDK provides a simple interface for trading, accessing market data, and managing accounts on the Ethereal DEX. This SDK supports both REST API and WebSocket connections.
Installation¶
We recommend using uv to manage your environment:
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install the SDK
uv add ethereal-sdk
Alternatively, you can use pip:
pip install ethereal-sdk
Quick Start¶
from ethereal import RESTClient
# Initialize client
client = RESTClient({
"base_url": "https://api.etherealtest.net",
"chain_config": {
"rpc_url": "https://rpc.etherealtest.net",
"private_key": "your_private_key", # optional
}
})
# Get market data
products = client.list_products()
tokens = client.list_tokens()
See the quickstart guide for more examples.
Key Features¶
- Market Data: Access products, prices, and order book information
- Trading: Place and manage orders
- Account Management: Manage subaccounts and positions
- Real-time Updates: Websocket support for live order book and fill updates