pyquotex is a Python library designed to easily integrate with the Quotex API, enabling automated trading operations. Fully open-source and licensed under MIT, the library provides features like order execution, balance checking, real-time market data collection, and more. Perfect for traders and developers looking to build efficient and customized solutions.
To use PyQuotex, you’ll need:
websockets>=12.0
httpx>=0.27.0
orjson>=3.9.0
beautifulsoup4>=4.12.3
pyfiglet>=1.0.2
fake-useragent==2.2.0
certifi
rich
numpy
You can install PyQuotex directly from GitHub using pip:
pip install git+https://github.com/cleitonleonel/pyquotex.git
You can also clone the repository and perform a local installation:
git clone https://github.com/cleitonleonel/pyquotex.git
cd pyquotex
poetry install
To start using PyQuotex, first import and configure the client:
from pyquotex.stable_api import Quotex
client = Quotex(
email="your_email@gmail.com",
password="your_password",
lang="en" # Default language: "pt" (Portuguese)
)
# Enable debug mode (optional)
client.debug_ws_enable = True
| Parameter | Type | Default | Description |
|---|---|---|---|
email |
str | None | Quotex account email |
password |
str | None | Account password |
host |
str | “qxbroker.com” | Platform host |
lang |
str | “pt” | Language (pt, en, es) |
user_agent |
str | “Quotex/1.0” | User-Agent for requests |
root_path |
str | ”.” | Root directory |
user_data_dir |
str | “browser” | Browser data directory |
asset_default |
str | “EURUSD” | Default asset |
period_default |
int | 60 | Default period in seconds |
proxies |
dict | None | Proxy configuration |
There are two main ways to handle credentials:
PyQuotex will automatically look for a config.ini file in the settings folder. If it doesn’t exist, it will create one requesting credentials:
[settings]
email=your_email@gmail.com
password=your_password
You can provide credentials directly when creating the client instance:
client = Quotex(
email="your_email@gmail.com",
password="your_password"
)
PyQuotex uses a Unified SSL Context supporting TLS 1.2 and 1.3 with full certificate verification and browser-like cipher suites for maximum security and stealth.
PyQuotex automatically configures the SSL context:
import ssl
import certifi
# SSL context configured by the library
# Unified SSL context used for both HTTP and WebSocket
unified_ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
unified_ssl_context.minimum_version = ssl.TLSVersion.TLSv1_2
unified_ssl_context.maximum_version = ssl.TLSVersion.TLSv1_3
unified_ssl_context.set_ciphers('ECDHE-ECDSA-AES128-GCM-SHA256:...') # Browser-like ciphers
unified_ssl_context.load_verify_locations(certifi.where())
Security measures applied:
check_hostname = True — hostname verification on certificatecert_reqs = ssl.CERT_REQUIRED — certificate requiredFor Windows, OpenSSL with TLS 1.3 support is required:
sudo apt update
sudo apt install openssl
For more information and support, you can join the community Telegram group.