Caplin FXIntegrationAPI Documentation - Version 8.9.0
Message Builder Example - CommonTradeConfirmationFields
package com.caplin.examples.fxapi.generated.motif.fx.tradeconfirmation.TradeConfPartsDef;
import java.math.BigInteger;
import static com.caplin.motif.fx.config.definitions.common.Tag;
import com.caplin.generated.motif.fx.tradeconfirmation.TradeConfPartsDef;
public class CommonTradeConfirmationFieldsExample {
public static void main(String[] args) {
TradeConfPartsDef.CommonTradeConfirmationFields commonTradeConfirmationFields =
TradeConfPartsDef.CommonTradeConfirmationFields
.newBuilder()
.setAccount("Garfields|GARF")
.setAccountEditable()
.setAllocationSettlementDateOptions("ORIGINAL,EARLIER,LATER")
.setAmountDPS("2")
.setAssetType("")
.setBackOfficeID("")
.setCanAllocate("")
.setCanDrawdown("")
.setClient("")
.setClientAgreementDateTime(Instant.now(), true)
.setClientAgreementDateTimeEditable()
.setContraAmountDPS("2")
.setContraCostAmount(BigDecimal.valueOf(0.0))
.setContraCostCurrency("GBP")
.setContraCostCurrencyDPS(2)
.setContraCostPercentage(BigDecimal.valueOf(13.56))
.setCostAmount("12412891.31")
.setCostCurrency("GBP")
.setCostCurrencyDPS(2)
.setCostPercentage(BigDecimal.valueOf(13.56))
.setCurrencyPair("")
.setDealtCurrency("", true, true)
.setDealtCurrencyEditable()
.setDealtCurrencyRisk()
.setDeliverableType("")
.setDigitsBeforePips(2)
.setEntityDescription("Customer 1")
.setEntityId("CUSTONE")
.setExecutionDateTime("20160322123621")
.setFullName("")
.setHasPostTradeHistory("")
.setIsAllocated(true)
.setIsAmendable("")
.setIsCancellable("")
.setIsReversible(true)
.setNumberOfPips("2")
.setOrderID("")
.setOriginalTradeID("")
.setPostTradeType("")
.setPriceSource("st1@caplin.com")
.setPurpose("Commercial")
.setRemarks("")
.setServiceContraCostCurrencyDPS("2")
.setServiceCostCurrencyDPS("2")
.setSpotMidRate("1.08345")
.setSpotRate("1.08341")
.setSpotRateDPS(5)
.setStatus("AWAITING-PRICE")
.setTOBOUser("client@customer.co.za")
.setTOBOUserEditable()
.setTOBOUserRisk()
.setTags(Arrays.asList(/* ... */))
.setTradeDate("20160314")
.setTradeID("00001561")
.setTraderUsername("sales_trader@novobank.co.za")
.setTradingType("")
.setUTI("")
.setVenue("FX Sales")
.setWarningCode("001")
.setWarningMessage("You do not have sufficient credit for EUR")
.build();
}
}