User Config API reference

Config

Config describes application and account settings for the logged-in user.

Function Description

Config.application(Application application)

Configure client applications for the user.

Config.defaultAccounts(java.util.Map<java.lang.String,Account> defaultAccounts)

Configure accounts that belong to the user.

Config.tobo(TOBO tobo)

Configure accounts the user can trade on behalf of.

Config.userInfo(UserInfo userInfo)

Configure the logged-in user.

Example configuration
new Config()
      .application(new Application()
        .pro(new Pro()
          .workspace(new ProWorkspace()
            .allowEditing(true)
            .defaultLayouts(ImmutableList.of("Layout1", "Layout2"))
          )
        )
      )
      .defaultAccounts(Collections.singletonMap(
        "ExampleAccount",
        new Account().description("ExampleAccount")
      ))
      .tobo(new TOBO().entities(ImmutableMap.of(
        "E1", new Entity()
          .description("Entity 1")
          .accounts(ImmutableMap.of(
            "Acc1", new Account().description("Account 1"),
            "Acc2", new Account().description("Account 2")
          ))
          .users(ImmutableMap.of(
            "user1@caplin.com",
            new User().description("Caplin - User 1 Caplin")
          ))
      )))
      .userInfo(new UserInfo().displayName("Demo User"));

FXConfig

FXConfig describes FX feature permissions for a user, and for sales users acting on their behalf. It may be requested directly by FX Professional for the logged-in user, or by FX Sales when a sales user selects a user to trade on behalf of.

Currencies

This section lists the configuration options for currency pair permissions.

You can supply permission overrides for any ESP and RFS at a currency pair granularity level. See the example at the end of this section for how to do this.

Function Description

FX.currencies(java.util.Map<java.lang.String,FXCurrency> currencies)

A list of individual currencies the user has permission to trade with.

Individual currencies configured with matching permissions will be combined into currency pairs. If currencyPairs is set, it takes precedence over currencies.

FX.currencyPairs(java.util.Map<java.lang.String,FXCurrencyPair> currencyPairs)

A list of currency pairs the user has permission to trade with. Takes precedence over currencies.

Configuring currency pairs
new FXConfig()
      .fx(
        new FX()
          .currencyPairs(new HashMap<String, FXCurrencyPair>() {{
             put("GBPUSD", new FXCurrencyPair()
               .overrides(new FXCurrencyPairOverrides()
                 .rfs(
                   new FXRfs()
                     .defaultDeliverableType(DELIVERABLE)
                     .single(new FXRfsSingle()
                       .deliverable(new FXRfsSingleDeliverable()
                         .outright(new FXRfsSingleDeliverableOutright()
                           .enabled(true)
                         )
                         .timeOption(new FXRfsSingleDeliverableTimeOption()
                           .enabled(true)
                         )
                       )
                       .nonDeliverable(new FXRfsSingleNonDeliverable()
                         .outright(new FXRfsSingleNonDeliverableOutright()
                           .enabled(true)
                         )
                       )
                     )
                     .block(new FXRfsBlock()
                       .deliverable(new FXRfsBlockDeliverable()
                         .outright(new FXRfsBlockDeliverableOutright()
                           .enabled(true)
                         )
                       )
                     )
                 )
                 .esp(
                   new FXEsp()
                     .defaultDeliverableType(DELIVERABLE)
                     .single(new FXEspSingle()
                       .deliverable(new FXEspSingleDeliverable()
                         .outright(new FXEspSingleDeliverableOutright()
                           .enabled(true)
                         )
                       )
                       .nonDeliverable(new FXEspSingleNonDeliverable()
                         .outright(new FXEspSingleNonDeliverableOutright()
                           .enabled(true)
                         )
                       )
                     )
                 )
               )
             );
           }}
          )
      );

Charts

These are the configuration options for the Charts feature, configurable via FXFeaturesCharts.

Function Description

FXFeaturesCharts.enabled(java.lang.Boolean enabled)

Set to true to enable Charts.

Configuring Charts
new FXConfig()
      .fx(
        new FX()
          .features(
            new FXFeatures()
              .charts(
                new FXFeaturesCharts()
                  .enabled(true)
              )
          )
      );

Cover Trade

These are the configuration options for the Cover Trade feature, configurable via FXFeaturesCoverTrade.

Function

Description

FXFeaturesCoverTrade.enabled(java.lang.Boolean enabled)

Set to true to enable Cover Trade.

Configuring Cover Trade
new FXConfig()
      .fx(
        new FX()
          .features(
            new FXFeatures()
              .coverTrade(
                new FXFeaturesCoverTrade()
                  .enabled(true)
              )
          )
      );

