Skip to main content

Interactive Brokers FIX API Trade Connector

Features​

fix-ibConnector Key
Instruments
FXEQUITYOPTIONFUTURESYNTHETIC
Request Types
SUBMITCANCELREPLACE
Order Types
LIMITMARKETSTOPSTOP_LIMIT
Time In Force
DAYGTCFOKIOCGTDAT_THE_OPENINGAT_THE_CLOSE
Order ID Mapper
SEQUENCE
✗
Order Status Request
✓
Cancel On Disconnect
✗
Commission
✓
Post Only
✓
Fast Cancel
✓
Fast Replace

Notes​

Integration​

Use of FIX requires an integration process lead by IB FIX Engineering team, who can be reached at fixengineering@ibkr.com

Cancel on Disconnect​

Interactive Brokers can enable Cancel-On-Disconnect for a FIX session upon request.

Clearing Account Type​

ConfigTag 204Description
CUSTOMER0Order placed by customer.
FIRM1Order 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.

ConfigTag 77Description
OPENOOpen
CLOSECClose
ROLLEDRRolled

Good Till Date Orders​

note

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.

note

IBKR uses FOP for options on futures instead of the standard OPT value used for all other options.

Instrument TypeIB SecType
EQUITY,ETFCS
OPTIONOPT
FUTUREFUT
FXCASH
INDEXIND
BONDBOND
CFDCFD
SYNTHETICMLEG

Symbology​

IB Contracts​

Securities Columns​

Column (prefixed with <attributeKey>)Description
SymbolThe asset symbol. Optional.
BaseCurrencyBase Currency. Optional, Currency.BaseCurrency will be used if omitted.
CurrencyTerm Currency. Optional, GenericInstrument.Currency will be used if omitted.
RootSymbolThe root symbol. Optional, Future.RootSymbol / Option.Underlying / ExchangeTradedSynthetic.RootSymbol will be used if omitted.
ExpiryExpirationDate in YYYYMMDD format. Optional, Future.ExpirationDate / Option.ExpirationDate will be used if omitted.
ExchangeContract exchange.
PrimaryExchangeThe contract’s primary exchange. Optional. For smart routed contracts, used to define contract in case of ambiguity.
SecurityTypeThe IB-specific security type. Optional, resolved from Instrument Type if omitted.
ContractMultiplierThe instrument’s multiplier (i.e. options, futures). Optional.
note

ibSymbol is not used for FX instruments. Instead Base and Term currencies should be property defined. Sometimes IB requires non-standard notation (e.g. GLD vs XAU) - in such case IB specific value can defined in ibBaseCurrency column.

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​

ParameterDefault ValueDescription
senderIdOperator ID. Required for Futures.
senderLocationIdISO identifier of the physical location of trader. Required for Futures.
useTraderfalseUse request's Trader ID (if provided) for OperatorID(8089).
clearingAccountTypeThe capacity of the firm placing the order. Valid values: CUSTOMER, FIRM.
positionEffectOrder position effect. Valid values: OPEN, CLOSE, ROLLED.
clearingAccountNon-IBKR Clearing FIX Accounts when placing futures and futures options orders. Optional.
locateBrokerIndicate the present location of the shares that are to be delivered in connection with customer's short sale order.
accountIBKR account.
useAccountfalseThe flag to force using request's account in preference of default account.
useExchangefalseDefines whether or not to use Exchange from order request.
customAttributesSet1,18,47,65,77,100,142,168,204,207,439,440,847,6000-8999,9816The 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
}
]
}
}
}
}