Interactive Brokers
Coming SoonUS Brokers
connectorType: "ib"Interactive Brokers is a multi-asset brokerage offering access to stocks, options, futures, forex, bonds, and funds across 150+ markets in 33 countries. Barfinex connects via the TWS/Gateway API.
Connection Architecture
Interactive Brokers
WebSocket / REST→
Connector
libs/exchange-interactive-brokers→
Provider
:8081/api→
Detector
Advisor
Studio
The connector feeds exchange data to Provider. Detector receives market data, Studio receives read views, and Advisor sees only signed candidate evidence.
Technologies
Transport
WebSocketREST
Authentication
TWS GatewayData Format
JSONFeatures
Local Gateway RequiredMulti-Asset
Best for
- Built for professional and institutional traders who need access to equities, options, futures, and bonds from a single automated platform.
- Supports complex multi-leg options strategies, cross-market hedging, and systematic futures trading.
- Ideal for portfolio managers and quant funds running diversified automated strategies across US and global markets.
- The breadth of asset classes makes IB the strongest choice for multi-asset algorithmic portfolios.
Connect via code
1Environment variables (.env)
IB_GATEWAY_URL=your_gateway_url_here IB_ACCOUNT_ID=your_account_here
2Connector configuration
// config/config.provider.json
{
"provider": {
"connectors": [
{
"connectorType": "ib",
"enabled": true,
"markets": [
{ "marketType": "spot", "symbols": [{ "name": "BTCUSDT" }] }
],
"subscriptions": [
{ "type": "PROVIDER_MARKETDATA_CANDLE", "symbols": ["BTCUSDT"], "intervals": ["min1", "h1"], "active": true },
{ "type": "PROVIDER_MARKETDATA_TRADE", "symbols": ["BTCUSDT"], "active": true },
{ "type": "PROVIDER_MARKETDATA_ORDERBOOK", "symbols": ["BTCUSDT"], "active": true }
]
}
]
}
}3Verify and query data
Public verification 1. Configure credentials in the private Provider environment. 2. Verify connector status in the internal Studio/Provider console. 3. Use Barfinex public pages to inspect market data. Operator Provider commands and tokens remain in internal runbooks only.
Available via Barfinex API
/api/candles/ib/...
/api/trades/ib/...
/api/orderbook/ib/...
/api/account/ib/...
/api/symbols/ib/...
/api/assets/ib/...
Studio graphical setup — in development, coming in the next release.
Important
Interactive Brokers does NOT use API key/secret authentication.
You must have IB Gateway or Trader Workstation (TWS) running locally and authenticated with your IB credentials before Barfinex can connect.
IB_GATEWAY_URL typically points to localhost (e.g., http://localhost:4001).
Market data subscriptions must be activated separately on the IB account portal — unsubscribed symbols return delayed or empty data.
Paper trading requires a separate IB Paper Trading account (different credentials from your live account).
US equities: regular session 09:30–16:00 ET; extended hours available but liquidity varies significantly.
Supported Markets
SpotFuturesMargin
Founded1978
HeadquartersGreenwich, USA
Websitewww.interactivebrokers.com
Connect in Studio(soon)
Exchange Website