A powerful, multi-language library for automated binary options trading. Built with Rust for performance and safety, with bindings for Python, JavaScript, C#, Go, Kotlin, Ruby, and Swift.
Currently we support PocketOption (quick trading) with the following features (for real and demo accounts):
- β Trading Operations: Place buy/sell trades for any asset
- β Trade Management: Check trade results with optional timeout
- β Account Information: Get account balance and server time synchronization
- β Asset Data: Get payout information for each asset
- β Real-time Data: Subscribe to assets for real-time price data with different subscription types
- β Trade Monitoring: Get list of opened trades with all trade data
- β Asset Validation: Validate assets and retrieve detailed information
- β Connection Management: Automatic reconnection and connection status monitoring
- β³ Historical candle data retrieval
- β³ Closed trades management and history
- β³ Pending trades support
- β³ Additional trading platforms (Expert Options, etc.)
If you are looking to build a bot, let us build it for you! Check Chipa's shop
Support us and our contributors:
- Join PocketOption with Chipa's affiliate link
- Join PocketOption with Six's affiliate link
- Donate at PayPal
- Join us on Patreon
- Join our Discord community
Don't know programming and you are looking for a bot to automate YOUR strategy? Get our development services!
Currently we only support Pocket Option (quick trading) with the following features (for real and demo):
- Place trades for any asset (buy/sell)
- Check trade results with optional timeout
- Get account balance
- Get server time synchronization
- Get the payout of each asset
- Get a list with the opened trades with all of the trades data
- Subscribe to an asset to get realtime data with different subscription types
- Asset validation and information retrieval
- Automatic reconnection and connection management
- Get a list with the closed trades with all of the trades data
- Get candle data for a specific asset (historical data)
- Add support for pending trades
- Add support for other trading platforms like Expert Options
We provide bindings for multiple programming languages:
- Python - Full sync and async support (Python 3.8+)
- Rust - Native async implementation
- JavaScript/Node.js - Async support via UniFFI bindings
- C# - .NET support via UniFFI bindings
- Go - Go support via UniFFI bindings
- Kotlin - JVM support via UniFFI bindings
- Ruby - Ruby support via UniFFI bindings
- Swift - iOS/macOS support via UniFFI bindings
Installation:
# Windows
pip install "https://github.com/ChipaDevTeam/BinaryOptionsTools-v2/blob/master/wheels/BinaryOptionsToolsV2-0.1.8-cp38-abi3-win_amd64.whl?raw=true"
# Linux
pip install "https://github.com/ChipaDevTeam/BinaryOptionsTools-v2/blob/master/wheels/BinaryOptionsToolsV2-0.2.0-cp38-abi3-manylinux_2_34_x86_64.whl?raw=true"Quick Example (Synchronous):
from BinaryOptionsToolsV2.pocketoption import PocketOption
import time
# Initialize client
client = PocketOption(ssid="your-session-id")
time.sleep(5) # Wait for connection to establish
# Get balance
balance = client.balance()
print(f"Account Balance: ${balance}")
# Place a buy trade
trade_id, deal = client.buy("EURUSD_otc", 60, 1.0)
print(f"Trade placed: {deal}")
# Check result
result = client.check_win(trade_id)
print(f"Trade result: {result}")Quick Example (Asynchronous):
from BinaryOptionsToolsV2.pocketoption import PocketOptionAsync
import asyncio
async def main():
# Initialize client
client = PocketOptionAsync(ssid="your-session-id")
await asyncio.sleep(5) # Wait for connection to establish
# Get balance
balance = await client.balance()
print(f"Account Balance: ${balance}")
# Place a buy trade
trade_id, deal = await client.buy("EURUSD_otc", 60, 1.0)
print(f"Trade placed: {deal}")
# Check result
result = await client.check_win(trade_id)
print(f"Trade result: {result}")
asyncio.run(main())Installation:
Add to your Cargo.toml:
[dependencies]
binary_options_tools = "0.1"
tokio = { version = "1", features = ["full"] }Quick Example:
use binary_options_tools::PocketOption;
use std::time::Duration;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Initialize client
let client = PocketOption::new("your-session-id").await?;
// Wait for connection to establish
tokio::time::sleep(Duration::from_secs(5)).await;
// Get balance
let balance = client.balance().await;
println!("Account Balance: ${}", balance);
// Place a buy trade
let (trade_id, deal) = client.buy("EURUSD_otc", 60, 1.0).await?;
println!("Trade placed: {:?}", deal);
// Check result
let result = client.result(trade_id).await?;
println!("Trade result: {:?}", result);
Ok(())
}- Full Documentation: https://chipadevteam.github.io/BinaryOptionsTools-v2/
- Python API: https://chipadevteam.github.io/BinaryOptionsTools-v2/python.html
- Rust API: https://docs.rs/binary_options_tools
You can find comprehensive examples for all features in the examples directory:
- Python Examples - Sync and async implementations
- JavaScript Examples - Node.js examples
- More language examples coming soon!
Prerequisites:
- Rust and Cargo installed (Install Rust)
- Python 3.8+ (for Python bindings)
- Maturin (for building Python wheels)
Build Python Wheel:
cd BinaryOptionsToolsV2
maturin build -rBuild Rust Crate:
cargo build --releaseWe welcome contributions! Please feel free to submit a Pull Request.
This project is licensed under the terms specified in the LICENSE file.
This software is for educational purposes only. Trading binary options involves substantial risk of loss and is not suitable for all investors. Use at your own risk.