7f8b4cfefd
Mark tradable varieties with a night tag; during 21:00-02:30 filter out index futures and other products without night sessions from symbol picker and recommend list. Co-authored-by: Cursor <cursoragent@cursor.com>
17 lines
604 B
Python
17 lines
604 B
Python
import paramiko
|
|
import sys
|
|
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
|
c = paramiko.SSHClient()
|
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect("192.168.8.21", username="root", password="woaini88", timeout=15)
|
|
for cmd in [
|
|
"ls -la /opt/qihuo/market_sessions.py",
|
|
"head -5 /opt/qihuo/market_sessions.py",
|
|
"cd /opt/qihuo && /opt/qihuo/venv/bin/python -c \"import market_sessions; print(market_sessions.is_night_trading_session())\"",
|
|
]:
|
|
_, o, e = c.exec_command(cmd)
|
|
print(">>>", cmd)
|
|
print(o.read().decode())
|
|
print(e.read().decode())
|
|
c.close()
|