邀请链接:
- Variational: https://omni.variational.io/?ref=OMNIQUANT(直升 Bronze,获得 12% 积分加成)
- Lighter: https://app.lighter.xyz/?referral=QUANTGUY
English version is below.
variational-v1 是一个基于 Chrome 插件转发的运行时工具,用于:
- 跟踪 Variational 订单生命周期,
- 在终端展示实时看板,
- 可选地在 Lighter 自动对冲。
交易对会从 Variational 的 REST/WS 消息中自动识别,不需要手动输入 ticker。
- 记录 Variational/Lighter 的订单关键信息(成交、价格、方向、价差)。
- Rich 终端看板实时展示双边盘口、价差百分比和最近订单。
- 可选Lighter自动对冲功能(默认开启,可用
--no-hedge关闭)。 - 支持页面重连与交易资产自动切换(切换后自动重置对应历史窗口)。
main.py:主程序variational/listener.py:本地接收与监控解析chrome_extension/:CDP 转发插件
python3 -m venv env
source env/bin/activate
pip install -r requirements.txtpy -3 -m venv env
.\env\Scripts\Activate.ps1
pip install -r requirements.txt创建 .env并填入Lighter的信息:
LIGHTER_ACCOUNT_INDEX=...
LIGHTER_API_KEY_INDEX=...
LIGHTER_PRIVATE_KEY=...如需在 Lighter WebSocket 新旧逻辑切换期间临时强制使用旧的应用层 ping/pong 逻辑,可额外设置:
LIGHTER_WS_SERVER_PINGS=true不设置时默认使用新的兼容模式:客户端依赖 WebSocket protocol ping frame 保活,同时仍兼容旧服务端发出的 ping 消息。
- 打开
chrome://extensions - 在右上角开启
Developer mode - 在左上角点击
Load unpacked,选择:variational-v1/chrome_extension
python main.py关闭自动对冲:
python main.py --no-hedgePython 脚本开始运行后,打开 Variational 的交易页面,
打开 Chrome 插件列表,点击 “Variational CDP Forwarder” -> 点击 Start
切换看板语言为英文:
python main.py --lang en默认目录:./log
runtime.log(程序运行日志)order_metrics.jsonltrade_records.csv(当前交易记录快照,dashboard 刷新时按最新状态覆盖写)
说明:终端仅用于显示 dashboard。程序不会落盘原始 REST/WS 消息,只会写运行日志、订单指标日志和交易记录 CSV 快照。
Referral Links:
- Variational: https://omni.variational.io/?ref=OMNIQUANT (instant Bronze tier + 12% points bonus)
- Lighter: https://app.lighter.xyz/?referral=QUANTGUY
variational-v1 is a Chrome-extension-assisted runtime for:
- tracking Variational order lifecycle,
- showing a terminal dashboard,
- optionally auto-hedging on Lighter.
Ticker is auto-derived from incoming Variational REST/WS messages.
- Tracks key Variational/Lighter order data (fills, prices, direction, spread).
- Rich terminal dashboard for live two-venue quotes, spread percentages, and recent orders.
- Optional auto-hedge (enabled by default, disable with
--no-hedge). - Handles page reconnects and automatic asset switching (with related history reset on switch).
main.py: main runtimevariational/listener.py: local receiver + monitor parsingchrome_extension/: CDP forwarder extension
python3 -m venv env
source env/bin/activate
pip install -r requirements.txtpy -3 -m venv env
.\env\Scripts\Activate.ps1
pip install -r requirements.txtCreate .env:
LIGHTER_ACCOUNT_INDEX=...
LIGHTER_API_KEY_INDEX=...
LIGHTER_PRIVATE_KEY=...If you need to temporarily force Lighter's legacy application-level ping/pong behavior during the rollout window, you can also set:
LIGHTER_WS_SERVER_PINGS=trueWhen unset, the runtime uses the forward-compatible path: it keeps the socket alive with WebSocket protocol ping frames and still responds to legacy server ping messages.
- Open
chrome://extensions - Enable
Developer mode(top-right) - Click
Load unpacked(top-left), then choose:variational-v1/chrome_extension
python main.pyDisable hedge:
python main.py --no-hedgeAfter the Python script starts, open the Variational trading page,
open the Chrome extensions list, click Variational CDP Forwarder, then click Start.
Switch dashboard language to Chinese:
python main.py --lang zhDefault path: ./log
runtime.log(runtime log messages)order_metrics.jsonltrade_records.csv(current trade-record snapshot, overwritten on dashboard refresh with latest state)
Note: the terminal is reserved for the dashboard. Raw REST/WS payloads are not persisted; only runtime logs, order-metrics logs, and trade-record CSV snapshots are written.