# User Config API reference

This page is a reference to the configuration options found on the User Config classes.

## Config

[`Config`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/config/definitions/client/Config.html) describes application and account settings for the logged-in user.

| Function | Description |
| --- | --- |
| [`Config.application(Application application)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/config/definitions/client/Config.html#application(com.caplin.motif.config.definitions.client.Application)) | Configure client applications for the user. |
| [`Config.defaultAccounts(java.util.Map<java.lang.String,Account> defaultAccounts)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/config/definitions/client/Config.html#defaultAccounts(java.util.Map)) | Configure accounts that belong to the user. |
| [`Config.tobo(TOBO tobo)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/config/definitions/client/Config.html#tobo(com.caplin.motif.config.definitions.common.TOBO)) | Configure accounts the user can trade on behalf of. |
| [`Config.userInfo(UserInfo userInfo)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/config/definitions/client/Config.html#userInfo(com.caplin.motif.config.definitions.client.UserInfo)) | Configure the logged-in user. |

**Example configuration**

```java
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`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXConfig.html) 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)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FX.html#currencies(java.util.Map)) | 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)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FX.html#currencyPairs(java.util.Map)) | A list of currency pairs the user has permission to trade with. Takes precedence over `currencies`. |

**Configuring currency pairs**

```java
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`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXFeaturesCharts.html).

| Function | Description |
| --- | --- |
| [`FXFeaturesCharts.enabled(java.lang.Boolean enabled)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXFeaturesCharts.html#enabled(java.lang.Boolean)) | Set to `true` to enable Charts. |

**Configuring Charts**

```java
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`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXFeaturesCoverTrade.html).

|     |     |
| --- | --- |
| Function | Description |
| [`FXFeaturesCoverTrade.enabled(java.lang.Boolean enabled)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXFeaturesCoverTrade.html#enabled(java.lang.Boolean)) | Set to `true` to enable Cover Trade. |

**Configuring Cover Trade**

```java
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`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXEsp.html).