ESP (Executable Streaming Price)

These are the configuration options for the ESP feature, configurable via FXEsp.

Function Description

FXEsp.defaultDeliverableType(DeliverableType defaultDeliverableType)

Set the deliverable type that is selected by default in the FX Tile. Available options are: NON_DELIVERABLE, DELIVERABLE

FXEsp.single(FXEspSingle single)

Provide an FXEspSingle object to configure FX ESP single-leg trades. See the example below.

FXEsp.submitActions(java.util.List<FXEsp.SubmitActionsEnum> submitActions)

Provide a list of actions users can choose to occur when they click on an FX Tile. Available options are:

  • LAUNCH_RFS – Provides the option to open an FX RFS Ticket

  • EXECUTE – Provides the option to immediately execute trades from the FX tile via one-click, two-click, and via confirmation modal.

FXEsp.submitActionSwitchEnabled(java.lang.Boolean submitActionSwitchEnabled)

Set to true to allow users to switch between actions provided by FXEsp.submitActions.

FXEsp.twoWayEnabled(java.lang.Boolean twoWayEnabled)

Set to true to allow users to switch between one-way and two-way outright modes on the FX Tile.

Configuring ESP
new FXConfig()
      .fx(
        new FX()
          .features(
            new FXFeatures()
              .esp(
                new FXEsp()
                  .defaultDeliverableType(DeliverableType.DELIVERABLE)
                  .submitActions(ImmutableList.of(EXECUTE))
                  .submitActionSwitchEnabled(true)
                  .twoWayEnabled(true)
                  .single(new FXEspSingle()
                    .deliverable(new FXEspSingleDeliverable()
                      .outright(new FXEspSingleDeliverableOutright()
                        .enabled(true)
                      )
                    )
                    .nonDeliverable(new FXEspSingleNonDeliverable()
                      .outright(new FXEspSingleNonDeliverableOutright()
                        .enabled(true)
                      )
                    )
                  )
              )
          )
      );

These are the configuration options for the Historic Search feature, configurable via HistoricSearch.

Function Description

HistoricSearch.searchFields(java.util.List<Field> searchFields)

Provide a list of fields a user can search by.

HistoricSearch.searchMode(HistoricSearchSearchMode searchMode)

Set the search mode to be used by Historic Search. Available options are:

  • SNAPSHOT – Historic Search returns a snapshot of the data at the time of searching.

  • STREAM – Historic Search continues to update the search results after a search is made.

Configuring Historic Search
new FXConfig()
      .fx(
        new FX()
          .features(
            new FXFeatures()
              .historicSearch(
                new HistoricSearch()
                  .searchFields(ImmutableList.of(new Field()))
                  .searchMode(HistoricSearchSearchMode.STREAM)
              )
          )
      );

Order Strategies

These are the configuration options for the Order Strategies feature, configurable via FXStrategy.

Function Description

FXStrategy.activationDateEnabled(java.lang.Boolean activationDateEnabled)

Set to true to enable the GFA/Custom toggle control and activation input fields in the React Order Ticket.

FXStrategy.ifDone(OrderStrategy ifDone)

For two-leg orders. If the first leg is filled, the second leg is activated. Provide an enabled OrderStrategy object with a list of OrderTypes this strategy should apply to.

FXStrategy.ifDoneLoop(OrderStrategy ifDoneLoop)

For three-leg orders. If the first leg is filled, a loop between the second and third legs is activated. Provide an enabled OrderStrategy object with a list of OrderTypes this strategy should apply to.

FXStrategy.ifDoneOCO(OrderStrategy ifDoneOCO)

For three-leg orders. If the first leg is filled, the second and third legs are activated. If either the second or third leg is filled, the other is cancelled. Provide an enabled OrderStrategy object with a list of OrderTypes this strategy should apply to.

FXStrategy.loop(OrderStrategy loop)

For two-leg orders. A filled leg triggers the next leg in a loop until cancelled. Provide an enabled OrderStrategy object with a list of OrderTypes this strategy should apply to.

FXStrategy.oco(OrderStrategy oco)

For two-leg orders. If the first leg is filled, the second leg is cancelled. Provide an enabled OrderStrategy object with a list of OrderTypes this strategy should apply to.

FXStrategy.single(OrderStrategy single)

For single-leg orders. Provide an enabled OrderStrategy object with a list of OrderTypes this strategy should apply to.

