Skip to main content

B2C2 Trade Connector

Features

fix-b2c2Connector Key
Instruments
FX
Request Types
SUBMIT
Order Types
LIMITMARKET
Time In Force
FOK
Order ID Mapper
COMPOSITE
Order Status Request
Cancel On Disconnect
Commission
Post Only
Fast Cancel
Fast Replace

Notes

Username and Password

https://docs.b2c2.net/#username-553-and-password-554

The Username(553) tag of the Logon message should be set to the username of a user on your account which is used to log in to the B2C2 OTC website. The API token for this user should be used for the tag Password(554). Do not use your password for your OTC user account here. To locate your API token please go the top right hand corner, open the drop down, and select “API token”.

Executing a FOK order

FOK order is either immediately executed in full or rejected. The executed price may be better than the price requested on the FOK.

The EffectiveTime (168) tag can be set to define an expiry time for FOK orders, protecting against severe latency or accidental resubmission.

Acceptable Slippage

Slippage can be specified on:

  • Order level - via custom attribute (8001)
  • Instrument level - via b2c2Slippage column in securities stream
  • Connector level - via slippage settings

Symbology

https://docs.b2c2.net/#quoting-and-trading-conventions

Symbols follow the format (BASECCY)(COUNTERCCY).(TYPE), where:

  • (BASECCY) is the base currency
  • (COUNTERCCY) is the counter currency
  • (TYPE) is SPOT or CFD

For example, BTCUSD.SPOT is spot Bitcoin against the US dollar.

Schedule

The B2C2 operating hours, all times are in UTC:

DayTime ZoneOpenClose
MondayUTC00:0024:00
TuesdayUTC00:0024:00
WednesdayUTC00:0024:00
ThursdayUTC00:0024:00
FridayUTC00:0024:00
SaturdayUTC00:0024:00
SundayUTC00:0024:00

The B2C2 business day starts and ends at 17:00 Eastern Daylight Time (EDT).

Configuration

Connector settings

ParameterDefault ValueDescription
usernameUsername
passwordPassword
accountDefault value for Account(1) tag.
useAccountfalseThe flag to force using request's account in preference of default account.
slippageAcceptable leeway in bps, between 0 and 20. Only to be used on FOK orders (maximum 2 decimals). There is a default value 0 if not specified.

Supported order attributes

KeyDescription
1Account(1)
168EffectiveTime(168). The time at which to expire FOK order, maximum is 20 seconds from the current time in UTC.
8001AcceptableSlippage(8001). Acceptable leeway in bps, between 0 and 20. Only to be used on FOK orders (maximum 2 decimals).

Config sample

connectors {
B2C2: ${template.connector.fix.b2c2} {
settings {
host = "<HOST>"
port = <PORT>

senderCompId = "<SENDER_COMP_ID>"
targetCompId = "<TARGET_COMP_ID>"

username = "<USERNAME>"
password = "<PASSWORD>"
}
}
}