Deriv API Rust Client
An unofficial Rust library for the Deriv API
This crate provides a strongly-typed client for the Deriv API, with automatically generated types from the official API schema. It supports both synchronous and asynchronous WebSocket connections, allowing you to interact with your Deriv account programmatically.
Features
- 🔄 Automatic code generation from official API schema
- 🔐 Type-safe API requests and responses
- 📈 Real-time market data streaming
- 🚀 Async/await support
- 🛡️ Comprehensive error handling
Installation
Add this to your Cargo.toml
:
[]
= "0.1.0"
Quick Start
Subscribing to Tick Stream
use ;
use *;
async
Buying a Contract
use ;
use *;
async
API Coverage
The client supports all endpoints from the official Deriv API, including but not limited to:
- Market data streaming (ticks, candles)
- Contract purchasing and management
- Account management
- Portfolio operations
- Payment operations
Development
Building
Running Tests
Generating Schema Types
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Credits & Acknowledgments
This project draws inspiration from and acknowledges the following projects:
- deriv-api-go - Unofficial Go implementation of Deriv API
- flutter-deriv-api - Official Flutter implementation by Deriv.com
License
This project is licensed under the MIT License - see the LICENSE file for details.
Disclaimer
This is an unofficial library and is not affiliated with Deriv.com.