# TREP Adapter

The Caplin TREP Adapter enables Caplin Liberator, or any Caplin product connected to the DataSource API, to request data from the Refinitiv market data system.

## Features

### Record name mapping

The TREP Adapter can be configured to map record names passed into it into a different format. This can either be used to simply make it a valid RTTP record name, or to create a complex directory structure of records.

Also, the TREP Adapter provides a mechanism for mapping the '/' character. This character is used as a directory separator in RTTP but is a valid character for Refinitiv symbol names. For more information, see [Map](trep-map.md).

### Requesting domains

A symbol may be requested under various domains. The currently supported domains are

* Market Price (MP)
* Market by Order/Order Book (MBO)
* Market by Price/Market Depth (MBP)

To request a particular domain for a symbol the abbreviation must be prepended to the RIC with a colon ( `:` ) as shown below.

**📌 NOTE**\
Market Price is the default domain so it’s not necessary to use "MP" when requesting for that domain.

**Example (Vodafone)**

| Symbol | Domain |
| --- | --- |
| /I/VOD.L .2+.^ | Market Price (MP) |
| /I/MP:VOD.L | /I/MBO:VOD.L |
| Market by Order (MBO) | /I/MBP:VOD.L |

### Subscription management

The TREP Adapter shares the load of user subscriptions among multiple threads as configured by the user. For more information, see [Threads](trep-threads.md).

### Charting

The TREP Adapter can handle Refinitiv charting data.

For details on how to configure how charting data is stored, see [TS1](trep-ts1.md).

### Enumerated field values

For details on how to use enumerated field values, see [Enumerated field values](trep-enumerated-field-values.md).

### Configuration generation

The TREP Adapter can be used to generate Caplin configuration from Refinitiv dictionary information. For more information, see [Generating Caplin configuration](trep-generating-configuration.md).

### Connecting to peers

The TREP Adapter starts in a disconnected state and will only connect to peers when its connection to Refinitiv is stable.

### Automatic disconnection on failover

The TREP Adapter will disconnect from all its peers if a specified service goes down.

For details on how to configure which service’s failure should cause disconnection, see [upa-priority-service](trep-service.md#upa-priority-service).
