Caplin FXIntegrationAPI Documentation - Version 3.47.0-2976-15da410

Message Builder Example - ForwardBlotterRecord

package com.caplin.examples.fxapi.generated.motif.fx.blotter.BlotterTypesDef; 

import java.math.BigInteger;

import com.caplin.generated.motif.fx.blotter.BlotterPartsDef;
import com.caplin.generated.motif.fx.blotter.BlotterTypesDef;
import com.caplin.generated.motif.fx.settlementinstructions.SettlementInstructionsPartsDef;
import com.caplin.generated.motif.fx.tradeconfirmation.TradeConfPartsDef;
import com.caplin.generated.motif.fx.tradeconfirmation.TradeConfTypesDef;

public class ForwardBlotterRecordExample {
    public static void main(String[] args) {
                    		
		BlotterTypesDef.ForwardBlotterRecord forwardBlotterRecord =
		BlotterTypesDef.ForwardBlotterRecord
			.newBuilder()
			.setCommonFields(
			BlotterPartsDef.CommonBlotterFields
				.newBuilder()
				.setBaseCurrency("USD")
				.setIsAmendable("")
				.setIsCancellable("")
				.setIsReversible(true)
				.setStatus("AWAITING-PRICE")
				.setTradingType("")
				.build())
			.setFwdTradeConfirmation(
			TradeConfTypesDef.ForwardTradeConfirmation
				.newBuilder()
				.setCommonFields(
				TradeConfPartsDef.CommonTradeConfirmationFields
					.newBuilder()
					.setAccount("", true)
					.setAccountEditable()
					.setAssetType("")
					.setCanAllocate(true)
					.setClient("")
					.setCostAmount("12412891.31")
					.setCostCurrency("GBP")
					.setCostCurrencyDPS("2")
					.setCostPercentage("13.56")
					.setCurrencyPair("")
					.setDealtCurrency("", true, true)
					.setDealtCurrencyEditable()
					.setDealtCurrencyRisk()
					.setDigitsBeforePips("2")
					.setEntityDescription("Customer 1")
					.setEntityId("CUSTONE")
					.setExecutionDateTime("20160322123621")
					.setIsAllocated(true)
					.setIsAmendable(true)
					.setIsCancellable(true)
					.setIsReversible(true)
					.setNumberOfPips("2")
					.setOrderID("")
					.setRemarks("")
					.setSpotMidRate(BigDecimal.valueOf(1.08345))
					.setSpotRate(BigDecimal.valueOf(1.08341))
					.setSpotRateDPS(5)
					.setTOBOUser("", true, true)
					.setTOBOUserEditable()
					.setTOBOUserRisk()
					.setTradeDate("20160314")
					.setTradeID("00001561")
					.setTraderUsername("sales_trader@novobank.co.za")
					.setTradingType("")
					.setWarningCode("001")
					.setWarningMessage("You do not have sufficient credit for EUR")
					.build())
				.setLegTradeConfirmation(
				TradeConfPartsDef.LegTradeConfirmationFields
					.newBuilder()
					.addRemarks(
					TradeConfPartsDef.RemarksEntry
						.newBuilder()
						.setRemarkDateTime(Instant.now())
						.setRemarkSource("")
						.build())
					.setAccount("Garfields|GARF")
					.setAllInMidRate(BigDecimal.valueOf(1.091790))
					.setAllInRate(BigDecimal.valueOf(1.091790))
					.setAllInRateDPS(5)
					.setAmount(BigDecimal.valueOf(0.0), true, true)
					.setAmountEditable()
					.setAmountRisk()
					.setBuySell("")
					.setContraAmount(BigDecimal.valueOf(350))
					.setCostAmount("12412891.31")
					.setFwdMidPoints(BigDecimal.valueOf(0.005390))
					.setFwdPips("11.98")
					.setFwdPoints("0.001198")
					.setNostroAccountFields(
					SettlementInstructionsPartsDef.NostroAccount
						.newBuilder()
						.setNostroAccount("AE770090004000824676500")
						.setNostroBIC("ARABAEADABC")
						.setNostroName("GBP Nostro Account.")
						.build())
					.setProfit("1000")
					.setRemarks(
					TradeConfPartsDef.RemarksEntry
						.newBuilder()
						.build(), 0)
					.setSettlementDate("", true, true)
					.setSettlementDateEditable()
					.setSettlementDateRisk()
					.setSettlementTradeFields(
					SettlementInstructionsPartsDef.SettlementTradeFields
						.newBuilder()
						.addPay(
						SettlementInstructionsPartsDef.SettlementFields
							.newBuilder()
							.setBankAccount("12345678")
							.setBankAddress1("12 Capitol")
							.setBankAddress2("The City")
							.setBankAddress3("London")
							.setBankName("Bank Of Caplin")
							.setBankSwift("CAP123")
							.setIndividualAccount("87654321")
							.setIndividualAddress1("98 Lane")
							.setIndividualAddress2("Manchester")
							.setIndividualName("Susan Sellers")
							.setIndividualSwift("SOLD987")
							.setIsDefaultSettlementInstruction(true)
							.setNettingStatus("NETTED")
							.setSettlementAmount(BigDecimal.valueOf(0.0))
							.setSettlementCurrency("GBP")
							.setSettlementDetailsLine1("")
							.setSettlementDetailsLine2("")
							.setSettlementDetailsLine3("")
							.setSettlementDetailsLine4("")
							.setSettlementDirection("")
							.setSettlementDisplayName("[CCY] Account 1")
							.setSettlementId("")
							.setSettlementInstructionType("EXISTING")
							.setSettlementStatus("")
							.setSplitComponentId("")
							.build())
						.addPayNettingComponents(
						SettlementInstructionsPartsDef.NettingComponents
							.newBuilder()
							.setAmount("0")
							.setBuySell("")
							.setTradeID("00001561")
							.build())
						.addReceive(
						SettlementInstructionsPartsDef.SettlementFields
							.newBuilder()
							.build())
						.addReceiveNettingComponents(
						SettlementInstructionsPartsDef.NettingComponents
							.newBuilder()
							.build())
						.setAffirmedBy("")
						.setAffirmedDateTime(Instant.now())
						.setCanAdHoc("")
						.setCanAffirm("")
						.setCanAutoConfirm("")
						.setCanCancel(true)
						.setCanConfirm("")
						.setCanDispute(true)
						.setCanReplace("")
						.setCanUnconfirm("")
						.setConfirmedBy("")
						.setConfirmedDateTime(Instant.now())
						.setIsPayNetted(true)
						.setIsPayNettingRequired("")
						.setIsPaySplit(true)
						.setIsReceiveNetted("")
						.setIsReceiveNettingRequired("")
						.setIsReceiveSplit(true)
						.setNextActionDeadline("2018-03-16T07:25:16+00:00")
						.setNextActionDeadlineDisplayTimezone("America/New_York")
						.setSettlementStatus("")
						.build())
					.setTenor("", true, true)
					.setTenorEditable()
					.setTenorRisk()
					.build())
				.setNdfLegTradeConfirmation(
				TradeConfPartsDef.NDFLegTradeConfirmationFields
					.newBuilder()
					.setFixingAmount(BigDecimal.valueOf(0.0))
					.setFixingCode("[CCY]1/1600/GBLO")
					.setFixingCurrency("USD")
					.setFixingDate("20150620")
					.setFixingDescription("WMR [CCY] 4pm London")
					.setReferenceAmount("")
					.setReferenceCurrency("")
					.setSettlementAmount(BigDecimal.valueOf(0.0))
					.setSettlementCurrency("GBP")
					.build())
				.setTimeOptionLegTradeConfirmation(
				TradeConfPartsDef.TimeOptionLegTradeConfirmationFields
					.newBuilder()
					.setFilledAmount("0")
					.setRemainingAmount(BigDecimal.valueOf(500))
					.setRiskDate("20160314")
					.setRiskTenor("1W")
					.setStartDate("20150620")
					.setStartTenor("1W")
					.build())
				.build())
			.build();
            
    }
}