Caplin FXIntegrationAPI Documentation - Version 3.47.0-2976-15da410

Message Builder Example - ForwardQuote

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 ForwardQuoteExample {
    public static void main(String[] args) {
                    		
		QuoteTypesDef.ForwardQuote forwardQuote =
		QuoteTypesDef.ForwardQuote
			.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())
			.setLegFields(
			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())
			.build();
            
    }
}