This repo is a minimal, working example to connect to Paradex Prod WebSocket price feeds using the official Paradex Python SDK (paradex-py), authenticated via a Trading Key (Subkey).
Goal: get from zero → streaming WS (perp-ticker) data in ~30–45 minutes, without digging through a large SDK repo structure.
Official SDK (reference / full functionality):
Related official docs:
- https://docs.paradex.trade/docs/trading/api-authentication#subkeys
- https://docs.paradex.trade/ws/general-information
DM me on X:
- Authenticates to Paradex Prod WS using your L2 Address + Trading Key (Subkey)
- Subscribes to:
markets_summary(ALL markets): mark + funding (often)bbo(per market): best bid/ask
- Prints a clean periodic terminal snapshot
This is intended to be foundational plumbing you can build on:
- scanners
- execution
- REST calls
- risk dashboards
- hedging logic
Python 3.11 is the baseline that is known to work here.
Newer Python versions might work, but are not guaranteed (dependency + async/websocket stacks can break on bleeding edge).
If you want “it just works,” use 3.11 (this repo’s Docker image uses Python 3.11).
Paradex has different “keys”. For this setup you want a Trading Key / Subkey from the Paradex app.
- Go to: https://app.paradex.trade
- Connect your wallet
- Navigate to:
- Settings
- Key Management
- You’ll typically see:
- Read-only keys
- Trading keys
- Under Trading Keys, create / add a new key.
Important notes:
- This “Trading Key” may also be labeled as a “private key” in some UIs/exports.
- In practice, this is the safer key to use for automation than exposing a more sensitive primary key.
- Treat it like a secret anyway: do not paste it into videos, do not commit it, do not share it.
You’ll need:
L2_ADDRESS(your Paradex L2 address)L2_SUBKEY(the trading key/subkey you generated)
This is the easiest path if you want a consistent environment and fewer OS issues.
Recommended:
- Docker Desktop (must be installed and running)
- VS Code
- VS Code extension: Dev Containers
Optional:
- Git (or download the repo ZIP manually)
- File → Open Folder…
- Select the repo folder (the one containing
Dockerfile+scan_ws.py)
- Press
Shift+Ctrl+P(Command Palette) - Run:
Dev Containers: Reopen in Container
If you changed requirements.txt or the Dockerfile:
Shift+Ctrl+P→Dev Containers: Rebuild Container
You should see BOTH:
- Bottom-left VS Code status bar shows something like: Dev Container: ...
- Terminal prompt typically looks like:
root@<container_id>:/workspaces/<repo>#
If you do not see those, you are not inside the container yet.
python --version
python -c "import importlib.metadata as m; print('termcolor', m.version('termcolor'))"
python -c "import importlib.metadata as m; print('paradex-py', m.version('paradex-py'))"Create .env in the repo root (same directory as scan_ws.py):
L2_ADDRESS=0x...
L2_SUBKEY=0x...
ENV=PROD
PARADEX_CHAIN_ID=PRIVATE_SN_PARACLEAR_MAINNETpython scan_ws.pyUse this if you prefer the terminal instead of VS Code Dev Containers.
docker build -t paradex-ws-quickstart .This mounts your repo into the container so it can read .env and run scan_ws.py from the repo root:
docker run --rm -it \
-v "$PWD:/repo" \
-w /repo \
paradex-ws-quickstart bashpython --version
python -c "import importlib.metadata as m; print('termcolor', m.version('termcolor'))"
python -c "import importlib.metadata as m; print('paradex-py', m.version('paradex-py'))"python scan_ws.py