Caplin FXIntegrationAPI Documentation - Version 6.0.0

Message Builder Example - SalesSpotQuote

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 SalesSpotQuoteExample {
    public static void main(String[] args) {
                    		
		QuoteTypesDef.SalesSpotQuote salesSpotQuote =
		QuoteTypesDef.SalesSpotQuote
			.newBuilder()
			.setSalesCommonFields(
			QuotePartsDef.SalesCommonFields
				.newBuilder()
				.setDefaultSpotAskMargin("0.00054")
				.setDefaultSpotBidMargin(BigDecimal.valueOf(0.00054))
				.setProfitAskRate("1.090098")
				.setProfitBidRate(BigDecimal.valueOf(1.091790))
				.setProfitCurrency("USD")
				.setProfitCurrencyDPS(5)
				.setProfitIsHouse(true)
				.setTraderSpotAskRate(BigDecimal.valueOf(1.08575))
				.setTraderSpotBidRate(BigDecimal.valueOf(1.08575))
				.build())
			.setSalesLegFields(
			QuotePartsDef.SalesLegFields
				.newBuilder()
				.setDefaultFwdAskMargin("0.000019")
				.setDefaultFwdBidMargin(BigDecimal.valueOf(0.000019))
				.setTraderAllInAskRate("1.091790")
				.setTraderAllInBidRate(BigDecimal.valueOf(1.091790))
				.setTraderFwdAskPoints(BigDecimal.valueOf(0.001198))
				.setTraderFwdBidPoints("0.001198")
				.build())
			.setSpotQuote(
			QuoteTypesDef.SpotQuote
				.newBuilder()
				.setCommonFields(
				QuotePartsDef.CommonFields
					.newBuilder()
					.setAskContraCostAmount("")
					.setAskContraCostPercentage("1.5")
					.setAskContraCostRate(BigDecimal.valueOf(0.0))
					.setAskCostAmount("150000.00")
					.setAskCostPercentage(BigDecimal.valueOf(1.5))
					.setAskCostRate(BigDecimal.valueOf(0.0))
					.setAskIndicative(true)
					.setAskPips("11.98")
					.setAskQuoteID("")
					.setBidContraCostAmount("")
					.setBidContraCostPercentage("1.5")
					.setBidContraCostRate(BigDecimal.valueOf(0.0))
					.setBidCostAmount("150000.00")
					.setBidCostPercentage("1.5")
					.setBidCostRate("")
					.setBidIndicative(true)
					.setBidPips("11.98")
					.setBidQuoteID("")
					.setContraCostAmount(BigDecimal.valueOf(0.0))
					.setContraCostCurrency(BigDecimal.valueOf(0.0))
					.setContraCostPercentage("1.5")
					.setCostCurrency("GBP")
					.setCostCurrencyDPS(2)
					.setCurrencyPair("")
					.setDigitsBeforePips("2")
					.setGFA("1000000")
					.setNumberOfFractionalPips("")
					.setNumberOfPips(2)
					.setOverallTimeOut("")
					.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())
				.setLegFields(
				QuotePartsDef.LegFields
					.newBuilder()
					.setAllInAskRate("1.091790")
					.setAllInBidRate("1.091790")
					.setAllInMidRate("1.091790")
					.setAllInRateDPS("5")
					.setAmount("0")
					.setAskContraCostAmount("")
					.setAskContraCostPercentage("1.5")
					.setAskContraCostRate(BigDecimal.valueOf(0.0))
					.setAskCostAmount("150000.00")
					.setAskCostPercentage(BigDecimal.valueOf(1.5))
					.setAskCostRate("")
					.setBidContraCostAmount("")
					.setBidContraCostPercentage(BigDecimal.valueOf(1.5))
					.setBidContraCostRate(BigDecimal.valueOf(0.0))
					.setBidCostAmount(BigDecimal.valueOf(150000.00))
					.setBidCostPercentage(BigDecimal.valueOf(1.5))
					.setBidCostRate(BigDecimal.valueOf(0.0))
					.setBuySell("")
					.setContraCostAmount("")
					.setContraCostCurrency(BigDecimal.valueOf(0.0))
					.setContraCostPercentage(BigDecimal.valueOf(1.5))
					.setCostCurrency("GBP")
					.setForwardPointsDecimalOffset(0)
					.setFwdAskPips("53.90")
					.setFwdAskPoints("0.005390")
					.setFwdBidPips("53.90")
					.setFwdBidPoints("0.005390")
					.setFwdMidPoints("0.005390")
					.setIsTimeOption("true")
					.setRiskDate("20160314")
					.setRiskTenor("1W")
					.setSettlementDate("")
					.setStartDate("20150620")
					.setStartTenor("1W")
					.setTenor("1M")
					.build())
				.build())
			.build();
            
    }
}