Configuring RET adapters

Each example adapter under the RET Adapter Toolkit’s examples directory has four core configuration files.

Application configuration

The file global_config/overrides/<adapter>/etc/adapter.properties contains application configuration for each adapter.

For detailed descriptions of all application configuration options, see Configuration file: adapter.properties.

Example adapter.properties file for a RET LBN adapter
# Time gap between two trades for the same currency
# one_click_gap_time=

# Time interval for JMX statistics publishing
# jmx_publish_interval=

# Error messages from RET
# message_translation=

# Enables the director user manager
use_director_user_manager=false

# How many days to fetch for historic blotter and hour when to restart the adapter
historic_blotter_days_to_fetch=7
#blotter_rollover_hour=0

# Set this if you want the executed & historic blotters to show
# only the completed deals. Otherwise don't set these attributes
# because by default they are both false.
executed_blotter_display_only_completed_deals=true
historic_blotter_display_only_completed_deals=true

# These are the precious metal unit conversions.
metal_conversion=XAUUSD:[KG 995, 31.99], [KG 999, 32.12], [KG 9999, 32.148], [100G 999, 3.212], [10 TOLA, 3.746]
metal_conversion=XAGUSD:[KG,32.1507], [TON, 32150.7]
metal_conversion=XPTUSD:[KG, 32.150722]
metal_conversion=XPDUSD:[KG, 32.150722]

DataSource connection configuration

The file global_config/overrides/<adapter>/etc/datasource.conf contains configuration for each adapter’s Caplin DataSource library.

For detailed descriptions of all available DataSource configuration options, see DataSource Configuration: Introduction.

Example datasource.conf file for a RET LBN adapter
##################################################
#
# JMX configuration
#
rmi-registry-port    ${THIS_LEG}028
rmi-client-port      ${THIS_LEG}038


##################################################
#
# Local DataSource peer-id
#
datasrc-id            ${THIS_LEG}026


##################################################
#
# Liberator peer
#
add-peer
        local-type              active|contrib
        remote-name             liberator${THIS_LEG}
        remote-id               ${LIBERATOR${THIS_LEG}_DATASRCID}
        addr                    ${LIBERATOR${THIS_LEG}_HOST}
        port                    ${LIBERATOR${THIS_LEG}_DATASRCPORT}
        heartbeat-time          15
        heartbeat-slack-time    5
end-peer

if "${FAILOVER}" == "ENABLED"
        add-peer
                local-type              active|contrib
                remote-name             liberator${OTHER_LEG}
                remote-id               ${LIBERATOR${OTHER_LEG}_DATASRCID}
                addr                    ${LIBERATOR${OTHER_LEG}_HOST}
                port                    ${LIBERATOR${OTHER_LEG}_DATASRCPORT}
                heartbeat-time          15
                heartbeat-slack-time    5
        end-peer
endif


##################################################
#
# Transformer peer
#
add-peer
        local-type              active|contrib
        remote-name             transformer${THIS_LEG}
        remote-id               ${TRANSFORMER${THIS_LEG}_DATASRCID}
        addr                    ${TRANSFORMER${THIS_LEG}_HOST}
        port                    ${TRANSFORMER${THIS_LEG}_DATASRCPORT}
        heartbeat-time          15
        heartbeat-slack-time    5
end-peer

if "${FAILOVER}" == "ENABLED"
        add-peer
                local-type              active|contrib
                remote-name             transformer${OTHER_LEG}
                remote-id               ${TRANSFORMER${OTHER_LEG}_DATASRCID}
                addr                    ${TRANSFORMER${OTHER_LEG}_HOST}
                port                    ${TRANSFORMER${OTHER_LEG}_DATASRCPORT}
                heartbeat-time          15
                heartbeat-slack-time    5
        end-peer
endif

##################################################
#
# Director peer
#
if "${DIRECTOR}" == "ENABLED"
	add-peer
	        local-type              active|contrib
	        remote-name             Director
	        addr                    ${DIRECTOR_HOST}
	        port                    ${DIRECTOR_DATASRCPORT}
	        heartbeat-time          15
	        heartbeat-slack-time    5
	end-peer
endif

TrAPI connection configuration

The file global_config/overrides/<adapter>/etc/trapi-connection.properties contains configuration for each each adapter’s connection to RET.

For information on TrAPI configuration options, see Configuration file: trapi-connection.properties.

Example trapi-connection.properties file for a RET LBN adapter
[common]
host=192.168.1.50
port=8912
reconnection_exponential_initial_interval=5
reconnection_exponential_max_interval=600

[LBNConnection]
username=lbn_proxy
password=letmein
order_type=LBN

[AdminConnection]
username=lbn_admin
password=letmein
order_type=admin