Configuring Order Strategies
new FXConfig()
      .fx(
        new FX()
          .features(
            new FXFeatures()
              .orderStrategies(
                new FXStrategy()
                  .activationDateEnabled(true)
                  .ifDone(new OrderStrategy())
                  .ifDoneLoop(new OrderStrategy())
                  .ifDoneOCO(new OrderStrategy())
                  .loop(new OrderStrategy())
                  .oco(new OrderStrategy())
                  .single(new OrderStrategy())
              )
          )
      );

Post-Trade Allocation

These are the configuration options for the Post-Trade Allocation feature, configurable via FXFeaturesPostAllocation.

Function Description

FXFeaturesPostAllocation.enabled(java.lang.Boolean enabled)

Set to true to enable Post-Trade Allocation.

FXFeaturesPostAllocation.toboSelectionDisplayEntity(java.lang.Boolean toboSelectionDisplayEntity)

Set to true to display the entity column in Post-Trade Allocation.

Configuring Post-Trade Allocation
new FXConfig()
      .fx(
        new FX()
          .features(
            new FXFeatures()
              .postAllocation(
                new FXFeaturesPostAllocation()
                  .enabled(true)
                  .toboSelectionDisplayEntity(true)
              )
          )
      );

RFS (Request For Stream)

These are the configuration options for the RFS (Request For Stream) feature, configurable via FXRfs.

Function Description

FXRfs.block(FXRfsBlock block)

Supply an FXRfsBlock object to configure FX RFS block trades.

FXRfs.defaultDeliverableType(DeliverableType defaultDeliverableType)

Set the default deliverable type that is selected by default in the FX Ticket. Available options are: NON_DELIVERABLE, DELIVERABLE.

FXRfs.parForward(FXRfsParForward parForward)

Supply an FXRfsParForward object to configure FX RFS Par Forward trades.

FXRfs.single(FXRfsSingle single)

Supply an FXRfsSingle object to configure FX RFS Single trades. See the example below for how to configure allowed trade types, deliverables, and outrights.

FXRfs.swap(FXRfsSwap swap)

Supply an FXRfsSwap object to configure FX RFS Swap trades. See the example below for how to configure allowed trade types, deliverables, and outrights.

FXRfs.twoWayEnabled(java.lang.Boolean twoWayEnabled)

Set to true to allow users to switch between one-way and two-way outright modes in the FX Ticket.

Configuring RFS
new FXConfig()
      .fx(
        new FX()
          .features(
            new FXFeatures()
              .rfs(
                new FXRfs()
                  .defaultDeliverableType(DeliverableType.DELIVERABLE)
                  .twoWayEnabled(true)
                  .single(new FXRfsSingle()
                    .deliverable(new FXRfsSingleDeliverable()
                      .outright(new FXRfsSingleDeliverableOutright()
                        .enabled(true)
                      )
                      .timeOption(new FXRfsSingleDeliverableTimeOption()
                        .enabled(true)
                      )
                    )
                    .nonDeliverable(new FXRfsSingleNonDeliverable()
                      .outright(new FXRfsSingleNonDeliverableOutright()
                        .enabled(true)
                      )
                    )
                  )
                  .swap(new FXRfsSwap()
                    .deliverable(new FXRfsSwapDeliverable()
                      .outright(new FXRfsSwapDeliverableOutright()
                        .enabled(true)
                      )
                    )
                    .nonDeliverable(new FXRfsSwapNonDeliverable()
                      .outright(new FXRfsSwapNonDeliverableOutright()
                        .enabled(true)
                      )
                    )
                  )
                  .block(new FXRfsBlock()
                    .perLegClientSelectionEnabled(true)
                    .toboSelectionDisplayEntity(true)
                    .deliverable(new FXRfsBlockDeliverable()
                      .outright(new FXRfsBlockDeliverableOutright()
                        .enabled(true)
                      )
                      .timeOption(new FXRfsBlockDeliverableTimeOption()
                        .enabled(true)
                      )
                    )
                    .nonDeliverable(new FXRfsBlockNonDeliverable()
                      .outright(new FXRfsBlockNonDeliverableOutright()
                        .enabled(false)
                      )
                    )
                  )
              )
          )
      );

Settlement Instructions

These are the configuration options for the Settlement Instructions feature, configurable via FXFeaturesSettlementInstructions.

Function Description

FXFeaturesSettlementInstructions.adHocEnabled(java.lang.Boolean adHocEnabled)

Set to true to allow users to add ad-hoc Settlement Instructions to trades.

FXFeaturesSettlementInstructions.createEnabled(java.lang.Boolean createEnabled)

Set to true to allow users to create new Settlement Instructions.

