Caplin FXIntegrationAPI Documentation - Version 3.51.0-3064-772a4c6

Message Builder Example - SalesForwardQuote

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 SalesForwardQuoteExample {
    public static void main(String[] args) {
                    		
		QuoteTypesDef.SalesForwardQuote salesForwardQuote =
		QuoteTypesDef.SalesForwardQuote
			.newBuilder()
			.setFwdQuote(
			QuoteTypesDef.ForwardQuote
				.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())
				.setLegFields(
				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())
				.build())
			.setSalesCommonFields(
			QuotePartsDef.SalesCommonFields
				.newBuilder()
				.setDefaultSpotAskMargin(BigDecimal.valueOf(0.00054))
				.setDefaultSpotBidMargin("0.00054")
				.setProfitAskRate("1.090098")
				.setProfitBidRate(BigDecimal.valueOf(1.091790))
				.setProfitCurrency("USD")
				.setProfitCurrencyDPS(5)
				.setProfitIsHouse("")
				.setTraderSpotAskRate("1.08575")
				.setTraderSpotBidRate("1.08575")
				.build())
			.setSalesLegFields(
			QuotePartsDef.SalesLegFields
				.newBuilder()
				.setDefaultFwdAskMargin(BigDecimal.valueOf(0.000019))
				.setDefaultFwdBidMargin("0.000019")
				.setTraderAllInAskRate(BigDecimal.valueOf(1.091790))
				.setTraderAllInBidRate("1.091790")
				.setTraderFwdAskPoints(BigDecimal.valueOf(0.001198))
				.setTraderFwdBidPoints(BigDecimal.valueOf(0.001198))
				.build())
			.build();
            
    }
}