| Crates.io | binary_options_tools |
| lib.rs | binary_options_tools |
| version | 0.1.9 |
| created_at | 2024-12-31 21:08:52.548939+00 |
| updated_at | 2025-11-03 15:59:08.14174+00 |
| description | High-performance Rust library for binary options trading automation. Supports PocketOption with real-time data streaming, trade execution, and WebSocket API access. Foundation for Python bindings in BinaryOptionsToolsV2. |
| homepage | https://chipadevteam.github.io/BinaryOptionsTools-v2/ |
| repository | https://github.com/ChipaDevTeam/BinaryOptionsTools-v2 |
| max_upload_size | |
| id | 1500382 |
| size | 1,765,184 |
A Rust crate providing tools to interact programmatically with various binary options trading platforms.
This crate aims to provide a unified and robust interface for developers looking to connect to and automate interactions with binary options trading platforms using Rust. Whether you're building trading bots, analysis tools, or integrating trading capabilities into larger applications, binary_options_tools strives to offer the necessary building blocks.
The core library is written in Rust for performance and safety, and it serves as the foundation for potential bindings or wrappers in other programming languages.
Add the crate to your Cargo.toml dependencies:
[dependencies]
binary_options_tools = "0.1.7"
use binary_options_tools::PocketOption;
use std::time::Duration;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Initialize client with session ID
let client = PocketOption::new("your_session_id").await?;
// Wait for connection to be established
tokio::time::sleep(Duration::from_secs(5)).await;
// Get account balance
let balance = client.balance().await;
println!("Current balance: {}", balance);
// Place a buy trade
let (trade_id, deal) = client.buy("EURUSD_otc", 60, 1.0).await?;
println!("Trade placed: {:?}", deal);
// Check trade result
let result = client.result(trade_id).await?;
println!("Trade result: {:?}", result);
// Subscribe to real-time data
let subscription = client.subscribe("EURUSD_otc", SubscriptionType::None).await?;
// Shutdown client
client.shutdown().await?;
Ok(())
}