RET Adapter Toolkit upgrade guide: v2 to v3
The document provides guidance on migrating from version 2 to version 3 of the RET Adapter Toolkit.
The RET Adapter Toolkit Version 3 is based on the FX Integration API Version 3. For more information on upgrading to the FX Integration API version 3, see FX Integration API upgrade guide: v2 to v3.
Requirements
RET Adapter Toolkit Version 3 requires:
-
Java:
RET Adapter Toolkit version Supported JVMs (64-bit) 3.12.0
Oracle Java 8 (<= 8u202), Red Hat OpenJDK 8
3.0.0–3.11.0
Oracle Java 8 (<= 8u202)
-
FX Integration API version 3
Breaking changes
Breaking changes have been introduced in the following components.
Relocated classes
The following classes have moved to a new location:
FX Integration API 2 | FX Integration API 3 | |
---|---|---|
A number of internal classes in the FX Integration API 2 have been relocated to the com.caplin.motif package in the FX Integration API 3. Do not use these classes; they are internal classes and may be changed in a later release.
|
The classes for RFS trading and ESP trading are now generated from trade-model definitions. These generated classes are housed under the com.caplin.generated
namespace:
FX Integration API 2 | FX Integration API 3 | |
---|---|---|
For more information about the new generated RFS and ESP Trading API, see Trading API in the FX Integration API v2 to v3 upgrade guide.
New inheritance model
The FX Integration API v3 classes ESPTrade
, RFSTrade
, and BlockTrade
now inherit from com.caplin.motif.UserTrade
instead of com.caplin.motif.fx.trading.FXTrade
, as they did in the FX Integration API v2.
-
To access standard fields in a trade, use the standard trade event classes (for example,
com.caplin.generated.motif.fx.trading.rfs.events.client.SubmitTradeEvent
). -
To access the individual legs of a swap, use the
getLegById(int)
method on the standard trade event classes. See the example below for an RFSSubmitTradeEvent
:public void onSubmit(final SubmitTradeEvent submitEvent) { submitEvent.getLegById(1); if (submitEvent.isSwap()) { submitEvent.getLegById(2); } }
The isSwap()
method is only available on RFS submit events. -
To access custom fields in a trade, use
UserTrade.getBackingTrade().getField(…)
-
To access the trading protocol, use
UserTrade.getBackingTrade().getFields("TradingProtocol")
Deleted classes
The following FX Integration API 2 classes are no longer included in the FX Integration API 3:
FX Integration API 2 | FX Intregration API 3 | |
---|---|---|
To retrieve trade legs, use the |
||
For information and examples on building quotes using the FX Integration API 3, see Rates and Code examples in the FX Integration API v2 to v3 Upgrade Guide. |
RET Adapter Toolkit v2 | RET Adapter Toolkit v3 | |
---|---|---|
|
The constructors for the following RET Adapter Toolkit factories no longer take a |
Changed method signatures
The following method signatures have changed:
RET Adapter Toolkit 2 | RET Adapter Toolkit 3 | |
---|---|---|
New method return types
In the FX Integration API v3, quote objects, and quote parts, now implement the com.caplin.motif.datasource.Message
interface rather than the com.caplin.motif.fx.rates.FXQuote
interface.
In accordance with the FX Integration API v3, the following RET Adapter Toolkit quote factory methods now return a Message
object instead of an FXQuote
object:
-
QuoteFactory.createFwdQuote(…)
, implemented byDefaultQuoteFactory
-
QuoteFactory.createSpotQuote(…)
, implemented byDefaultQuoteFactory
-
BlockQuoteFactory.createBlockQuote(…)
, implemented byDefaultBlockQuoteFactory
-
SwapQuoteFactory.createSwapQuote(…)
, implemented byDefaultSwapQuoteFactory
-
SalesQuoteFactory.createSalesFwdQuote(…)
, implemented byDefaultSalesQuoteFactory
-
SalesQuoteFactory.createSalesSpotQuote(…)
, implemented byDefaultSalesQuoteFactory
-
SalesSwapQuoteFactory.createSalesSwapQuote(…)
, implemented byDefaultSalesSwapQuoteFactory
com.motif.fx.trading.FXTradingType
The definition of com.caplin.motif.fx.trading.FXTradingType
has changed over FX Integration API versions:
FX integration API 2 | FX Integration API 3 | |
---|---|---|
The values for FXTradingType.TIME_OPTION
and FXTradingType.FWD
have changed in the FX Integration API 3.4:
FX Integration API 2 | FX Integration API 3 | |
---|---|---|
|
"TIME OPTION" |
"TIME_OPTION" |
|
"FORWARD" |
"FWD" |
The new values are disabled by default to maintain compatibility with front-end applications that use the old values. To enable the new values, add the following configuration to the adapter.properties file: use_legacy_trading_types_format=false
|
New classes for block trading
Block trading uses new classes:
RET Adapter Toolkit 2 | RET Adapter Toolkit 3 | |
---|---|---|
FX Integration API 2 | FX Integration API 3 | |
---|---|---|
New classes for ESP and RFS trading
The RET Adapter Toolkit v3 uses the toolkit’s RFSStateEvent
class in place of the FX Integration API v2 class, FXResponder
.
The following classes have changed with the upgrade of the FX Integration API from v2 to v3:
FX Integration API 2 | FX Integration API 3 | |
---|---|---|