Caplin FXIntegrationAPI Documentation - Version 3.51.0-3064-772a4c6

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("150000.00")
				.setAskCostPercentage("1.5")
				.setAskCostRate("")
				.setAskIndicative(true)
				.setAskPips("11.98")
				.setAskQuoteID("")
				.setBidCostAmount("150000.00")
				.setBidCostPercentage(BigDecimal.valueOf(1.5))
				.setBidCostRate("")
				.setBidIndicative(true)
				.setBidPips("11.98")
				.setBidQuoteID("")
				.setCostCurrency("GBP")
				.setCostCurrencyDPS(2)
				.setCurrencyPair("")
				.setDigitsBeforePips("2")
				.setGFA("1000000")
				.setNumberOfFractionalPips("")
				.setNumberOfPips(2)
				.setOverallTimeOut("")
				.setPriceUpdateSource("")
				.setRemainingTimeOutMillis(0)
				.setSpotAskRate(BigDecimal.valueOf(1.08349))
				.setSpotBidRate(BigDecimal.valueOf(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("1.091790")
				.setAllInMidRate("1.091790")
				.setAllInRateDPS("5")
				.setAmount("0")
				.setBuySell("")
				.setFwdAskPips("53.90")
				.setFwdAskPoints("0.005390")
				.setFwdBidPips("53.90")
				.setFwdBidPoints("0.005390")
				.setFwdMidPoints("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(BigDecimal.valueOf(0.004171))
				.setSwapMidPoints("0.004553")
				.build())
			.build();
            
    }
}