Updating the Bridge
The Bridge never updates itself. It runs on your machine and sends orders to your account, so the moment it changes is yours to pick.
How you find out
Three places tell you, and they tell you at different times.
- The Broker tab compares the version your Bridge reported against the newest release, and says so when you are behind. This is the one you will see without looking for it.
- The Bridge itself checks at startup and writes a warning into the log with the download link. You can switch that off with
UPDATE_CHECK_ENABLED=falseinbridge.env— for example on a machine that cannot reachapi.github.com. - A
wire_contract_mismatchat handshake means you are already too far behind: this build and the server no longer agree on the message format. Restarting will not help. This is the one case where updating is not optional.
How to update
- Stop the Bridge.
- Download the current
ordertune-bridge-ibkr.exefrom the Broker tab, or straight from the latest release. - Replace the old executable in your folder. Leave
bridge.envwhere it is. Logs and the record of already-sent orders do not live there any more — from 0.23.0 they sit under%LOCALAPPDATA%\Ordertune\Bridge, and the first start after the update moves them there for you. - Start it again.
Windows may show the SmartScreen dialog once more, because the new file is one it has not seen. Same answer as the first time: More info, then Run anyway.
If you run it as a service
Stop the service before replacing the file — Windows will not let you overwrite a running executable, and the error it gives is about file locking rather than about the Bridge.
Stop-Service ordertune-bridge
# replace ordertune-bridge-ibkr.exe
Start-Service ordertune-bridgeThe service name is whatever you called it when you set it up.
Same shape as on Windows: stop it, replace the program, start it again.
-
Close the Bridge window.
-
Fetch the current archive and its checksum. From a terminal that is two lines, and you never touch a browser:
cd ~/ordertune-bridge wget https://github.com/Ordertune/bridge-ibkr/releases/latest/download/ordertune-bridge-ibkr-linux-x86_64.tar.gz wget https://github.com/Ordertune/bridge-ibkr/releases/latest/download/ordertune-bridge-ibkr-linux-x86_64.tar.gz.sha256You can also take both files from the Broker tab or the latest release in a browser and move them into that folder.
-
Check it and unpack it over your folder:
sha256sum -c <<< "$(cat ordertune-bridge-ibkr-linux-x86_64.tar.gz.sha256) ordertune-bridge-ibkr-linux-x86_64.tar.gz" tar -xzf ordertune-bridge-ibkr-linux-x86_64.tar.gz --strip-components=1 ordertune-bridge-ibkr rm ordertune-bridge-ibkr-linux-x86_64.tar.gz*If the checksum line prints anything other than
OK, stop and download again.--strip-components=1is not optional: without it you get a folder inside your folder, and the next start finds nothing. -
Start it again.
bridge.env sits in that same folder and is not part of the archive, so it
survives untouched. You do not pair again.
Run the installer again. That is the whole procedure — it is the same script you used the first time, and it recognises an existing installation.
wget https://github.com/Ordertune/bridge-ibkr/releases/latest/download/ordertune-bridge-ibkr-linux-installer.sh
chmod +x ordertune-bridge-ibkr-linux-installer.sh
sudo ./ordertune-bridge-ibkr-linux-installer.shIt tells you what it is about to do and asks before it does it — an update stops the service, and while it is stopped no orders are picked up. You should know you are opening that window rather than discover it afterwards.
Then: stop the service, replace /opt/ordertune-bridge, start it again. Your
bridge.env is kept, so there is no pairing to redo.
By hand
If you would rather not run a script:
sudo systemctl stop ordertune-bridge
wget .../releases/latest/download/ordertune-bridge-ibkr-linux-x86_64.tar.gz
wget .../releases/latest/download/ordertune-bridge-ibkr-linux-x86_64.tar.gz.sha256
sha256sum -c <<< "$(cat ordertune-bridge-ibkr-linux-x86_64.tar.gz.sha256) ordertune-bridge-ibkr-linux-x86_64.tar.gz"
tar -xzf ordertune-bridge-ibkr-linux-x86_64.tar.gz
sudo cp -a ordertune-bridge-ibkr/. /opt/ordertune-bridge/
sudo chown -R ordertune-bridge:ordertune-bridge /opt/ordertune-bridge
sudo systemctl start ordertune-bridgeDo not delete /opt/ordertune-bridge wholesale — bridge.env lives in there.
Confirm on the Broker tab that Bridge version now shows the new number.
What an update does not change
- Your token stays valid.
- Your connection stays registered to the same machine and network.
- Your Trader Workstation settings are untouched.
- Open orders at IBKR are untouched. The Bridge rebuilds what it knows about them from the order references at IBKR when it reconnects.
Going back
Every release stays available, with the files for both systems. If a version misbehaves, take the previous one from the releases page and swap it back the same way — but tell us first, because a version old enough to be worth avoiding is one we should know about.
Do not go back past a wire_contract_mismatch. Below that line the server will not talk to the Bridge at all.