Caplin FXIntegrationAPI Documentation - Version 3.53.0-3121-ab928da

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(BigDecimal.valueOf(0.00054))
				.setDefaultSpotBidMargin("0.00054")
				.setProfitAskRate(BigDecimal.valueOf(1.090098))
				.setProfitBidRate(BigDecimal.valueOf(1.091790))
				.setProfitCurrency("USD")
				.setProfitCurrencyDPS(5)
				.setProfitIsHouse("")
				.setTraderSpotAskRate(BigDecimal.valueOf(1.08575))
				.setTraderSpotBidRate("1.08575")
				.build())
			.setSalesLegFields(
			QuotePartsDef.SalesLegFields
				.newBuilder()
				.setDefaultFwdAskMargin("0.000019")
				.setDefaultFwdBidMargin(BigDecimal.valueOf(0.000019))
				.setTraderAllInAskRate(BigDecimal.valueOf(1.091790))
				.setTraderAllInBidRate("1.091790")
				.setTraderFwdAskPoints("0.001198")
				.setTraderFwdBidPoints(BigDecimal.valueOf(0.001198))
				.build())
			.setSpotQuote(
			QuoteTypesDef.SpotQuote
				.newBuilder()
				.setCommonFields(
				QuotePartsDef.CommonFields
					.newBuilder()
					.setAskCostAmount("150000.00")
					.setAskCostPercentage(BigDecimal.valueOf(1.5))
					.setAskCostRate(BigDecimal.valueOf(0.0))
					.setAskIndicative(true)
					.setAskPips("11.98")
					.setAskQuoteID("")
					.setBidCostAmount(BigDecimal.valueOf(150000.00))
					.setBidCostPercentage("1.5")
					.setBidCostRate("")
					.setBidIndicative("")
					.setBidPips("11.98")
					.setBidQuoteID("")
					.setCostCurrency("GBP")
					.setCostCurrencyDPS("2")
					.setCurrencyPair("")
					.setDigitsBeforePips("2")
					.setGFA("1000000")
					.setNumberOfFractionalPips("")
					.setNumberOfPips(2)
					.setOverallTimeOut("")
					.setPriceUpdateSource("")
					.setRemainingTimeOutMillis("")
					.setSpotAskRate(BigDecimal.valueOf(1.08349))
					.setSpotBidRate("1.08341")
					.setSpotMidRate("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(BigDecimal.valueOf(1.091790))
					.setAllInBidRate("1.091790")
					.setAllInMidRate(BigDecimal.valueOf(1.091790))
					.setAllInRateDPS("5")
					.setAmount(BigDecimal.valueOf(0))
					.setBuySell("")
					.setFwdAskPips("53.90")
					.setFwdAskPoints("0.005390")
					.setFwdBidPips("53.90")
					.setFwdBidPoints(BigDecimal.valueOf(0.005390))
					.setFwdMidPoints(BigDecimal.valueOf(0.005390))
					.setRiskDate("20160314")
					.setRiskTenor("1W")
					.setSettlementDate("")
					.setTenor("1M")
					.build())
				.build())
			.build();
            
    }
}