tradergrid-ibkr-bridge 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -2
- package/dist/cli.cjs +127 -0
- package/package.json +26 -4
package/README.md
CHANGED
|
@@ -1,3 +1,65 @@
|
|
|
1
|
-
#
|
|
1
|
+
# tradergrid-ibkr-bridge
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Relays your Interactive Brokers market data from **TWS** or **IB Gateway** on your own
|
|
4
|
+
computer to your TraderGrid account: real-time US prices and US option chains.
|
|
5
|
+
|
|
6
|
+
It is **read-only**. It asks IBKR for market data, contract details and daily bars, and
|
|
7
|
+
nothing else: it cannot place an order or read your account. What it fetches is shown
|
|
8
|
+
only to you.
|
|
9
|
+
|
|
10
|
+
## What you need
|
|
11
|
+
|
|
12
|
+
- TWS or IB Gateway, logged in, with market-data subscriptions for what you want live
|
|
13
|
+
(US equities, and OPRA for US options). Without them IBKR sends delayed data and
|
|
14
|
+
TraderGrid says so.
|
|
15
|
+
- In TWS: **Edit → Global Configuration → API → Settings → Enable ActiveX and Socket
|
|
16
|
+
Clients**. "Read-Only API" can stay ticked. IB Gateway has the API on already.
|
|
17
|
+
- [Node.js](https://nodejs.org) 22 or later (the LTS).
|
|
18
|
+
- A bridge token: **TraderGrid → Connections → Interactive Brokers → Set up the bridge**.
|
|
19
|
+
It is shown once.
|
|
20
|
+
|
|
21
|
+
## Install (Mac or Windows)
|
|
22
|
+
|
|
23
|
+
In Terminal (Mac) or PowerShell (Windows), with your token. The Connections page shows
|
|
24
|
+
this command with the token in it:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
npx -y tradergrid-ibkr-bridge@latest install --token tgb_… --port 7496
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
This copies the bridge into your user profile, keeps the token in your login Keychain
|
|
31
|
+
(Mac) or encrypted for your Windows user (Windows), and runs it in the background: at
|
|
32
|
+
every log-on, waiting quietly while TWS is closed, and again if it stops. Nothing is left
|
|
33
|
+
open. Within a few seconds of TWS opening, TraderGrid's Connections page shows it
|
|
34
|
+
connected; its **On / Off** switch decides whether TraderGrid uses it.
|
|
35
|
+
|
|
36
|
+
On a Mac, macOS may ask to let `security` use the Keychain (allow it) and will note a
|
|
37
|
+
new background item from "Node.js".
|
|
38
|
+
|
|
39
|
+
| Command | |
|
|
40
|
+
|---|---|
|
|
41
|
+
| `npx -y tradergrid-ibkr-bridge@latest update` | install the latest version; token and settings kept |
|
|
42
|
+
| `npx -y tradergrid-ibkr-bridge@latest status` | installed? running? where is the log? |
|
|
43
|
+
| `npx -y tradergrid-ibkr-bridge@latest uninstall` | remove the service, the bridge and the token |
|
|
44
|
+
| `npx -y tradergrid-ibkr-bridge@latest run --token tgb_…` | run it in this window instead (Ctrl-C stops it) |
|
|
45
|
+
|
|
46
|
+
| Setting | Default | |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| `--port` | `7496` | 7496 live TWS · 7497 paper TWS · 4001 live Gateway · 4002 paper Gateway |
|
|
49
|
+
| `--host` | `127.0.0.1` | where TWS runs |
|
|
50
|
+
| `--client-id` | `77` | any API client id nothing else of yours uses |
|
|
51
|
+
| `--max-lines` | `40` | market-data lines the bridge holds at once (IBKR's ~100 is shared with TWS) |
|
|
52
|
+
| `--api` | TraderGrid's API | |
|
|
53
|
+
|
|
54
|
+
`install` and `update` keep the settings given; `run` uses them too.
|
|
55
|
+
|
|
56
|
+
| | Mac | Windows |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| The bridge | `~/Library/Application Support/TraderGrid/ibkr-bridge` | `%LOCALAPPDATA%\TraderGrid\ibkr-bridge` |
|
|
59
|
+
| The log | `~/Library/Logs/TraderGrid/ibkr-bridge.log` | `bridge.log` beside the bridge |
|
|
60
|
+
| The service | LaunchAgent `com.tradergrid.ibkr-bridge` | Task Scheduler: "TraderGrid IBKR bridge" |
|
|
61
|
+
|
|
62
|
+
The service uses the Node that ran `install`. After installing a new major Node, run
|
|
63
|
+
`update`.
|
|
64
|
+
|
|
65
|
+
Revoking the token in TraderGrid stops the bridge at once.
|