B2C2 Trade Connector
Features
fix-b2c2Connector KeyNotes
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
b2c2Slippagecolumn insecuritiesstream - Connector level - via
slippagesettings
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)isSPOTorCFD
For example, BTCUSD.SPOT is spot Bitcoin against the US dollar.
Schedule
The B2C2 operating hours, all times are in UTC:
| Day | Time Zone | Open | Close |
|---|---|---|---|
| Monday | UTC | 00:00 | 24:00 |
| Tuesday | UTC | 00:00 | 24:00 |
| Wednesday | UTC | 00:00 | 24:00 |
| Thursday | UTC | 00:00 | 24:00 |
| Friday | UTC | 00:00 | 24:00 |
| Saturday | UTC | 00:00 | 24:00 |
| Sunday | UTC | 00:00 | 24:00 |
The B2C2 business day starts and ends at 17:00 Eastern Daylight Time (EDT).
Configuration
Connector settings
| Parameter | Default Value | Description |
|---|---|---|
| username | Username | |
| password | Password | |
| account | Default value for Account(1) tag. | |
| useAccount | false | The flag to force using request's account in preference of default account. |
| slippage | Acceptable 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
| Key | Description |
|---|---|
| 1 | Account(1) |
| 168 | EffectiveTime(168). The time at which to expire FOK order, maximum is 20 seconds from the current time in UTC. |
| 8001 | AcceptableSlippage(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>"
}
}
}