| Function | Description |
| --- | --- |
| [`FXEsp.defaultDeliverableType(DeliverableType defaultDeliverableType)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXEsp.html#defaultDeliverableType(com.caplin.motif.config.definitions.common.DeliverableType)) | Set the deliverable type that is selected by default in the FX Tile. Available options are: `NON_DELIVERABLE`, `DELIVERABLE` |
| [`FXEsp.single(FXEspSingle single)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXEsp.html#single(com.caplin.motif.fx.config.definitions.client.FXEspSingle)) | Provide an `FXEspSingle` object to configure FX ESP single-leg trades. See the example below. |
| [`FXEsp.submitActions(java.util.List<FXEsp.SubmitActionsEnum> submitActions)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXEsp.html#submitActions(java.util.List)) | 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)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXEsp.html#submitActionSwitchEnabled(java.lang.Boolean)) | Set to `true` to allow users to switch between actions provided by `FXEsp.submitActions`. |
| [`FXEsp.twoWayEnabled(java.lang.Boolean twoWayEnabled)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXEsp.html#twoWayEnabled(java.lang.Boolean)) | Set to `true` to allow users to switch between one-way and two-way outright modes on the FX Tile. |

**Configuring ESP**

```java
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)
                      )
                    )
                  )
              )
          )
      );
```

### Historic Search

These are the configuration options for the Historic Search feature, configurable via [`HistoricSearch`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/config/definitions/common/HistoricSearch.html).

| Function | Description |
| --- | --- |
| [`HistoricSearch.searchFields(java.util.List<Field> searchFields)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/config/definitions/common/HistoricSearch.html#searchFields(java.util.List)) | Provide a list of fields a user can search by. |
| [`HistoricSearch.searchMode(HistoricSearchSearchMode searchMode)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/config/definitions/common/HistoricSearch.html#searchMode(com.caplin.motif.config.definitions.common.HistoricSearchSearchMode)) | 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**

```java
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`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXStrategy.html).

| Function | Description |
| --- | --- |
| [`FXStrategy.activationDateEnabled(java.lang.Boolean activationDateEnabled)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXStrategy.html#activationDateEnabled(java.lang.Boolean)) | Set to `true` to enable the GFA/Custom toggle control and activation input fields in the React Order Ticket. |
| [`FXStrategy.ifDone(OrderStrategy ifDone)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXStrategy.html#ifDone(com.caplin.motif.fx.config.definitions.client.OrderStrategy)) | 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)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXStrategy.html#ifDoneLoop(com.caplin.motif.fx.config.definitions.client.OrderStrategy)) | 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)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXStrategy.html#ifDoneOCO(com.caplin.motif.fx.config.definitions.client.OrderStrategy)) | 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)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXStrategy.html#loop(com.caplin.motif.fx.config.definitions.client.OrderStrategy)) | 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)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXStrategy.html#oco(com.caplin.motif.fx.config.definitions.client.OrderStrategy)) | 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)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXStrategy.html#single(com.caplin.motif.fx.config.definitions.client.OrderStrategy)) | For single-leg orders. Provide an enabled `OrderStrategy` object with a list of OrderTypes this strategy should apply to. |

**Configuring Order Strategies**

```java
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`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXFeaturesPostAllocation.html).

| Function | Description |
| --- | --- |
| [`FXFeaturesPostAllocation.enabled(java.lang.Boolean enabled)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXFeaturesPostAllocation.html#enabled(java.lang.Boolean)) | Set to `true` to enable Post-Trade Allocation. |
| [`FXFeaturesPostAllocation.toboSelectionDisplayEntity(java.lang.Boolean toboSelectionDisplayEntity)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXFeaturesPostAllocation.html#toboSelectionDisplayEntity(java.lang.Boolean)) | Set to `true` to display the entity column in Post-Trade Allocation. |

**Configuring Post-Trade Allocation**

```java
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`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXRfs.html).

| Function | Description |
| --- | --- |
| [`FXRfs.block(FXRfsBlock block)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXRfs.html#block(com.caplin.motif.fx.config.definitions.client.FXRfsBlock)) | Supply an `FXRfsBlock` object to configure FX RFS block trades. |
| [`FXRfs.defaultDeliverableType(DeliverableType defaultDeliverableType)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXRfs.html#defaultDeliverableType(com.caplin.motif.config.definitions.common.DeliverableType)) | Set the default deliverable type that is selected by default in the FX Ticket. Available options are: `NON_DELIVERABLE`, `DELIVERABLE`. |
| [`FXRfs.parForward(FXRfsParForward parForward)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXRfs.html#parForward(com.caplin.motif.fx.config.definitions.client.FXRfsParForward)) | Supply an `FXRfsParForward` object to configure FX RFS Par Forward trades. |
| [`FXRfs.single(FXRfsSingle single)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXRfs.html#single(com.caplin.motif.fx.config.definitions.client.FXRfsSingle)) | 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)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXRfs.html#swap(com.caplin.motif.fx.config.definitions.client.FXRfsSwap)) | 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)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXRfs.html#twoWayEnabled(java.lang.Boolean)) | Set to `true` to allow users to switch between one-way and two-way outright modes in the FX Ticket. |

**Configuring RFS**

```java
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`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXFeaturesSettlementInstructions.html).

| Function | Description |
| --- | --- |
| [`FXFeaturesSettlementInstructions.adHocEnabled(java.lang.Boolean adHocEnabled)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXFeaturesSettlementInstructions.html#adHocEnabled(java.lang.Boolean)) | Set to true to allow users to add ad-hoc Settlement Instructions to trades. |
| [`FXFeaturesSettlementInstructions.createEnabled(java.lang.Boolean createEnabled)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXFeaturesSettlementInstructions.html#createEnabled(java.lang.Boolean)) | Set to true to allow users to create new Settlement Instructions. |
| [`FXFeaturesSettlementInstructions.preTradeEnabled(java.lang.Boolean preTradeEnabled)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXFeaturesSettlementInstructions.html#preTradeEnabled(java.lang.Boolean)) | Set to true to allow users to add Settlement Instructions pre-trade. |

**Configuring Settlement Instructions**

```java
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`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXFeaturesWatchLists.html).

| Function | Description |
| --- | --- |
| [`FXFeaturesWatchLists.enabled(java.lang.Boolean enabled)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/client/FXFeaturesWatchLists.html#enabled(java.lang.Boolean)) | Set to `true` to enable Watch Lists. |

**Configuring Watch Lists**

```java
new FXConfig()
      .fx(
        new FX()
          .features(
            new FXFeatures()
              .watchLists(
                new FXFeaturesWatchLists()
                  .enabled(true)
              )
          )
      );
```

## FXSalesConfig

[`FXSalesConfig`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/sales/FXSalesConfig.html) 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)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/sales/FX.html#currencyPairs(java.util.List)) | Set a list of currency pairs the user has permission to trade with. |

**Configuring currency pairs**

```java
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`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/config/definitions/common/HistoricSearch.html).

| Function | Description |
| --- | --- |
| [`HistoricSearch.searchFields(java.util.List<Field> searchFields)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/config/definitions/common/HistoricSearch.html#searchFields(java.util.List)) | Provide a list of fields a user can use to search by. |
| [`HistoricSearch.searchMode(HistoricSearchSearchMode searchMode)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/config/definitions/common/HistoricSearch.html#searchMode(com.caplin.motif.config.definitions.common.HistoricSearchSearchMode)) | 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**

```java
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`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/sales/FXFeaturesIntervention.html).

| Function | Description |
| --- | --- |
| [`FXFeaturesIntervention.enabled(java.lang.Boolean enabled)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/sales/FXFeaturesIntervention.html#enabled(java.lang.Boolean)) | Set to `true` to enable Sales Intervention. |

**Configuring Sales Intervention**

```java
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`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/sales/FXFeaturesOrderStrategies.html).

| Function | Description |
| --- | --- |
| [`FXFeaturesOrderStrategies.enabled(java.lang.Boolean enabled)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/fx/config/definitions/sales/FXFeaturesOrderStrategies.html#enabled(java.lang.Boolean)) | Set to `true` to enable Order Strategies. |

**Configuring Order Strategies**

```java
new FXSalesConfig()
      .fx(
        new FX()
          .features(
            new FXFeatures()
              .orderStrategies(
                new FXFeaturesOrderStrategies()
                  .enabled(true)
              )
          )
      );
```

## MMConfig

[`MMConfig`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/mm/config/definitions/client/MMConfig.html) 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)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/mm/config/definitions/client/MM.html#currencies(java.util.Map)) | Set a list of currency pairs the user has permission to trade with. |

**Configuring currencies**

```java
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`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/config/definitions/common/HistoricSearch.html).

| Function | Description |
| --- | --- |
| [`HistoricSearch.searchFields(java.util.List<Field> searchFields)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/config/definitions/common/HistoricSearch.html#searchFields(java.util.List)) | Provide a list of fields a user can use to search by. |
| [`HistoricSearch.searchMode(HistoricSearchSearchMode searchMode)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/config/definitions/common/HistoricSearch.html#searchMode(com.caplin.motif.config.definitions.common.HistoricSearchSearchMode)) | 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**

```java
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`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/mm/config/definitions/client/MMRfs.html).

| Function | Description |
| --- | --- |
| [`MMRfs.callDeposit(MMRfsCallDeposit callDeposit)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/mm/config/definitions/client/MMRfs.html#callDeposit(com.caplin.motif.mm.config.definitions.client.MMRfsCallDeposit)) | Supply an `MMRfsCallDeposit` object to configure MM RFS Call Deposits. |
| [`MMRfs.deposit(MMRfsDeposit deposit)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/mm/config/definitions/client/MMRfs.html#deposit(com.caplin.motif.mm.config.definitions.client.MMRfsDeposit)) | Supply an `MMRfsDeposit` object to configure MM RFS Deposits. |
| [`MMRfs.enabled(java.lang.Boolean enabled)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/mm/config/definitions/client/MMRfs.html#enabled(java.lang.Boolean)) | Set to `true` to enable MM RFS. |
| [`MMRfs.flexiNoticeDeposit(MMRfsFlexiNoticeDeposit flexiNoticeDeposit)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/mm/config/definitions/client/MMRfs.html#flexiNoticeDeposit(com.caplin.motif.mm.config.definitions.client.MMRfsFlexiNoticeDeposit)) | Supply an `MMRfsFlexiNoticeDeposit` object to configure MM RFS Flexi-Notice Deposits. |
| [`MMRfs.governmentBond(MMRfsGovernmentBond governmentBond)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/mm/config/definitions/client/MMRfs.html#governmentBond(com.caplin.motif.mm.config.definitions.client.MMRfsGovernmentBond)) | Supply an `MMRfsGovernmentBond` object to configure MM RFS Government Bonds. |
| [`MMRfs.loan(MMRfsLoan loan)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/mm/config/definitions/client/MMRfs.html#loan(com.caplin.motif.mm.config.definitions.client.MMRfsLoan)) | Supply an `MMRfsLoan` object to configure MM RFS Loans. |
| [`MMRfs.paymentFrequency(MMRfsPaymentFrequency paymentFrequency)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/mm/config/definitions/client/MMRfs.html#paymentFrequency(com.caplin.motif.mm.config.definitions.client.MMRfsPaymentFrequency)) | Supply an `MMRfsPaymentFrequency` object to configure MM RFS payment frequency. |
| [`MMRfs.termDeposit(MMRfsTermDeposit termDeposit)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/mm/config/definitions/client/MMRfs.html#termDeposit(com.caplin.motif.mm.config.definitions.client.MMRfsTermDeposit)) | Supply an `MMRfsTermDeposit` object to configure MM RFS Term Deposits. |
| [`MMRfs.treasuryBill(MMRfsTreasuryBill treasuryBill)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/mm/config/definitions/client/MMRfs.html#treasuryBill(com.caplin.motif.mm.config.definitions.client.MMRfsTreasuryBill)) | Supply an `MMRfsTreasuryBill` object to configure MM RFS Treasury Bills. |

**Configuring RFS**

```java
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`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/mm/config/definitions/sales/MMSalesConfig.html) 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`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/mm/config/definitions/sales/MMFeaturesIntervention.html).

| Function | Description |
| --- | --- |
| [`MMFeaturesIntervention.enabled(java.lang.Boolean enabled)`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/mm/config/definitions/sales/MMFeaturesIntervention.html#enabled(java.lang.Boolean)) | Set to `true` to enable MM Sales Intervention. |

**Configuring Sales Intervention**

```java
new MMSalesConfig()
      .mm(
        new MM()
          .features(
            new MMFeatures()
              .intervention(
                new MMFeaturesIntervention()
                  .enabled(true)
              )
          )
      );
```

## CommoditiesConfig

[`CommoditiesConfig`](https://docs.caplin.com/developer/api/fxintegration/latest/com/caplin/motif/commodities/config/definitions/client/CommoditiesConfig.html) 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:**

* [User Config](fxapi-user-config.md)
* [User Config Adapters](fxapi-user-config-adapters.md)
* [Implementing User Config](fxapi-implementing-user-config.md)
