Introduction
Unified TypeScript SDK for DFlow on Solana - prediction markets and trading.
DFlow SDK
dflow-sdk is a unified TypeScript SDK for building trading applications on DFlow, the intelligent trade execution layer for Solana.
DFlow powers institution-grade trading experiences across spot and prediction markets natively on Solana with smart order routing, best-price execution, and near-complete token coverage.
Features
- Prediction Markets API — Events, Markets, Orderbook, Trades, Live Data, Series, Tags, Sports, Search
- Trade API — Orders, Swaps, Intents, Market Initialization, Tokens, Venues
- Real-time WebSocket — Subscribe to price updates, trades, and orderbook changes
- Solana Helpers — Transaction signing, position tracking, redemption utilities
Quick Installation
Quick Example
Explore the SDK
Getting Started
Install the SDK and make your first API call
Client Configuration
Configure the DFlowClient with API keys and custom endpoints
Prediction Markets
Work with events, markets, orderbooks, and trades
Trading
Execute swaps and manage orders
Who Uses DFlow?
- Trading Applications & Wallets — Offer "trade any token" with smart order routing
- Exchanges & Aggregators — Access deep liquidity across every major DEX
- Financial Institutions — Programmable execution with CLPs and async trades
- Prediction Market Platforms — Discovery, pricing, routing, and settlement infrastructure