Caplin FXIntegrationAPI Documentation - Version 8.9.0
Message Builder Example - SalesCommonFields
package com.caplin.examples.fxapi.generated.motif.fx.rates.QuotePartsDef;
import java.math.BigInteger;
import com.caplin.generated.motif.fx.rates.QuotePartsDef;
public class SalesCommonFieldsExample {
public static void main(String[] args) {
QuotePartsDef.SalesCommonFields salesCommonFields =
QuotePartsDef.SalesCommonFields
.newBuilder()
.setComponent1(
QuotePartsDef.SalesSyntheticComponentFields
.newBuilder()
.setCurrencyPair("")
.setDigitsBeforePips("2")
.setNumberOfPips("2")
.setSpotMidRate(BigDecimal.valueOf(1.08345))
.setSpotRateDPS(5)
.setTraderSpotAskRate(BigDecimal.valueOf(1.08575))
.setTraderSpotBidRate(BigDecimal.valueOf(1.08575))
.build())
.setComponent2(
QuotePartsDef.SalesSyntheticComponentFields
.newBuilder()
.build())
.setDefaultSpotAskMargin(BigDecimal.valueOf(0.00054))
.setDefaultSpotBidMargin(BigDecimal.valueOf(0.00054))
.setProfitAskRate("1.090098")
.setProfitBidRate(BigDecimal.valueOf(1.091790))
.setProfitCurrency("USD")
.setProfitCurrencyDPS("5")
.setProfitIsHouse("")
.setReasons("")
.setSyntheticCrossCurrency("GBP")
.setTraderSpotAskRate("1.08575")
.setTraderSpotBidRate(BigDecimal.valueOf(1.08575))
.build();
}
}