Caplin FXIntegrationAPI Documentation - Version 3.51.0-3064-772a4c6

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(true)
				.setIsCancellable(true)
				.setIsReversible(true)
				.setStatus("AWAITING-PRICE")
				.setTradingType("")
				.build())
			.setFwdTradeConfirmation(
			TradeConfTypesDef.ForwardTradeConfirmation
				.newBuilder()
				.setCommonFields(
				TradeConfPartsDef.CommonTradeConfirmationFields
					.newBuilder()
					.setAccount("", true)
					.setAccountEditable()
					.setAssetType("")
					.setCanAllocate("")
					.setClient("")
					.setCostAmount(BigDecimal.valueOf(12412891.31))
					.setCostCurrency("GBP")
					.setCostCurrencyDPS(2)
					.setCostPercentage(BigDecimal.valueOf(13.56))
					.setCurrencyPair("")
					.setDealtCurrency("", true, true)
					.setDealtCurrencyEditable()
					.setDealtCurrencyRisk()
					.setDigitsBeforePips("2")
					.setEntityDescription("Customer 1")
					.setEntityId("CUSTONE")
					.setExecutionDateTime("20160322123621")
					.setIsAllocated(true)
					.setIsAmendable("")
					.setIsCancellable("")
					.setIsReversible(true)
					.setNumberOfPips("2")
					.setOrderID("")
					.setRemarks("")
					.setSpotMidRate(BigDecimal.valueOf(1.08345))
					.setSpotRate(BigDecimal.valueOf(1.08341))
					.setSpotRateDPS(5)
					.setStreamingMode("MANUAL, STREAMING")
					.setTOBOUser("", true, true)
					.setTOBOUserEditable()
					.setTOBOUserRisk()
					.setTradeDate("20160314")
					.setTradeID("00001561")
					.setTraderSpotAskRate("1.08575")
					.setTraderSpotBidRate(BigDecimal.valueOf(1.08575))
					.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("", true, true)
					.setAmountEditable()
					.setAmountRisk()
					.setBuySell("")
					.setContraAmount(BigDecimal.valueOf(350))
					.setCostAmount("12412891.31")
					.setFwdMidPoints("0.005390")
					.setFwdPips("11.98")
					.setFwdPoints(BigDecimal.valueOf(0.001198))
					.setNostroAccountFields(
					SettlementInstructionsPartsDef.NostroAccount
						.newBuilder()
						.setNostroAccount("AE770090004000824676500")
						.setNostroBIC("ARABAEADABC")
						.setNostroName("GBP Nostro Account.")
						.build())
					.setProfit(BigDecimal.valueOf(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("")
							.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("2018-03-16T07:25:16+00:00")
						.setCanAdHoc("")
						.setCanAffirm(true)
						.setCanAutoConfirm("")
						.setCanCancel("")
						.setCanConfirm("")
						.setCanDispute(true)
						.setCanReplace(true)
						.setCanUnconfirm("")
						.setConfirmedBy("")
						.setConfirmedDateTime("2018-03-16T07:25:16+00:00")
						.setIsPayNetted(true)
						.setIsPayNettingRequired("")
						.setIsPaySplit("")
						.setIsReceiveNetted("")
						.setIsReceiveNettingRequired(true)
						.setIsReceiveSplit(true)
						.setNextActionDeadline(Instant.now())
						.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(BigDecimal.valueOf(0.0))
					.setReferenceCurrency(BigDecimal.valueOf(0.0))
					.setSettlementAmount(BigDecimal.valueOf(0.0))
					.setSettlementCurrency("GBP")
					.build())
				.setTimeOptionLegTradeConfirmation(
				TradeConfPartsDef.TimeOptionLegTradeConfirmationFields
					.newBuilder()
					.setFilledAmount(BigDecimal.valueOf(0))
					.setRemainingAmount(BigDecimal.valueOf(500))
					.setRiskDate("20160314")
					.setRiskTenor("1W")
					.setStartDate("20150620")
					.setStartTenor("1W")
					.build())
				.build())
			.build();
            
    }
}