Class QuotePartsDef.SalesSyntheticComponentFields.Builder

java.lang.Object
com.caplin.generated.motif.fx.rates.QuotePartsDef.SalesSyntheticComponentFields.Builder
Enclosing class:
QuotePartsDef.SalesSyntheticComponentFields

public static final class QuotePartsDef.SalesSyntheticComponentFields.Builder extends Object
  • Method Details

    • addField

      @NotNull public @NotNull QuotePartsDef.SalesSyntheticComponentFields.Builder addField(@NotNull @NotNull String key, @NotNull @NotNull String value)
    • build

      @NotNull public @NotNull QuotePartsDef.SalesSyntheticComponentFields build()
    • toString

      @NotNull public @NotNull String toString()
      Overrides:
      toString in class Object
    • setCurrencyPair

      @NotNull public @NotNull QuotePartsDef.SalesSyntheticComponentFields.Builder setCurrencyPair(@NotNull @NotNull String currencyPair)
      Returns:
      The currency pair for the trade. For example, EURUSD
    • setTraderSpotBidRate

      @NotNull public @NotNull QuotePartsDef.SalesSyntheticComponentFields.Builder setTraderSpotBidRate(@NotNull @NotNull BigDecimal traderSpotBidRate)
      Parameters:
      traderSpotBidRate - e.g. 1.08575
      Returns:
      This field represents the spot bid rate with no client margin applied to it.
    • setTraderSpotBidRate

      @NotNull public @NotNull QuotePartsDef.SalesSyntheticComponentFields.Builder setTraderSpotBidRate(@NotNull @NotNull String traderSpotBidRate)
      Parameters:
      traderSpotBidRate - e.g. 1.08575
      Returns:
      This field represents the spot bid rate with no client margin applied to it.
    • setTraderSpotAskRate

      @NotNull public @NotNull QuotePartsDef.SalesSyntheticComponentFields.Builder setTraderSpotAskRate(@NotNull @NotNull BigDecimal traderSpotAskRate)
      Parameters:
      traderSpotAskRate - e.g. 1.08575
      Returns:
      This field represents the spot ask rate with no client margin applied to it.
    • setTraderSpotAskRate

      @NotNull public @NotNull QuotePartsDef.SalesSyntheticComponentFields.Builder setTraderSpotAskRate(@NotNull @NotNull String traderSpotAskRate)
      Parameters:
      traderSpotAskRate - e.g. 1.08575
      Returns:
      This field represents the spot ask rate with no client margin applied to it.
    • setSpotMidRate

      @NotNull public @NotNull QuotePartsDef.SalesSyntheticComponentFields.Builder setSpotMidRate(@NotNull @NotNull BigDecimal spotMidRate)
      Parameters:
      spotMidRate - e.g. 1.08345
      Returns:
      The mid rate between the SpotAskRate and SpotBidRate. Note that this will not always be precisely between.
    • setSpotMidRate

      @NotNull public @NotNull QuotePartsDef.SalesSyntheticComponentFields.Builder setSpotMidRate(@NotNull @NotNull String spotMidRate)
      Parameters:
      spotMidRate - e.g. 1.08345
      Returns:
      The mid rate between the SpotAskRate and SpotBidRate. Note that this will not always be precisely between.
    • setDigitsBeforePips

      @NotNull public @NotNull QuotePartsDef.SalesSyntheticComponentFields.Builder setDigitsBeforePips(int digitsBeforePips)
      Parameters:
      digitsBeforePips - e.g. 2
      Returns:
      Precision-related field that tells the client how to display rates. This is the number of digits between the decimal point and the pips (i.e the big digits that the client wants to look at). For most currency pairs the value of this field will be 2, i.e. for a USDGBP rate of 1.23456 the pips are 45 so there are two digits between the decimal point and the pips. For USDJPY the rate could be 103.256 and the pips are the 25, so in this case the value of DigitsBeforePips should be 0.
    • setDigitsBeforePips

      @NotNull public @NotNull QuotePartsDef.SalesSyntheticComponentFields.Builder setDigitsBeforePips(@NotNull @NotNull String digitsBeforePips)
      Parameters:
      digitsBeforePips - e.g. 2
      Returns:
      Precision-related field that tells the client how to display rates. This is the number of digits between the decimal point and the pips (i.e the big digits that the client wants to look at). For most currency pairs the value of this field will be 2, i.e. for a USDGBP rate of 1.23456 the pips are 45 so there are two digits between the decimal point and the pips. For USDJPY the rate could be 103.256 and the pips are the 25, so in this case the value of DigitsBeforePips should be 0.
    • setNumberOfPips

      @NotNull public @NotNull QuotePartsDef.SalesSyntheticComponentFields.Builder setNumberOfPips(int numberOfPips)
      Parameters:
      numberOfPips - e.g. 2
      Returns:
      Precision-related field that tells the client how to display rates. This is the number of pips the client wants to look at. Normally this value is 2.
    • setNumberOfPips

      @NotNull public @NotNull QuotePartsDef.SalesSyntheticComponentFields.Builder setNumberOfPips(@NotNull @NotNull String numberOfPips)
      Parameters:
      numberOfPips - e.g. 2
      Returns:
      Precision-related field that tells the client how to display rates. This is the number of pips the client wants to look at. Normally this value is 2.
    • setSpotRateDPS

      @NotNull public @NotNull QuotePartsDef.SalesSyntheticComponentFields.Builder setSpotRateDPS(int spotRateDPS)
      Parameters:
      spotRateDPS - e.g. 5
      Returns:
      The number of decimal places to display after the decimal point.
    • setSpotRateDPS

      @NotNull public @NotNull QuotePartsDef.SalesSyntheticComponentFields.Builder setSpotRateDPS(@NotNull @NotNull String spotRateDPS)
      Parameters:
      spotRateDPS - e.g. 5
      Returns:
      The number of decimal places to display after the decimal point.