Configuration

Editing the configuration file

On deployment, the adapter’s configuration file is copied to the Deployment Framework directory: <framework-root>/global_config/overrides/BarracudaOrderAdapter/etc/Adapter.conf.

Any customisations you make to the configuration file will be retained on upgrading the adapter if you follow the steps outlined in Upgrading the Barracuda Order Adapter.

Configuration reference

The Barracuda Order Adapter’s configuration file is written in Human Optimised Config Object Notation (HOCON).

Configuration stanzas:

barracuda

Host and port of the Barracuda Order Management System.

Example configuration:

barracuda {
  host = "89.101.155.13:5279"
  messageport = 5295
}

broker

Barracuda Order Management System connection credentials.

Example configuration:

broker {
  username = "the username"
  password = "the password"
}

datebounds

Limits the age of orders displayed in client blotters:

  • dateBounds.cancelRejectedOrders.lowerbound limits the display of cancelled and rejected orders to orders that were cancelled or rejected within the previous lowerbound days.

  • dateBounds.expiredOrders.lowerbound limits the display of expired orders to orders that expired within the previous lowerbound days.

  • dateBounds.filledOrders.lowerbound limits the display of filled orders to orders that were filled within the previous lowerbound days.

Example configuration:

datebounds {
  cancelRejectedOrders {
    lowerbound: 30
  },
  expiredOrders {
    lowerBound: 30
  },
  filledOrders {
    lowerBound: 30
  }
}

notifications

A list of statuses that trigger notifications.

Valid statuses:

  • "Active"

  • "Cancelling"

  • "Cancelled"

  • "Completed"

  • "Expired"

  • "Rejected"

  • "Pending Acceptance"

  • "Partial-Filled"

  • "Accepted"

  • "Pending Modify"

  • "Filled"

  • "Priced"

  • "Saved"

  • "Pricing"

  • "Fill Error"

  • "Fill Expired"

  • "Gamma Mid Pending"

  • "None"

  • "Failed"

  • "Unknown"

Example configuration:

notifications {
  statuses = [
    "Cancelled",
    "Filled",
    "Completed",
    "Expired",
    "Rejected",
    "Partial-Filled"
  ]
}

orderStateActions

Defines the actions available for zero or more order states. By default, no actions are available for an order state.

There are two possible actions at each order state. One or both actions may be specified.

  • "Edit" (recognised by single-leg orders; ignored by multi-leg orders)

  • "Cancel"

Order states that you may define available actions for are listed below:

  • NONE

  • MODIFY_ACCEPTANCE_NEEDED

  • CANCEL_ACCEPTANCE_NEEDED

  • IN_MODIFICATION

  • MANUAL_PRICING

  • DELETED

  • PENDING

  • PRICED

  • SAVED

  • ACTIVE

  • FILLED

  • CANCELLED

  • EXPORTED

  • TRIGGERED

  • CREDIT_CHECKING

  • DI_NEEDED

  • ACCEPTANCE_NEEDED

  • REJECTED

  • PRICING

  • FILL_ERROR

  • FILL_EXPIRED

  • PENDING_CANCELLATION

  • DI_APPROVED

  • GAMMA_MID_PENDING

  • MIGRATION_ACCEPTANCE_NEEDED

  • ENTRYPRICING

  • SUSPENDED

Example configuration:

orderStateActions {
    PENDING:                     {actions: ["Edit","Cancel"]},
    MODIFY_ACCEPTANCE_NEEDED:    {actions: ["Edit","Cancel"]},
    ACCEPTANCE_NEEDED:           {actions: ["Cancel"]},
    MIGRATION_ACCEPTANCE_NEEDED: {actions: ["Edit","Cancel"]},
    CANCEL_ACCEPTANCE_NEEDED:    {actions: ["Edit","Cancel"]},
    PENDING_CANCELLATION:        {actions: ["Edit","Cancel"]},
    ACTIVE:                      {actions: ["Edit","Cancel"]},
}

precision

Configures the Barracuda Adapter’s default precision manager (com.caplin.orders.barracuda.extension.PrecisionManager). Precision managers supply decimal precision and pip-conversion multipliers for currency pairs.

The recommended way to manage precision is to write your own precision manager. This provides more flexibility than configuring the default precision manager. For more details, see Customising the Barracuda Order Adapter.

The role of a precision manager is to provide the following information for the spot rate of any given currency pair:

  • The number of decimal places to round the currency pair’s spot rate to

  • The multiplier, expressed as a power of 10, to convert a difference in the currency pair’s spot rate from a decimal value to price interest points (pips).

    For example, if the currency pair EURGBP has a multiplier of 4, then a difference of 0.0002 EURGBP equates to \$0.0002 xx 10^4 = 2\$ pips.

The tables below define the specification of the precision configuration object:

Precision object
Property Type Description

default

Object

Default configuration values. Used by the precision manager if values specific to a currency pair cannot be found. See Precision.default object below.

ccypair

Array of objects

Configuration values for specific currency pairs. See Precision.ccypair array elements below.

Precision.default object
Property Type Description

spot_rate_pip_multiplier

Integer

Multiplier, expressed as a power of 10, to convert a price difference from a decimal value to pips.

spot_rate_dps

Integer

Number of decimal places to round spot rate values to.

Precision.ccypair array elements
Property Type Description

currency_pair

String

Six character currency-pair code. For example, EURUSD.

spot_rate_pip_multiplier

Integer

Multiplier, expressed as a power of 10, to convert a price difference from a decimal value to pips.

spot_rate_dps

Integer

Number of decimal places to round spot rate values to.

invert_spot_rate_pip_multiplier

Integer

Optional shorthand to configure the inverse of this currency pair. Multiplier, expressed as a power of 10, to convert a price difference from a decimal value to pips.

invert_spot_rate_dps

Integer

Optional shorthand to configure the inverse of this currency pair. Number of decimal places to round spot rate values to.

Example configuration:

precision {
  default: {
    spot_rate_pip_multiplier=4,
    spot_rate_dps=5
  }
  ccypair: [
    {
      currency_pair=EURUSD,
      spot_rate_pip_multiplier=3,
      spot_rate_dps=4,
      invert_spot_rate_pip_multiplier=6,
      invert_spot_rate_dps=7
    },
    {
      currency_pair=USDJPY,
      spot_rate_pip_multiplier=2,
      spot_rate_dps=3,
      invert_spot_rate_pip_multiplier=6,
      invert_spot_rate_dps=7
    },
    {
      currency_pair=EURJPY,
      spot_rate_pip_multiplier=2,
      spot_rate_dps=3,
      invert_spot_rate_pip_multiplier=6,
      invert_spot_rate_dps=7
    }
  ]
}

serverTimezone

The time zone in which to display Activation Date and Expiration Date values in an order blotter. Takes a valid tz-database time zone.

We recommend that you set serverTimezone to the time zone of your Barracuda server.

Example configuration:

serverTimezone = "Europe/London"

strategy

Defines whether the account, the activation date, and the expiration date should be defined per strategy or per leg.

Example configuration:

strategy {
  account_per_leg = false
  activation_date_per_leg = false
  expiration_date_per_leg = false
}

timezoneMappings

Maps non-tz-database time zone strings to valid tz-database time zone strings. Use this if your front-end uses non-tz-database strings.

For a list of valid tz-database time zone strings, see List of tz database time zones.

Example configuration:

timezoneMappings {
    "America/New York": "America/New_York",
    "Europe/Milan": "Europe/Rome",
    "London": "Europe/London"
}