Connect your IBKR account
This links your own Interactive Brokers account so you can trade through unisona. It takes about 10 minutes and you don't need to be technical — unisona makes the security keys for you. Do it with a paper (practice) account first.
1 Make your keys (on the unisona Settings page)
On Settings → Broker Connection, click 🔑 Generate my keys. unisona creates your security keys right in your browser and downloads three files to your computer:
- public_signature.pem
- public_encryption.pem
- dhparam.pem
The secret half of the keys stays filled in on the unisona page — leave that tab open. You'll only upload the three files above to IBKR.
2 Open IBKR's setup page
Sign in to Interactive Brokers, then open their OAuth setup page:
Read and accept their terms if asked.
3 Fill in the IBKR form
- Consumer Key — make up a 9-letter word (letters only — no numbers or symbols), e.g.
UNISONAAB. Write it down; you'll need it in step 5. - Public Signing Key — upload public_signature.pem
- Public Encryption Key — upload public_encryption.pem
- Diffie-Hellman Parameters — upload dhparam.pem
4 Get your two tokens
Click Generate Token (or "Generate Access Token"). IBKR shows an Access Token and an Access Token Secret — copy both right away, because they disappear if you leave or refresh the page. Then flip Enable OAuth Access to on.
5 Finish on unisona
Go back to the unisona Settings tab (the keys are already filled in). Add:
- your Consumer Key (from step 3)
- the Access Token and Access Token Secret (from step 4)
- your paper account number — it starts with
DU
Click Connect & test. A green dot means you're connected. 🎉
Go to Settings → Connect →Prefer to make the keys yourself with the command line? (advanced)
Instead of "Generate my keys", run these in a terminal (macOS/Linux, or Git Bash/WSL on Windows), upload the two public_*.pem + dhparam.pem to IBKR, and paste the two private keys into unisona. Get the DH prime with the extractor on the connect page.
openssl genrsa -out private_signature.pem 2048 openssl rsa -in private_signature.pem -pubout -out public_signature.pem openssl genrsa -out private_encryption.pem 2048 openssl rsa -in private_encryption.pem -pubout -out public_encryption.pem openssl dhparam -out dhparam.pem 2048