# ericpedra/quotexapi architecture

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

- Interactive diagram: https://gitdiagram.com/ericpedra/quotexapi
- Repository: https://github.com/ericpedra/quotexapi

## Overview

quotexapi is a Python wrapper for Quotex trading accounts, exposing connection, account selection, binary-option trading, results, and candle-stream operations through the documented `Quotex` interface. The main workflow is to provide an SSID, connect, select an account balance, place a trade, and check its result. The lower-level API owns the WebSocket connection and shared connection state. Several facade methods are shown only as stubs in the sampled excerpt, so their internal behavior and links to trading or candle messages cannot be verified.

Main entry points: [`quotexapi/api.py`](https://github.com/ericpedra/quotexapi/blob/main/quotexapi/api.py) (Quotex API), [`quotexapi/ws/client.py`](https://github.com/ericpedra/quotexapi/blob/main/quotexapi/ws/client.py) (WebSocket client), [`quotexapi/stable_api.py`](https://github.com/ericpedra/quotexapi/blob/main/quotexapi/stable_api.py) (Quotex facade), [`quotexapi/global_value.py`](https://github.com/ericpedra/quotexapi/blob/main/quotexapi/global_value.py) (Connection state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_facade["User API"]
  node_facade["Quotex facade<br/>[stable_api.py]"]
  node_account["Account operations<br/>[stable_api.py]"]
  node_trading["Option trading<br/>[stable_api.py]"]
  node_candles["Candle streams<br/>[stable_api.py]"]
end

subgraph group_transport["WebSocket Transport"]
  node_api["Quotex API<br/>[api.py]"]
  node_wsclient["WebSocket client<br/>[client.py]"]
  node_channel["Channel base<br/>[base.py]"]
end

subgraph group_support["Shared Support"]
  node_state["Connection state<br/>[global_value.py]"]
  node_assets["Asset identifiers<br/>[constants.py]"]
end

node_user(("Trading client"))
node_service(("Quotex service"))

node_user -->|"uses"| node_facade
node_facade -->|"creates and connects"| node_api
node_user -->|"selects balance"| node_account
node_user -->|"places and checks"| node_trading
node_user -.->|"requests streams"| node_candles
node_api -->|"starts"| node_wsclient
node_wsclient -->|"updates buy id"| node_api
node_api -->|"connects by WebSocket"| node_service
node_service -->|"delivers messages"| node_wsclient
node_wsclient -->|"updates status"| node_state
node_api -->|"reads and writes"| node_state
node_channel -->|"sends requests"| node_api
node_trading -.->|"uses identifiers"| node_assets

click node_facade "https://github.com/ericpedra/quotexapi/blob/main/quotexapi/stable_api.py"
click node_account "https://github.com/ericpedra/quotexapi/blob/main/quotexapi/stable_api.py"
click node_trading "https://github.com/ericpedra/quotexapi/blob/main/quotexapi/stable_api.py"
click node_candles "https://github.com/ericpedra/quotexapi/blob/main/quotexapi/stable_api.py"
click node_api "https://github.com/ericpedra/quotexapi/blob/main/quotexapi/api.py"
click node_wsclient "https://github.com/ericpedra/quotexapi/blob/main/quotexapi/ws/client.py"
click node_channel "https://github.com/ericpedra/quotexapi/blob/main/quotexapi/ws/chanels/base.py"
click node_state "https://github.com/ericpedra/quotexapi/blob/main/quotexapi/global_value.py"
click node_assets "https://github.com/ericpedra/quotexapi/blob/main/quotexapi/constants.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_facade,node_account,node_trading,node_candles,node_user toneBlue
class node_api,node_wsclient,node_channel toneAmber
class node_state,node_assets toneMint
class node_service toneIndigo
```

## Components

### User API

- [Quotex facade](https://github.com/ericpedra/quotexapi/blob/main/quotexapi/stable_api.py): `quotexapi/stable_api.py`
- [Account operations](https://github.com/ericpedra/quotexapi/blob/main/quotexapi/stable_api.py): `quotexapi/stable_api.py`
- [Option trading](https://github.com/ericpedra/quotexapi/blob/main/quotexapi/stable_api.py): `quotexapi/stable_api.py`
- [Candle streams](https://github.com/ericpedra/quotexapi/blob/main/quotexapi/stable_api.py): `quotexapi/stable_api.py`

### WebSocket Transport

- [Quotex API](https://github.com/ericpedra/quotexapi/blob/main/quotexapi/api.py): `quotexapi/api.py`
- [WebSocket client](https://github.com/ericpedra/quotexapi/blob/main/quotexapi/ws/client.py): `quotexapi/ws/client.py`
- [Channel base](https://github.com/ericpedra/quotexapi/blob/main/quotexapi/ws/chanels/base.py): `quotexapi/ws/chanels/base.py`

### Shared Support

- [Connection state](https://github.com/ericpedra/quotexapi/blob/main/quotexapi/global_value.py): `quotexapi/global_value.py`
- [Asset identifiers](https://github.com/ericpedra/quotexapi/blob/main/quotexapi/constants.py): `quotexapi/constants.py`

### Other components

- **Trading client**
- **Quotex service**

## Connections

- Trading client → Quotex facade: uses (evidence: `README.md`)
- Quotex facade → Quotex API: creates and connects (evidence: `quotexapi/stable_api.py`)
- Trading client → Account operations: selects balance (evidence: `README.md`)
- Trading client → Option trading: places and checks (evidence: `README.md`)
- Trading client → Candle streams: requests streams
- Quotex API → WebSocket client: starts (evidence: `quotexapi/api.py`)
- WebSocket client → Quotex API: updates buy id (evidence: `quotexapi/ws/client.py`)
- Quotex API → Quotex service: connects by WebSocket (evidence: `quotexapi/api.py`)
- Quotex service → WebSocket client: delivers messages
- WebSocket client → Connection state: updates status (evidence: `quotexapi/ws/client.py`)
- Quotex API → Connection state: reads and writes (evidence: `quotexapi/api.py`)
- Channel base → Quotex API: sends requests (evidence: `quotexapi/ws/chanels/base.py`)
- Option trading → Asset identifiers: uses identifiers
