Interactive Brokers FIX API Trade Connector
Features
fix-ibConnector KeyNotes
Notes
Cancel On Disconnect
Interactive Brokers can enable Cancel-On-Disconnect for a FIX session upon request.
Clearing Account Type
| Config | Tag 204 | Description |
|---|---|---|
CUSTOMER | 0 | Order placed by customer. |
FIRM | 1 | Order placed by the firm. |
Position Effect
Indicates whether the resulting position after a trade should be an opening position or closing position.
Used for omnibus accounting - where accounts are held on a gross basis instead of being netted together.
| Config | Tag 77 | Description |
|---|---|---|
OPEN | O | Open |
CLOSE | C | Close |
ROLLED | R | Rolled |
Good Till Date Orders
The connector populates only ExpireDate(432) for GTD orders.
Security Types
The IB SecType is resolved according to the mapping below.
The specific IB SecType can be set via <attributeKey>SecurityType column in Security Metadata.
IBKR uses FOP for options on futures instead of the standard OPT value used for all other options.
| Instrument Type | IB SecType |
|---|---|
EQUITY,ETF | CS |
OPTION | OPT |
FUTURE | FUT |
FX | CASH |
INDEX | IND |
BOND | BOND |
CFD | CFD |
SYNTHETIC | MLEG |
Symbology
IB Contracts
Securities Columns
Column (prefixed with <attributeKey>) | Description |
|---|---|
Symbol | The asset symbol. Optional. |
RootSymbol | The root symbol. Optional, Future.RootSymbol / Option.Underlying / ExchangeTradedSynthetic.RootSymbol will be used if omitted. |
Expiry | ExpirationDate in YYYYMMDD format. Optional, Future.ExpirationDate / Option.ExpirationDate will be used if omitted. |
Exchange | Contract exchange. |
PrimaryExchange | The contract’s primary exchange. Optional. For smart routed contracts, used to define contract in case of ambiguity. |
SecurityType | The IB-specific security type. Optional, resolved from Instrument Type if omitted. |
ContractMultiplier | The instrument’s multiplier (i.e. options, futures). Optional. |
Schedule
Interactive Brokers can configure a FIX session schedule upon request.
If a schedule is enabled on the server side, it must also be configured in the connector settings (see example config below).
Configuration
Connector settings
| Parameter | Default Value | Description |
|---|---|---|
| senderId | Operator ID. Required for Futures. | |
| senderLocationId | ISO identifier of the physical location of trader. Required for Futures. | |
| useTrader | false | Use request's Trader ID (if provided) for OperatorID(8089). |
| clearingAccountType | The capacity of the firm placing the order. Valid values: CUSTOMER, FIRM. | |
| positionEffect | Order position effect. Valid values: OPEN, CLOSE, ROLLED. | |
| clearingAccount | Non-IBKR Clearing FIX Accounts when placing futures and futures options orders. Optional. | |
| account | IBKR account. | |
| useAccount | false | The flag to force using request's account in preference of default account. |
| useExchange | false | Defines whether or not to use Exchange from order request. |
| customAttributesSet | 1,18,47,65,77,100,142,168,204,207,439,440,847,6000-8999,9816 | The set of order request attributes which should be passed in FIX message. |
Config sample
connectors {
IB: ${template.connector.fix.ib} {
settings: {
host = "<HOST>"
port = <PORT>
senderCompId = "<SENDER_COMP_ID>"
targetCompId = "<TARGET_COMP_ID>"
account = "<ACCOUNT>"
clearingAccountType = CUSTOMER
# configure schedule if it is enabled on server side
schedule = {
zoneId = "America/Chicago"
intervals = [
{
startTime = "16:00:00",
startDay = SUNDAY,
endTime = "16:00:00",
endDay = FRIDAY
}
]
}
}
}
}