# chipadevteam/binaryoptionstoolsv1 architecture

> Architecture diagram of the GitHub repository chipadevteam/binaryoptionstoolsv1, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chipadevteam/binaryoptionstoolsv1
- Repository: https://github.com/chipadevteam/binaryoptionstoolsv1

## Overview

BinaryOptionsTools is a Pocket Option trading and market-analysis toolkit, provided in synchronous and asynchronous Python variants. Users connect with an SSID, then retrieve balances and candle data, analyze markets, place call/put trades, and check results. The main runtime route is the stable API through the platform API and WebSocket client to Pocket Option; received market/account updates feed API state for higher-level operations. The README also describes strategy tooling and automated trading; bot and research modules are present, but their detailed behavior is not established by the sampled excerpts. The graph maps shared capabilities in both variants and omits speculative internal dispatch links.

Main entry points: [`BinaryOptionsTools/platforms/pocketoption/api.py`](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/platforms/pocketoption/api.py) (Platform API), [`BinaryOptionsTools/platforms/pocketoption/stable_api.py`](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/platforms/pocketoption/stable_api.py) (Stable API), [`BinaryOptionsToolsAsync/platforms/pocketoption/stable_api.py`](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/platforms/pocketoption/stable_api.py) (Async stable API), [`BinaryOptionsToolsAsync/platforms/pocketoption/api.py`](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/platforms/pocketoption/api.py) (Async platform API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Client APIs"]
  node_syncwrap["Sync wrapper<br/>[__init__.py]"]
end

subgraph group_platform["PocketOption Runtime"]
  node_stable["Stable API<br/>[stable_api.py]"]
  node_api["Platform API<br/>[api.py]"]
  node_state["Runtime state<br/>[global_value.py]"]
  node_aggregator["OHLC aggregation<br/>[ohlc_aggregator.py]"]
end

subgraph group_protocol["WebSocket Protocol"]
  node_wsclient["WebSocket client<br/>[client.py]"]
  node_channels["Request channels"]
  node_channelbase["Channel base<br/>[base.py]"]
  node_wsobjects["Message objects"]
end

subgraph group_analysis["Analysis and Strategies"]
  node_indicators["Technical analysis"]
  node_momentum["Momentum indicators<br/>[momentum.py]"]
  node_trend["Trend indicators<br/>[trend.py]"]
  node_bot["Trading bot base<br/>[base.py]"]
  node_signals["Bot signals"]
  node_research["Strategy research<br/>[smalowatr.py]"]
end

subgraph group_async["Async Variant"]
  node_asyncclient["Async client<br/>[pocketoption.py]"]
  node_asyncstable["Async stable API<br/>[stable_api.py]"]
  node_asyncapi["Async platform API<br/>[api.py]"]
  node_asyncws["Async WebSocket<br/>[client.py]"]
  node_asyncstate["Async runtime state<br/>[global_value.py]"]
  node_asyncagg["Async OHLC<br/>[ohlc_aggregator.py]"]
  node_asyncind["Async analysis"]
  node_asyncbot["Async bot base<br/>[base.py]"]
  node_asyncresearch["Async research<br/>[smalowatr.py]"]
end

node_user(("Trading client"))
node_pocket["Pocket Option"]

node_user -->|"uses"| node_syncwrap
node_syncwrap -->|"delegates to"| node_stable
node_stable -->|"calls"| node_api
node_api -->|"uses"| node_wsclient
node_api -->|"dispatches requests"| node_channels
node_channels -->|"inherits"| node_channelbase
node_wsclient -->|"updates"| node_state
node_api -->|"uses"| node_state
node_api -->|"uses"| node_wsobjects
node_stable -->|"uses"| node_aggregator
node_stable -->|"imports"| node_indicators
node_user -->|"uses"| node_asyncclient
node_asyncclient -->|"wraps"| node_asyncstable
node_asyncstable -->|"calls"| node_asyncapi
node_asyncapi -->|"uses"| node_asyncws
node_asyncapi -->|"uses"| node_asyncstate
node_asyncstable -->|"uses"| node_asyncagg
node_asyncstable -->|"imports"| node_asyncind
node_user -.->|"analyzes markets"| node_indicators
node_user -.->|"automates trades"| node_bot

click node_syncwrap "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/__init__.py"
click node_stable "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/platforms/pocketoption/stable_api.py"
click node_api "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/platforms/pocketoption/api.py"
click node_wsclient "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/platforms/pocketoption/ws/client.py"
click node_channels "https://github.com/chipadevteam/binaryoptionstoolsv1/tree/main/BinaryOptionsTools/platforms/pocketoption/ws/channels"
click node_channelbase "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/platforms/pocketoption/ws/channels/base.py"
click node_wsobjects "https://github.com/chipadevteam/binaryoptionstoolsv1/tree/main/BinaryOptionsTools/platforms/pocketoption/ws/objects"
click node_state "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/platforms/pocketoption/global_value.py"
click node_aggregator "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/platforms/pocketoption/ohlc_aggregator.py"
click node_indicators "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/indicators/technical_analysis.py"
click node_momentum "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/indicators/momentum.py"
click node_trend "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/indicators/trend.py"
click node_bot "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/bot/base.py"
click node_signals "https://github.com/chipadevteam/binaryoptionstoolsv1/tree/main/BinaryOptionsTools/bot/signals"
click node_research "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/research/smalowatr.py"
click node_asyncclient "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/pocketoption.py"
click node_asyncstable "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/platforms/pocketoption/stable_api.py"
click node_asyncapi "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/platforms/pocketoption/api.py"
click node_asyncws "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/platforms/pocketoption/ws/client.py"
click node_asyncstate "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/platforms/pocketoption/global_value.py"
click node_asyncagg "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/platforms/pocketoption/ohlc_aggregator.py"
click node_asyncind "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/indicators/technical_analysis.py"
click node_asyncbot "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/bot/base.py"
click node_asyncresearch "https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/research/smalowatr.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_syncwrap,node_user toneBlue
class node_stable,node_api,node_state,node_aggregator toneAmber
class node_wsclient,node_channels,node_channelbase,node_wsobjects toneMint
class node_indicators,node_momentum,node_trend,node_bot,node_signals,node_research toneRose
class node_asyncclient,node_asyncstable,node_asyncapi,node_asyncws,node_asyncstate,node_asyncagg,node_asyncind,node_asyncbot,node_asyncresearch,node_pocket toneIndigo
```

## Components

### Client APIs

- [Sync wrapper](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/__init__.py): `BinaryOptionsTools/__init__.py`

### PocketOption Runtime

- [Stable API](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/platforms/pocketoption/stable_api.py): `BinaryOptionsTools/platforms/pocketoption/stable_api.py`
- [Platform API](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/platforms/pocketoption/api.py): `BinaryOptionsTools/platforms/pocketoption/api.py`
- [Runtime state](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/platforms/pocketoption/global_value.py): `BinaryOptionsTools/platforms/pocketoption/global_value.py`
- [OHLC aggregation](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/platforms/pocketoption/ohlc_aggregator.py): `BinaryOptionsTools/platforms/pocketoption/ohlc_aggregator.py`

### WebSocket Protocol

- [WebSocket client](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/platforms/pocketoption/ws/client.py): `BinaryOptionsTools/platforms/pocketoption/ws/client.py`
- [Request channels](https://github.com/chipadevteam/binaryoptionstoolsv1/tree/main/BinaryOptionsTools/platforms/pocketoption/ws/channels): `BinaryOptionsTools/platforms/pocketoption/ws/channels`
- [Channel base](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/platforms/pocketoption/ws/channels/base.py): `BinaryOptionsTools/platforms/pocketoption/ws/channels/base.py`
- [Message objects](https://github.com/chipadevteam/binaryoptionstoolsv1/tree/main/BinaryOptionsTools/platforms/pocketoption/ws/objects): `BinaryOptionsTools/platforms/pocketoption/ws/objects`

### Analysis and Strategies

- [Technical analysis](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/indicators/technical_analysis.py): `BinaryOptionsTools/indicators/technical_analysis.py`
- [Momentum indicators](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/indicators/momentum.py): `BinaryOptionsTools/indicators/momentum.py`
- [Trend indicators](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/indicators/trend.py): `BinaryOptionsTools/indicators/trend.py`
- [Trading bot base](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/bot/base.py): `BinaryOptionsTools/bot/base.py`
- [Bot signals](https://github.com/chipadevteam/binaryoptionstoolsv1/tree/main/BinaryOptionsTools/bot/signals): `BinaryOptionsTools/bot/signals`
- [Strategy research](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsTools/research/smalowatr.py): `BinaryOptionsTools/research/smalowatr.py`

### Async Variant

- [Async client](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/pocketoption.py): `BinaryOptionsToolsAsync/pocketoption.py`
- [Async stable API](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/platforms/pocketoption/stable_api.py): `BinaryOptionsToolsAsync/platforms/pocketoption/stable_api.py`
- [Async platform API](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/platforms/pocketoption/api.py): `BinaryOptionsToolsAsync/platforms/pocketoption/api.py`
- [Async WebSocket](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/platforms/pocketoption/ws/client.py): `BinaryOptionsToolsAsync/platforms/pocketoption/ws/client.py`
- [Async runtime state](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/platforms/pocketoption/global_value.py): `BinaryOptionsToolsAsync/platforms/pocketoption/global_value.py`
- [Async OHLC](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/platforms/pocketoption/ohlc_aggregator.py): `BinaryOptionsToolsAsync/platforms/pocketoption/ohlc_aggregator.py`
- [Async analysis](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/indicators/technical_analysis.py): `BinaryOptionsToolsAsync/indicators/technical_analysis.py`
- [Async bot base](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/bot/base.py): `BinaryOptionsToolsAsync/bot/base.py`
- [Async research](https://github.com/chipadevteam/binaryoptionstoolsv1/blob/main/BinaryOptionsToolsAsync/research/smalowatr.py): `BinaryOptionsToolsAsync/research/smalowatr.py`

### Other components

- **Trading client**
- **Pocket Option**

## Connections

- Trading client → Sync wrapper: uses (evidence: `BinaryOptionsTools/__init__.py`)
- Sync wrapper → Stable API: delegates to (evidence: `BinaryOptionsTools/__init__.py`)
- Stable API → Platform API: calls (evidence: `BinaryOptionsTools/platforms/pocketoption/stable_api.py`)
- Platform API → WebSocket client: uses (evidence: `BinaryOptionsTools/platforms/pocketoption/api.py`)
- Platform API → Request channels: dispatches requests (evidence: `BinaryOptionsTools/platforms/pocketoption/api.py`)
- Request channels → Channel base: inherits (evidence: `BinaryOptionsTools/platforms/pocketoption/ws/channels/buyv3.py`)
- WebSocket client → Runtime state: updates (evidence: `BinaryOptionsTools/platforms/pocketoption/ws/client.py`)
- Platform API → Runtime state: uses (evidence: `BinaryOptionsTools/platforms/pocketoption/api.py`)
- Platform API → Message objects: uses (evidence: `BinaryOptionsTools/platforms/pocketoption/api.py`)
- Stable API → OHLC aggregation: uses (evidence: `BinaryOptionsTools/platforms/pocketoption/stable_api.py`)
- Stable API → Technical analysis: imports (evidence: `BinaryOptionsTools/platforms/pocketoption/stable_api.py`)
- Trading client → Async client: uses (evidence: `README.md`)
- Async client → Async stable API: wraps (evidence: `BinaryOptionsToolsAsync/pocketoption.py`)
- Async stable API → Async platform API: calls (evidence: `BinaryOptionsToolsAsync/platforms/pocketoption/stable_api.py`)
- Async platform API → Async WebSocket: uses (evidence: `BinaryOptionsToolsAsync/platforms/pocketoption/api.py`)
- Async platform API → Async runtime state: uses (evidence: `BinaryOptionsToolsAsync/platforms/pocketoption/api.py`)
- Async stable API → Async OHLC: uses (evidence: `BinaryOptionsToolsAsync/platforms/pocketoption/stable_api.py`)
- Async stable API → Async analysis: imports (evidence: `BinaryOptionsToolsAsync/platforms/pocketoption/stable_api.py`)
- Trading client → Technical analysis: analyzes markets (evidence: `README.md`)
- Trading client → Trading bot base: automates trades (evidence: `README.md`)