FXFeaturesSettlementInstructions.preTradeEnabled(java.lang.Boolean preTradeEnabled)

Set to true to allow users to add Settlement Instructions pre-trade.

Configuring Settlement Instructions
new FXConfig()
      .fx(
        new FX()
          .features(
            new FXFeatures()
              .settlementInstructions(
                new FXFeaturesSettlementInstructions()
                  .adHocEnabled(true)
                  .createEnabled(true)
                  .preTradeEnabled(true)
              )
          )
      );

Watch Lists

These are the configuration options for the Watch Lists feature, configurable via FXFeaturesWatchLists.

Function Description

FXFeaturesWatchLists.enabled(java.lang.Boolean enabled)

Set to true to enable Watch Lists.

Configuring Watch Lists
new FXConfig()
      .fx(
        new FX()
          .features(
            new FXFeatures()
              .watchLists(
                new FXFeaturesWatchLists()
                  .enabled(true)
              )
          )
      );

FXSalesConfig

FXSalesConfig describes FX feature permissions for a sales user. It may only be requested by FX Sales for the logged-in user.

Currencies

This section lists the configuration options for currency pair permissions.

Function Description

FX.currencyPairs(java.util.Map<java.lang.String,FXCurrencyPair> currencyPairs)

Set a list of currency pairs the user has permission to trade with.

Configuring currency pairs
new FXSalesConfig()
      .fx(
        new FX()
          .currencyPairs(ImmutableList.of("GBPUSD", "USDJPY"))
      );

Historic Search

These are the configuration options for the Historic Search feature, configurable via HistoricSearch.

Function Description

HistoricSearch.searchFields(java.util.List<Field> searchFields)

Provide a list of fields a user can use to search by.

HistoricSearch.searchMode(HistoricSearchSearchMode searchMode)

Set the search mode to be used by Historic Search. Available options are:

  • SNAPSHOT – Historic Search returns a snapshot of the data at the time of searching.

  • STREAM – Historic Search continues to update the search results after a search is made.

Configuring Historic Search
new FXSalesConfig()
      .fx(
        new FX()
          .features(
            new FXFeatures()
              .historicSearch(
                new HistoricSearch()
                  .searchFields(ImmutableList.of(new Field()))
                  .searchMode(HistoricSearchSearchMode.STREAM)
              )
          )
      );

Sales Intervention

These are the configuration options for the Sales Intervention feature, configurable via FXFeaturesIntervention.

Function Description

FXFeaturesIntervention.enabled(java.lang.Boolean enabled)

Set to true to enable Sales Intervention.

Configuring Sales Intervention
new FXSalesConfig()
      .fx(
        new FX()
          .features(
            new FXFeatures()
              .intervention(
                new FXFeaturesIntervention()
                  .enabled(true)
              )
          )
      );

Order Strategies

These are the configuration options for the Order Strategies feature, configurable via FXFeaturesOrderStrategies.

Function Description

FXFeaturesOrderStrategies.enabled(java.lang.Boolean enabled)

Set to true to enable Order Strategies.

Configuring Order Strategies
new FXSalesConfig()
      .fx(
        new FX()
          .features(
            new FXFeatures()
              .orderStrategies(
                new FXFeaturesOrderStrategies()
                  .enabled(true)
              )
          )
      );

Post-Trade Allocation

These are the configuration options for the Post-Trade Allocation feature, configurable via FXFeaturesPostAllocation.

Function Description

FXFeaturesPostAllocation.enabled(java.lang.Boolean enabled)

Set to true to enable Post-Trade Allocation.

FXFeaturesPostAllocation.toboSelection(TOBOSelection toboSelection)

Specify from which source the Post-Trade Allocation entity dropdown options are populated.

  • CLIENT_SEARCH – use the same entity options as the client search.

  • USER_CONFIG – use entity options supplied by User Config.

Configuring Post-Trade Allocation
new FXSalesConfig()
      .fx(
        new FX()
          .features(
            new FXFeatures()
              .postAllocation(
                new FXFeaturesPostAllocation()
                  .enabled(true)
                  .toboSelection(TOBOSelection.USER_CONFIG)
              )
          )
      );

RFS (Request For Stream)

These are the configuration options for the RFS feature, configurable via FXFeaturesRfs.

Function Description

FXFeaturesRfs.blockTrading(FXFeaturesRfsBlockTrading blockTrading)

Supply an FXFeaturesRfsBlockTrading object to configure FX RFS Block trades.

Configuring RFS
new FXSalesConfig()
      .fx(
        new FX()
          .features(
            new FXFeatures()
              .rfs(
                new FXFeaturesRfs()
                  .blockTrading(new FXFeaturesRfsBlockTrading())
              )
          )
      );

