Set up IBKR Cloud

IBKR Cloud connects Arcanan to Interactive Brokers' Web API using an OAuth consumer you register yourself — no desktop app, no gateway to keep running. Once connected, the browser can read your accounts and positions, sync executions, import watchlists, and place orders into whichever account your credentials resolve to. Setting this up means generating a few keys with OpenSSL and registering them with IBKR; this guide walks through every command.

1. What you need first

2. Generate your keys locally

Run these in an empty directory you control. The private halves never leave your machine except for the one signing key you paste into Arcanan.

Signing key pair, encryption key pair, and DH parameters:

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 -outform PEM -out dhparam.pem 2048

Convert the signing key to PKCS#8 — this is the form Arcanan accepts, and the one whose PEM block begins -----BEGIN PRIVATE KEY-----:

openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt \
  -in private_signature.pem -out private_signature_pkcs8.pem

Finally, extract the Diffie-Hellman prime as hex. Printing the parameters shows the prime as colon-separated bytes:

openssl dhparam -in dhparam.pem -noout -text

Copy the prime's hex bytes and strip the colons and whitespace, so you end up with one long unbroken hex string. This one-liner does it for you:

openssl dhparam -in dhparam.pem -noout -text \
  | sed -n '/prime:/,/generator/p' \
  | grep -vE 'prime|generator' \
  | tr -d ' :\n'

3. Register in IBKR's OAuth Self-Service Portal

Reach the portal from Client Portal → Settings → API → OAuth Self Service, or go directly to IBKR's OAuth self-service login.

  1. Upload the three public artefacts: public_signature.pem,public_encryption.pem, and dhparam.pem.
  2. IBKR shows you a consumer key straight away. Save it.
  3. The consumer then has to be activated, which can take until the next day. Once it is, the portal shows an access token and an encrypted access token secret.

4. Decrypt the access token secret

IBKR encrypts the secret to your encryption public key, so only you can read it. Decrypt it and print it as hex:

printf '%s' "<encrypted secret>" | base64 -d \
  | openssl pkeyutl -decrypt -inkey private_encryption.pem \
  | xxd -p \
  | tr -d '\n'

The result is another long hex string — that, not the value IBKR displayed, is what Arcanan needs.

5. Paste it into Arcanan

In the terminal, open Settings → Integrations → Interactive Brokers (Cloud) and choose Connect IBKR. Six fields:

6. Verify the connection

The card should flip to Connected to IBKR and list your accounts, with the default one highlighted. From there:

7. Things worth knowing

Common questions

Does Arcanan see my IBKR password?
No. You never type your IBKR credentials into Arcanan. What you paste is OAuth material — a consumer key, an access token, its decrypted secret, a Diffie-Hellman prime, and a signing key you generated yourself. Arcanan encrypts all of it before storing it and never displays it again.
Can I place live orders from the browser?
Yes, once live trading is enabled for your account. Orders go to whichever account your credentials resolve to: a paper account (ids starting with DU) routes straight through, while a live account also needs live trading switched on under Settings → Live trading — part of the Pro and Ultimate plans, enabled per account after review. When the resolved account is live, the order ticket shows the destination as LIVE and asks for an extra confirmation before the order leaves.
Why does IBKR show a competing session?
Interactive Brokers allows one brokerage session per username. If you are logged into TWS, IB Gateway, or the Client Portal with the same login your OAuth consumer uses, IBKR reports a competing session and one side gets pushed out. Use a separate paper login for the cloud connection, or log out of the other session.
How do I revoke access?
Open Settings → Integrations → Interactive Brokers (Cloud) and choose Disconnect — that deletes the stored credentials, and every IBKR path immediately reports as not connected. To cut it off at the broker as well, delete the consumer in IBKR's OAuth Self-Service Portal.

Start your next trade with evidence, not vibes.

The free plan runs on your own market-data and LLM keys — or on your broker's feed through the desktop app. No card, no invite.