Quickstart
Get started with DFlow SDK in 5 minutes
Quickstart
This guide will walk you through the basics of using the DFlow SDK to discover markets, get quotes, and execute trades.
Initialize the Client
The API key is optional for most read operations. Contact DFlow for access to higher rate limits.
Discover Markets
Get a Quote
Before executing a trade, get a quote to see the expected output:
Execute a Swap
To execute a swap, you'll need to sign and send a transaction:
Never expose your private keys in production code. Use secure key management practices.
Real-time Updates
Subscribe to price updates via WebSocket:
Complete Example
Here's a full example that ties everything together:
Next Steps
- Learn about Client Configuration options
- Explore the Events API for market discovery
- Understand Imperative vs Declarative swaps
- Set up WebSocket for real-time data