MMConfig

MMConfig describes MM (Money Markets) feature permissions for a user, and for sales users acting on their behalf. It may be requested directly by FX Professional for the logged-in user, or by FX Sales when a sales user selects a user to trade on behalf of.

Currencies

This section lists the configuration options for currency permissions.

Function Description

MM.currencies(java.util.Map<java.lang.String,MoneyMarketsCurrency> currencies)

Set a list of currency pairs the user has permission to trade with.

Configuring currencies
new MMConfig()
      .mm(
        new MM()
          .currencies(ImmutableMap.of("GBP", new MoneyMarketsCurrency()))
      );

Historic Search

These are the configuration options for the Historic Search feature, configurable via HistoricSearch.

Function Description

HistoricSearch.searchFields(java.util.List<Field> searchFields)

Provide a list of fields a user can use to search by.

HistoricSearch.searchMode(HistoricSearchSearchMode searchMode)

Set the search mode to be used by Historic Search. Available options are:

  • SNAPSHOT – Historic Search returns a snapshot of the data at the time of searching.

  • STREAM – Historic Search continues to update the search results after a search is made.

Configuring Historic Search
new MMConfig()
      .mm(
        new MM()
          .features(
            new MMFeatures()
              .historicSearch(
                new HistoricSearch()
                  .searchFields(ImmutableList.of(new Field()))
                  .searchMode(HistoricSearchSearchMode.STREAM)
              )
          )
      );

RFS (Request For Stream)

These are the configuration options for the RFS feature, configurable via MMRfs.

Function Description

MMRfs.callDeposit(MMRfsCallDeposit callDeposit)

Supply an MMRfsCallDeposit object to configure MM RFS Call Deposits.

MMRfs.deposit(MMRfsDeposit deposit)

Supply an MMRfsDeposit object to configure MM RFS Deposits.

MMRfs.enabled(java.lang.Boolean enabled)

Set to true to enable MM RFS.

MMRfs.flexiNoticeDeposit(MMRfsFlexiNoticeDeposit flexiNoticeDeposit)

Supply an MMRfsFlexiNoticeDeposit object to configure MM RFS Flexi-Notice Deposits.

MMRfs.governmentBond(MMRfsGovernmentBond governmentBond)

Supply an MMRfsGovernmentBond object to configure MM RFS Government Bonds.

MMRfs.loan(MMRfsLoan loan)

Supply an MMRfsLoan object to configure MM RFS Loans.

MMRfs.paymentFrequency(MMRfsPaymentFrequency paymentFrequency)

Supply an MMRfsPaymentFrequency object to configure MM RFS payment frequency.

MMRfs.termDeposit(MMRfsTermDeposit termDeposit)

Supply an MMRfsTermDeposit object to configure MM RFS Term Deposits.

MMRfs.treasuryBill(MMRfsTreasuryBill treasuryBill)

Supply an MMRfsTreasuryBill object to configure MM RFS Treasury Bills.

Configuring RFS
new MMConfig()
      .mm(
        new MM()
          .features(
            new MMFeatures()
              .rfs(
                new MMRfs()
                  .callDeposit(new MMRfsCallDeposit())
                  .deposit(new MMRfsDeposit())
                  .enabled(true)
                  .flexiNoticeDeposit(new MMRfsFlexiNoticeDeposit())
                  .governmentBond(new MMRfsGovernmentBond())
                  .loan(new MMRfsLoan())
                  .paymentFrequency(new MMRfsPaymentFrequency())
                  .termDeposit(new MMRfsTermDeposit())
                  .treasuryBill(new MMRfsTreasuryBill())
              )
          )
      );

MMSalesConfig

MMSalesConfig describes MM feature permissions for a sales user. It may only be requested by FX Sales for the logged-in user.

Sales Intervention

These are the configuration options for the Sales Intervention feature, configurable via MMFeaturesIntervention.

Function Description

MMFeaturesIntervention.enabled(java.lang.Boolean enabled)

Set to true to enable MM Sales Intervention.

Configuring Sales Intervention
new MMSalesConfig()
      .mm(
        new MM()
          .features(
            new MMFeatures()
              .intervention(
                new MMFeaturesIntervention()
                  .enabled(true)
              )
          )
      );

CommoditiesConfig

CommoditiesConfig describes Commodities feature permissions for a user, and for sales users acting on their behalf. It may be requested directly by FX Professional for the logged-in user, or by FX Sales when a sales user selects a user to trade on behalf of.


See also: