Compare commits
2 Commits
365f0c7181
...
eaa77ef187
| Author | SHA1 | Date | |
|---|---|---|---|
| eaa77ef187 | |||
| 76d5e44186 |
@@ -4,12 +4,8 @@ After=network-online.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
# Reach IBKR through pc's "ipads" proxy (mihomo, SOCKS5/HTTP on 7892), as
|
# No proxy env on purpose: mihomo TUN (auto-route) transparently routes all
|
||||||
# `proxy ipads` does in a shell. IBC drops -D lines from ibgateway.vmoptions and
|
# traffic by rules; IBKR domains go DEFAULT -> RES residential exit.
|
||||||
# clears JAVA_TOOL_OPTIONS, so the java launcher gets them via JDK_JAVA_OPTIONS.
|
|
||||||
Environment="JDK_JAVA_OPTIONS=-DsocksProxyHost=127.0.0.1 -DsocksProxyPort=7892"
|
|
||||||
Environment=http_proxy=http://127.0.0.1:7892 https_proxy=http://127.0.0.1:7892 all_proxy=http://127.0.0.1:7892
|
|
||||||
Environment=HTTP_PROXY=http://127.0.0.1:7892 HTTPS_PROXY=http://127.0.0.1:7892 ALL_PROXY=http://127.0.0.1:7892
|
|
||||||
ExecStart=/usr/bin/xvfb-run -a -s "-screen 0 1024x768x24" %h/ibc/gatewaystart.sh -inline
|
ExecStart=/usr/bin/xvfb-run -a -s "-screen 0 1024x768x24" %h/ibc/gatewaystart.sh -inline
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=60
|
RestartSec=60
|
||||||
|
|||||||
@@ -7,7 +7,12 @@ import pandas as pd
|
|||||||
SP500_URL = "https://en.wikipedia.org/wiki/List_of_S%26P_500_companies"
|
SP500_URL = "https://en.wikipedia.org/wiki/List_of_S%26P_500_companies"
|
||||||
|
|
||||||
|
|
||||||
|
# Tickers Wikipedia lists differently from what IBKR carries.
|
||||||
|
IBKR_SYMBOL_OVERRIDES = {"PSKY": "SKYD"} # Paramount Skydance trades as SKYD/NYSE on IBKR
|
||||||
|
|
||||||
|
|
||||||
def to_ib_symbol(ticker: str) -> str:
|
def to_ib_symbol(ticker: str) -> str:
|
||||||
|
ticker = IBKR_SYMBOL_OVERRIDES.get(ticker, ticker)
|
||||||
# IBKR writes share classes with a space: BRK.B -> "BRK B".
|
# IBKR writes share classes with a space: BRK.B -> "BRK B".
|
||||||
return ticker.replace(".", " ")
|
return ticker.replace(".", " ")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user