Caplin FXIntegrationAPI Documentation - Version 3.51.0-3064-772a4c6

Message Builder Example - SwapTradeDetails

package com.caplin.examples.fxapi.generated.motif.fx.tradedetails.TradeDetailsTypesDef; 

import java.math.BigInteger;

import com.caplin.generated.motif.fx.tradedetails.TradeDetailsPartsDef;
import com.caplin.generated.motif.fx.tradedetails.TradeDetailsTypesDef;

public class SwapTradeDetailsExample {
    public static void main(String[] args) {
                    		
		TradeDetailsTypesDef.SwapTradeDetails swapTradeDetails =
		TradeDetailsTypesDef.SwapTradeDetails
			.newBuilder()
			.setCommonTradeDetailsFields(
			TradeDetailsPartsDef.CommonTradeDetailsFields
				.newBuilder()
				.setAccount("Garfields|GARF")
				.setLastActionDateTime(Instant.now())
				.setOneWayDirection("")
				.setRequestedDateTime("")
				.setTOBOUser("client@customer.co.za")
				.setTraderUsername("sales_trader@novobank.co.za")
				.build())
			.setFarLegTradeDetails(
			TradeDetailsPartsDef.LegTradeDetailsFields
				.newBuilder()
				.setAccount("Garfields|GARF")
				.setAmount("0")
				.setBuySell("")
				.setSettlementDate("")
				.setTenor("1M")
				.build())
			.setInterventionTradeDetailsFields(
			TradeDetailsPartsDef.InterventionTradeDetailsFields
				.newBuilder()
				.setCompetition(true)
				.setDealable(true)
				.setIntervenerUsername("head_trader@novobank.co.za")
				.setInterventionStatus("")
				.setPricingMode("AUTO")
				.setPrimaryReason("This trade exceeds the GFA")
				.setReasons("")
				.setSource("")
				.setTradeRequestID("")
				.setTradeStatus("AWAITING-PRICE")
				.build())
			.setNearLegTradeDetails(
			TradeDetailsPartsDef.LegTradeDetailsFields
				.newBuilder()
				.build())
			.setTradeDetailsFields(
			TradeDetailsPartsDef.TradeDetailsFields
				.newBuilder()
				.setCurrencyPair("")
				.setDealtCurrency("")
				.setTradingType("")
				.build())
			.build();
            
    }
}