The SSID (Session ID) is required to authenticate with the Quotex WebSocket API. Here's how to obtain it:
-
Open Quotex in your browser
- Go to https://qxbroker.com
- Log in to your account
-
Open Browser Developer Tools
- Press
F12or right-click and select "Inspect" - Go to the Application tab (Chrome) or Storage tab (Firefox)
- Press
-
Find the SSID Cookie
- In the left sidebar, expand Cookies
- Click on
https://qxbroker.com - Look for a cookie named
ssid - Copy the Value (should be a long alphanumeric string)
-
Example SSID Format
dJzhzzKSR6N4Lr5OvTFuvcGLCfyDjtdbNDMScXcH
- Open Developer Tools (F12)
- Go to Network tab
- Refresh the page or perform any action
- Look for WebSocket connections (filter by
WS) - Check the connection URL - it may include
ssid=...parameter - Copy just the SSID value
In the future, the API will support email/password login which will automatically obtain and manage the SSID for you:
from QuotexAPI import QuotexAPI
api = QuotexAPI()
await api.connect()
await api.login_with_email("your@email.com", "your_password")
# SSID will be automatically obtained and usedexport QUOTEX_SSID='your_ssid_token_here'
python examples/get_balance.pyfrom QuotexAPI import QuotexAPI
api = QuotexAPI(ssid="your_ssid_token_here")
await api.connect()import os
from QuotexAPI import QuotexAPI
ssid = os.getenv("QUOTEX_SSID")
api = QuotexAPI()
await api.connect(ssid=ssid)-
SSID Expiration: SSID tokens expire after some time (usually hours/days). You'll need to get a new one when it expires.
-
Security: Never commit your SSID to version control. Always use environment variables or secure configuration.
-
Format: The SSID should be ONLY the token value, NOT the full Socket.IO authorization message.
- ✅ Correct:
dJzhzzKSR6N4Lr5OvTFuvcGLCfyDjtdbNDMScXcH - ❌ Wrong:
42["authorization",{"session":"dJzh...","isDemo":1}]
- ✅ Correct:
-
Testing: After obtaining an SSID, test it quickly as it may expire if not used.
- SSID is missing or invalid
- SSID format is incorrect
- Solution: Get a fresh SSID from your browser
- SSID may be expired
- Quotex server might be temporarily down
- Solution: Try getting a fresh SSID or wait a few minutes
- SSID is valid but not yet authorized
- Solution: Make sure to call
login_with_ssid()after connecting
- Store SSID in environment variables
- Don't share your SSID with anyone
- Don't commit SSID to git repositories
- Rotate SSID regularly for security
- Use
.envfile for local development (add to.gitignore)
# .env file
QUOTEX_SSID=your_ssid_token_here# Load from .env
from dotenv import load_dotenv
load_dotenv()