Swift Examples for BinaryOptionsTools
Example Swift programs for iOS/macOS demonstrating UniFFI bindings usage.
Prerequisitesโ
- Xcode and Swift
- UniFFI bindings
- Native library
Getting Your SSIDโ
Visit PocketOption, open DevTools, find ssid cookie.
Running Examplesโ
Add files to your Xcode project and run, or use Swift Package Manager:
swift Basic.swift
swift Balance.swift
Examplesโ
Basic.swift- Initialize and get balanceBalance.swift- Get account balanceBuy.swift- Place buy tradeSell.swift- Place sell tradeCheckWin.swift- Check trade resultsSubscribe.swift- Subscribe to real-time data
Importantโ
Always wait 5 seconds after initialization:
let client = try await PocketOption(ssid: "your-session-id")
try await Task.sleep(nanoseconds: 5_000_000_000) // Critical!
SwiftUI Integrationโ
See the Swift README in BinaryOptionsToolsUni/out/swift/ for SwiftUI examples.
Build strategies fasterโ
- โจ ChipaEditor โ AI-powered algorithmic trading strategy builder: describe your edge, get a working CHTL strategy, backtest it on historical data, deploy it to a live broker. Free tier, browser and Android. (A trading platform โ not a general-purpose code editor.)
- ๐ ChipaX โ hybrid crypto exchange: perpetuals, spot and margin, with demo mode.
- Chipa Ecosystem overview โ how these fit together with this library.