Python SDK
Official Python SDK for DFlow on Solana - prediction markets and trading
DFlow Python SDK
The official Python SDK for interacting with DFlow on Solana. Build prediction market applications, trading bots, and DeFi integrations with a clean, type-safe Python interface.
Features
- Market Discovery - Browse events, markets, series, and orderbooks
- Trading - Execute swaps, intents, and orders with smart routing
- Real-time Data - WebSocket subscriptions for prices, trades, and orderbook updates
- Solana Integration - Transaction signing, position tracking, and balance queries
- Type Safety - Full type hints with Pydantic models
- Async Support - Both sync and async APIs available
Quick Start
Installation
Or with uv: