# chipadevteam/quotexapi architecture

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

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

## Overview

QuotexAPI is an async Python client for Quotex trading. The main workflow is client connection and authentication, followed by account and instrument queries, trade placement, and trade-result tracking. The client coordinates domain services; those services use a shared Socket.IO connection, which routes messages over the polling transport. The README documents additional market-data and trading capabilities, but some service implementations were not sampled, so uncertain internal links are omitted. Trade-history tracking includes placeholder behavior in the sampled data service.

Main entry points: [`QuotexAPI/client.py`](https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/client.py) (Quotex Client), [`QuotexAPI/services/connection.py`](https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/services/connection.py) (Socket.IO Connection), [`QuotexAPI/services/auth.py`](https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/services/auth.py) (Authentication), [`QuotexAPI/services/account.py`](https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/services/account.py) (Account Balances)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Client API"]
  node_client["Quotex Client<br/>[client.py]"]
end

subgraph group_transport["Connection Transport"]
  node_connection["Socket.IO Connection<br/>[connection.py]"]
  node_polling["Polling Transport<br/>[curl_websocket.py]"]
end

subgraph group_domains["Trading Domains"]
  node_auth["Authentication<br/>[auth.py]"]
  node_account["Account Balances<br/>[account.py]"]
  node_instrument["Instruments<br/>[instrument.py]"]
  node_trading["Trade Operations<br/>[trading.py]"]
  node_data["Trade and Live Data<br/>[data.py]"]
end

subgraph group_types["Configuration Types"]
  node_config["Configuration<br/>[config.py]"]
  node_protocol["Protocol Messages<br/>[ws_protocol.py]"]
  node_models["Domain Models<br/>[models.py]"]
end

node_developer(("API User"))
node_quotex["Quotex Platform"]

node_developer -->|"uses"| node_client
node_client -->|"initializes"| node_connection
node_client -->|"initializes"| node_auth
node_client -->|"initializes"| node_account
node_client -->|"initializes"| node_instrument
node_client -->|"initializes"| node_trading
node_client -->|"initializes"| node_data
node_client -->|"delegates login"| node_auth
node_client -->|"delegates balances"| node_account
node_client -->|"delegates assets"| node_instrument
node_client -->|"delegates orders"| node_trading
node_client -->|"delegates tracking"| node_data
node_auth -->|"sends requests"| node_connection
node_account -->|"sends requests"| node_connection
node_trading -->|"sends events"| node_connection
node_data -->|"sends events"| node_connection
node_connection -->|"uses transport"| node_polling
node_connection -->|"exchanges messages"| node_quotex
node_polling -->|"polls and posts"| node_quotex
node_client -->|"loads"| node_config
node_connection -->|"routes messages"| node_protocol

click node_client "https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/client.py"
click node_auth "https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/services/auth.py"
click node_account "https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/services/account.py"
click node_instrument "https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/services/instrument.py"
click node_trading "https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/services/trading.py"
click node_data "https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/services/data.py"
click node_connection "https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/services/connection.py"
click node_polling "https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/utils/curl_websocket.py"
click node_config "https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/config.py"
click node_protocol "https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/ws_protocol.py"
click node_models "https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/models.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_client,node_developer toneBlue
class node_connection,node_polling toneAmber
class node_auth,node_account,node_instrument,node_trading,node_data toneMint
class node_config,node_protocol,node_models toneRose
class node_quotex toneIndigo
```

## Components

### Client API

- [Quotex Client](https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/client.py): `QuotexAPI/client.py`

### Connection Transport

- [Socket.IO Connection](https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/services/connection.py): `QuotexAPI/services/connection.py`
- [Polling Transport](https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/utils/curl_websocket.py): `QuotexAPI/utils/curl_websocket.py`

### Trading Domains

- [Authentication](https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/services/auth.py): `QuotexAPI/services/auth.py`
- [Account Balances](https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/services/account.py): `QuotexAPI/services/account.py`
- [Instruments](https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/services/instrument.py): `QuotexAPI/services/instrument.py`
- [Trade Operations](https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/services/trading.py): `QuotexAPI/services/trading.py`
- [Trade and Live Data](https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/services/data.py): `QuotexAPI/services/data.py`

### Configuration Types

- [Configuration](https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/config.py): `QuotexAPI/config.py`
- [Protocol Messages](https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/ws_protocol.py): `QuotexAPI/ws_protocol.py`
- [Domain Models](https://github.com/chipadevteam/quotexapi/blob/main/QuotexAPI/models.py): `QuotexAPI/models.py`

### Other components

- **API User**
- **Quotex Platform**

## Connections

- API User → Quotex Client: uses
- Quotex Client → Socket.IO Connection: initializes
- Quotex Client → Authentication: initializes
- Quotex Client → Account Balances: initializes
- Quotex Client → Instruments: initializes
- Quotex Client → Trade Operations: initializes
- Quotex Client → Trade and Live Data: initializes
- Quotex Client → Authentication: delegates login
- Quotex Client → Account Balances: delegates balances
- Quotex Client → Instruments: delegates assets
- Quotex Client → Trade Operations: delegates orders
- Quotex Client → Trade and Live Data: delegates tracking
- Authentication → Socket.IO Connection: sends requests
- Account Balances → Socket.IO Connection: sends requests
- Trade Operations → Socket.IO Connection: sends events
- Trade and Live Data → Socket.IO Connection: sends events
- Socket.IO Connection → Polling Transport: uses transport
- Socket.IO Connection → Quotex Platform: exchanges messages
- Polling Transport → Quotex Platform: polls and posts
- Quotex Client → Configuration: loads
- Socket.IO Connection → Protocol Messages: routes messages
