Python SDK
Developers can use the Python SDK to build backend services and automation scripts that interact with the WheelX AI-powered aggregation platform.
https://github.com/wheelx-fi/wheelx-sdk/tree/main/python
Install
pip install wheelx-sdkWith Web3 support for transaction execution:
pip install wheelx-sdk[web3]Quick Start
from wheelx_sdk import WheelXSDK, QuoteRequest
sdk = WheelXSDK()
quote_request = QuoteRequest(
from_chain=1,
to_chain=1,
from_token="0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", # USDC
to_token="0xdAC17F958D2ee523a2206206994597C13D831ec7", # USDT
from_address="0x742d35Cc6634C0532925a3b8Dc9F6A7c5D3a7C6a",
to_address="0x742d35Cc6634C0532925a3b8Dc9F6A7c5D3a7C6a",
amount=1000000,
slippage=50
)
quote = sdk.get_quote(quote_request)
print(f"Quote received: {quote.amount_out}")
print(f"Request ID: {quote.request_id}")Transaction Execution
API Reference
WheelXSDK
Method
Description
WheelXSDK(base_url?)
Create new SDK instance
get_quote(quote_request)
Get a quote for token swap/bridge
get_order_status(request_id)
Get order status by request ID
TransactionExecutor
Method
Description
build_transaction(tx_data, address)
Build transaction dict for signing
sign_and_send_transaction(tx, private_key)
Sign and send transaction
wait_for_transaction(tx_hash, timeout=300)
Wait for confirmation
Last updated