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:
playwright>=1.44.0
websocket-client>=1.8.0
requests>=2.31.0
beautifulsoup4>=4.12.2
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
pip install -r requirements.txt
After installing PyQuotex, you need to install the necessary browsers for Playwright:
playwright install
To start using PyQuotex, first import and configure the client:
from quotexapi.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
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"
)
For Windows, it’s necessary to install the latest version of OpenSSL:
On Linux systems, update OpenSSL using the package manager:
sudo apt update
sudo apt install openssl
PyQuotex handles SSL configuration automatically, but you can customize it:
import ssl
import certifi
# SSL context configuration to use TLS 1.3
ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
ssl_context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 | ssl.OP_NO_TLSv1_2
ssl_context.minimum_version = ssl.TLSVersion.TLSv1_3
ssl_context.load_verify_locations(certifi.where())
PyQuotex uses SSL certificates for secure connections:
import os
import certifi
# Configure certificate path
cert_path = os.path.join("../", "quotex.pem")
os.environ['SSL_CERT_FILE'] = cert_path
os.environ['WEBSOCKET_CLIENT_CA_BUNDLE'] = cert_path
For more information and support, you can join the community Telegram group.