Caplin FXIntegrationAPI Documentation - Version 3.47.0-2976-15da410

Message Builder Example - SwapQuote

package com.caplin.examples.fxapi.generated.motif.fx.rates.QuoteTypesDef; 

import java.math.BigInteger;

import com.caplin.generated.motif.fx.rates.QuotePartsDef;
import com.caplin.generated.motif.fx.rates.QuoteTypesDef;

public class SwapQuoteExample {
    public static void main(String[] args) {
                    		
		QuoteTypesDef.SwapQuote swapQuote =
		QuoteTypesDef.SwapQuote
			.newBuilder()
			.setCommonFields(
			QuotePartsDef.CommonFields
				.newBuilder()
				.setAskCostAmount(BigDecimal.valueOf(150000.00))
				.setAskCostPercentage("1.5")
				.setAskCostRate("")
				.setAskIndicative("")
				.setAskPips("11.98")
				.setAskQuoteID("")
				.setBidCostAmount("150000.00")
				.setBidCostPercentage("1.5")
				.setBidCostRate(BigDecimal.valueOf(0.0))
				.setBidIndicative(true)
				.setBidPips("11.98")
				.setBidQuoteID("")
				.setCostCurrency("GBP")
				.setCostCurrencyDPS("2")
				.setCurrencyPair("")
				.setDigitsBeforePips(2)
				.setGFA("1000000")
				.setNumberOfFractionalPips("")
				.setNumberOfPips("2")
				.setOverallTimeOut(0)
				.setPriceUpdateSource("")
				.setRemainingTimeOutMillis(0)
				.setSpotAskRate(BigDecimal.valueOf(1.08349))
				.setSpotBidRate("1.08341")
				.setSpotMidRate(BigDecimal.valueOf(1.08345))
				.setSpotRateDPS(5)
				.setSwapGFA("1 000 000")
				.setTimePriceReceived("")
				.setWarningCode("001")
				.setWarningMessage("You do not have sufficient credit for EUR")
				.build())
			.setFarLegFields(
			QuotePartsDef.LegFields
				.newBuilder()
				.setAllInAskRate("1.091790")
				.setAllInBidRate(BigDecimal.valueOf(1.091790))
				.setAllInMidRate(BigDecimal.valueOf(1.091790))
				.setAllInRateDPS(5)
				.setAmount("0")
				.setBuySell("")
				.setFwdAskPips("53.90")
				.setFwdAskPoints(BigDecimal.valueOf(0.005390))
				.setFwdBidPips("53.90")
				.setFwdBidPoints("0.005390")
				.setFwdMidPoints(BigDecimal.valueOf(0.005390))
				.setRiskDate("20160314")
				.setRiskTenor("1W")
				.setSettlementDate("")
				.setTenor("1M")
				.build())
			.setNearLegFields(
			QuotePartsDef.LegFields
				.newBuilder()
				.build())
			.setSwapFields(
			QuotePartsDef.SwapQuoteFields
				.newBuilder()
				.setSwapAskPips("49.34")
				.setSwapAskPoints(BigDecimal.valueOf(0.004934))
				.setSwapBidPips("41.71")
				.setSwapBidPoints("0.004171")
				.setSwapMidPoints(BigDecimal.valueOf(0.004553))
				.build())
			.build();
            
    }
}