Class QuotePartsDef.CommonFields.Builder

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

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

    • addField

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

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

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

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setBidQuoteID(@NotNull @NotNull String bidQuoteID)
      Returns:
      A unique ID that identifies the bid side of this quote.
    • setAskQuoteID

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setAskQuoteID(@NotNull @NotNull String askQuoteID)
      Returns:
      A unique ID that identifies the ask side of this quote.
    • setBidIndicative

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setBidIndicative(boolean bidIndicative)
      Returns:
      Determines whether the Bid price is indicative. Indicative prices cannot be executed upon
    • setBidIndicative

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setBidIndicative(@NotNull @NotNull String bidIndicative)
      Returns:
      Determines whether the Bid price is indicative. Indicative prices cannot be executed upon
    • setAskIndicative

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setAskIndicative(boolean askIndicative)
      Returns:
      Determines whether the Ask price is indicative. Indicative prices cannot be executed upon
    • setAskIndicative

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setAskIndicative(@NotNull @NotNull String askIndicative)
      Returns:
      Determines whether the Ask price is indicative. Indicative prices cannot be executed upon
    • setGFA

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setGFA(@NotNull @NotNull String gFA)
      Parameters:
      gFA - e.g. 1000000
      Returns:
      The maximum amount that a quote can be executed for. If the client wishes to quote for more than this, they must perform an RFS
    • setTimePriceReceived

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setTimePriceReceived(@NotNull @NotNull String timePriceReceived)
      Parameters:
      timePriceReceived - e.g. 1721952000000
      Returns:
      The time the price is received from the liquidity provider, in epoch milliseconds.
    • setDigitsBeforePips

      @NotNull public @NotNull QuotePartsDef.CommonFields.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.CommonFields.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.CommonFields.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.CommonFields.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.
    • setSpotBidRate

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setSpotBidRate(@NotNull @NotNull BigDecimal spotBidRate)
      Parameters:
      spotBidRate - e.g. 1.08341
      Returns:
      For SPOT quotes this value will be identical to the L1_AllInBidRate. For forward quotes this will contain the SPOT rate that the forward all-in rate was derived from. For forward quotes the value in this field should always equal L1_AllInBidRate - L1_FwdBidPoints.
    • setSpotBidRate

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setSpotBidRate(@NotNull @NotNull String spotBidRate)
      Parameters:
      spotBidRate - e.g. 1.08341
      Returns:
      For SPOT quotes this value will be identical to the L1_AllInBidRate. For forward quotes this will contain the SPOT rate that the forward all-in rate was derived from. For forward quotes the value in this field should always equal L1_AllInBidRate - L1_FwdBidPoints.
    • setSpotMidRate

      @NotNull public @NotNull QuotePartsDef.CommonFields.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.CommonFields.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.
    • setSpotAskRate

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setSpotAskRate(@NotNull @NotNull BigDecimal spotAskRate)
      Parameters:
      spotAskRate - e.g. 1.08349
      Returns:
      For SPOT quotes this value will be identical to the L1_AllInAskRate. For forward quotes this will contain the SPOT rate that the forward all-in rate was derived from. For forward quotes the value in this field should always equal L1_AllInAskRate - L1_FwdAskPoints.
    • setSpotAskRate

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setSpotAskRate(@NotNull @NotNull String spotAskRate)
      Parameters:
      spotAskRate - e.g. 1.08349
      Returns:
      For SPOT quotes this value will be identical to the L1_AllInAskRate. For forward quotes this will contain the SPOT rate that the forward all-in rate was derived from. For forward quotes the value in this field should always equal L1_AllInAskRate - L1_FwdAskPoints.
    • setSpotRateDPS

      @NotNull public @NotNull QuotePartsDef.CommonFields.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.CommonFields.Builder setSpotRateDPS(@NotNull @NotNull String spotRateDPS)
      Parameters:
      spotRateDPS - e.g. 5
      Returns:
      The number of decimal places to display after the decimal point.
    • setOverallTimeOut

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setOverallTimeOut(int overallTimeOut)
      Returns:
      The number of seconds remaining before this stream (not this individual quote) is timed out. This is not present for standard price updates.
    • setOverallTimeOut

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setOverallTimeOut(@NotNull @NotNull String overallTimeOut)
      Returns:
      The number of seconds remaining before this stream (not this individual quote) is timed out. This is not present for standard price updates.
    • setRemainingTimeOutMillis

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setRemainingTimeOutMillis(int remainingTimeOutMillis)
      Returns:
      The number of seconds remaining of the OverallTimeOut before this stream is timed out. This is not present for standard price updates.
    • setRemainingTimeOutMillis

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setRemainingTimeOutMillis(@NotNull @NotNull String remainingTimeOutMillis)
      Returns:
      The number of seconds remaining of the OverallTimeOut before this stream is timed out. This is not present for standard price updates.
    • setWarningCode

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setWarningCode(@NotNull @NotNull String warningCode)
      Parameters:
      warningCode - e.g. 001
      Returns:
      The code for the warning regarding a quote request.
    • setWarningMessage

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setWarningMessage(@NotNull @NotNull String warningMessage)
      Parameters:
      warningMessage - e.g. **CREDIT CHECK:** This user has a credit limit of **1,000,000.00 USD** which should not be exceeded.
      Returns:
      The message to display for any warnings regarding a quote request. Supports Markdown syntax for formatting.
    • setDetailedWarningMessage

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setDetailedWarningMessage(@NotNull @NotNull String detailedWarningMessage)
      Parameters:
      detailedWarningMessage - e.g. color: {{theme:foreground.semantic.warning_inverse}}
      Returns:
      detailedWarningMessage
    • setNumberOfFractionalPips

      @Deprecated @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setNumberOfFractionalPips(@NotNull @NotNull String numberOfFractionalPips)
      Deprecated.
      Returns:
      Precision-related field that tells the client how to display rates. This is the number of digits after the pips. For example, for a USDGBP rate of 1.23456 the pips are the 45 and there is one digit (the 6) after the pips, so the value of the NumberOfFractionalPips field should be 1. There are typically more fractional pips on forward rates than spot rates.
    • setBidPips

      @Deprecated @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setBidPips(@NotNull @NotNull String bidPips)
      Deprecated.
      Parameters:
      bidPips - e.g. 11.98
      Returns:
      bidPips
    • setAskPips

      @Deprecated @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setAskPips(@NotNull @NotNull String askPips)
      Deprecated.
      Parameters:
      askPips - e.g. 11.98
      Returns:
      askPips
    • setSwapGFA

      @Deprecated @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setSwapGFA(@NotNull @NotNull String swapGFA)
      Deprecated.
      Parameters:
      swapGFA - e.g. 1 000 000
      Returns:
      swapGFA
    • setCurrencyPair

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

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setBidCostAmount(@NotNull @NotNull BigDecimal bidCostAmount)
      Parameters:
      bidCostAmount - e.g. 150000.00
      Returns:
      The total amount on the bid side of the trade when requesting a quote
    • setBidCostAmount

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setBidCostAmount(@NotNull @NotNull String bidCostAmount)
      Parameters:
      bidCostAmount - e.g. 150000.00
      Returns:
      The total amount on the bid side of the trade when requesting a quote
    • setBidCostPercentage

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setBidCostPercentage(@NotNull @NotNull BigDecimal bidCostPercentage)
      Parameters:
      bidCostPercentage - e.g. 1.5
      Returns:
      Percentage of the overall price which is the transactional cost to the client of performing the trade, displayed on the bid side. This number should be out of 100, where 100.0 represents 100%.
    • setBidCostPercentage

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setBidCostPercentage(@NotNull @NotNull String bidCostPercentage)
      Parameters:
      bidCostPercentage - e.g. 1.5
      Returns:
      Percentage of the overall price which is the transactional cost to the client of performing the trade, displayed on the bid side. This number should be out of 100, where 100.0 represents 100%.
    • setCostCurrency

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setCostCurrency(@NotNull @NotNull String costCurrency)
      Parameters:
      costCurrency - e.g. GBP
      Returns:
      The currency that the cost is displayed in, this could be any currency but will typically be set to the home currency
    • setAskCostAmount

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setAskCostAmount(@NotNull @NotNull BigDecimal askCostAmount)
      Parameters:
      askCostAmount - e.g. 150000.00
      Returns:
      The total amount on the ask side of the trade when requesting a quote
    • setAskCostAmount

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setAskCostAmount(@NotNull @NotNull String askCostAmount)
      Parameters:
      askCostAmount - e.g. 150000.00
      Returns:
      The total amount on the ask side of the trade when requesting a quote
    • setAskCostPercentage

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setAskCostPercentage(@NotNull @NotNull BigDecimal askCostPercentage)
      Parameters:
      askCostPercentage - e.g. 1.5
      Returns:
      Percentage of the overall price which is the transactional cost to the client of performing the trade, displayed on the ask side. This number should be out of 100, where 100.0 represents 100%.
    • setAskCostPercentage

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setAskCostPercentage(@NotNull @NotNull String askCostPercentage)
      Parameters:
      askCostPercentage - e.g. 1.5
      Returns:
      Percentage of the overall price which is the transactional cost to the client of performing the trade, displayed on the ask side. This number should be out of 100, where 100.0 represents 100%.
    • setAskCostRate

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setAskCostRate(@NotNull @NotNull BigDecimal askCostRate)
      Returns:
      The rate to multiply by the margin (in home currency), to get the cost in the CostCurrency.
    • setAskCostRate

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setAskCostRate(@NotNull @NotNull String askCostRate)
      Returns:
      The rate to multiply by the margin (in home currency), to get the cost in the CostCurrency.
    • setBidCostRate

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setBidCostRate(@NotNull @NotNull BigDecimal bidCostRate)
      Returns:
      The rate to multiply by the margin (in home currency), to get the cost in the CostCurrency.
    • setBidCostRate

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setBidCostRate(@NotNull @NotNull String bidCostRate)
      Returns:
      The rate to multiply by the margin (in home currency), to get the cost in the CostCurrency.
    • setCostCurrencyDPS

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setCostCurrencyDPS(int costCurrencyDPS)
      Parameters:
      costCurrencyDPS - e.g. 2
      Returns:
      The number of decimal places to display after the decimal point.
    • setCostCurrencyDPS

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setCostCurrencyDPS(@NotNull @NotNull String costCurrencyDPS)
      Parameters:
      costCurrencyDPS - e.g. 2
      Returns:
      The number of decimal places to display after the decimal point.
    • setPriceUpdateSource

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setPriceUpdateSource(@NotNull @NotNull String priceUpdateSource)
      Returns:
      The name of the adapter a particular price update originated from.
    • setAskContraCostAmount

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setAskContraCostAmount(@NotNull @NotNull BigDecimal askContraCostAmount)
      Returns:
      The total amount on the ask side of the trade when requesting a quote seen in contra currency
    • setAskContraCostAmount

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setAskContraCostAmount(@NotNull @NotNull String askContraCostAmount)
      Returns:
      The total amount on the ask side of the trade when requesting a quote seen in contra currency
    • setAskContraCostPercentage

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setAskContraCostPercentage(@NotNull @NotNull BigDecimal askContraCostPercentage)
      Parameters:
      askContraCostPercentage - e.g. 1.5
      Returns:
      Percentage of the overall price which is the transactional cost to the client of performing the trade, displayed on the ask side in contra currency. This number should be out of 100, where 100.0 represents 100%.
    • setAskContraCostPercentage

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setAskContraCostPercentage(@NotNull @NotNull String askContraCostPercentage)
      Parameters:
      askContraCostPercentage - e.g. 1.5
      Returns:
      Percentage of the overall price which is the transactional cost to the client of performing the trade, displayed on the ask side in contra currency. This number should be out of 100, where 100.0 represents 100%.
    • setAskContraCostRate

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setAskContraCostRate(@NotNull @NotNull BigDecimal askContraCostRate)
      Returns:
      The rate to multiply by the margin (in contra currency), to get the cost in the CostCurrency.
    • setAskContraCostRate

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setAskContraCostRate(@NotNull @NotNull String askContraCostRate)
      Returns:
      The rate to multiply by the margin (in contra currency), to get the cost in the CostCurrency.
    • setBidContraCostAmount

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setBidContraCostAmount(@NotNull @NotNull BigDecimal bidContraCostAmount)
      Returns:
      The total amount on the bid side of the trade when requesting a quote seen in contra currency
    • setBidContraCostAmount

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setBidContraCostAmount(@NotNull @NotNull String bidContraCostAmount)
      Returns:
      The total amount on the bid side of the trade when requesting a quote seen in contra currency
    • setBidContraCostPercentage

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setBidContraCostPercentage(@NotNull @NotNull BigDecimal bidContraCostPercentage)
      Parameters:
      bidContraCostPercentage - e.g. 1.5
      Returns:
      Percentage of the overall price which is the transactional cost to the client of performing the trade, displayed on the bid side in cost currency. This number should be out of 100, where 100.0 represents 100%.
    • setBidContraCostPercentage

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setBidContraCostPercentage(@NotNull @NotNull String bidContraCostPercentage)
      Parameters:
      bidContraCostPercentage - e.g. 1.5
      Returns:
      Percentage of the overall price which is the transactional cost to the client of performing the trade, displayed on the bid side in cost currency. This number should be out of 100, where 100.0 represents 100%.
    • setBidContraCostRate

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setBidContraCostRate(@NotNull @NotNull BigDecimal bidContraCostRate)
      Returns:
      The rate to multiply by the margin (in contra currency), to get the cost in the CostCurrency.
    • setBidContraCostRate

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setBidContraCostRate(@NotNull @NotNull String bidContraCostRate)
      Returns:
      The rate to multiply by the margin (in contra currency), to get the cost in the CostCurrency.
    • setContraCostAmount

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setContraCostAmount(@NotNull @NotNull BigDecimal contraCostAmount)
      Returns:
      The actual transactional cost of performing the trade to the client on the contra currency
    • setContraCostAmount

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setContraCostAmount(@NotNull @NotNull String contraCostAmount)
      Returns:
      The actual transactional cost of performing the trade to the client on the contra currency
    • setContraCostPercentage

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setContraCostPercentage(@NotNull @NotNull BigDecimal contraCostPercentage)
      Parameters:
      contraCostPercentage - e.g. 13.56
      Returns:
      Percentage of the overall price which is the transactional cost to the client of performing the trade in contra currency. This number should be out of 100, where 100.0 represents 100%.
    • setContraCostPercentage

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setContraCostPercentage(@NotNull @NotNull String contraCostPercentage)
      Parameters:
      contraCostPercentage - e.g. 13.56
      Returns:
      Percentage of the overall price which is the transactional cost to the client of performing the trade in contra currency. This number should be out of 100, where 100.0 represents 100%.
    • setContraCostCurrency

      @NotNull public @NotNull QuotePartsDef.CommonFields.Builder setContraCostCurrency(@NotNull @NotNull String contraCostCurrency)
      Parameters:
      contraCostCurrency - e.g. GBP
      Returns:
      The contra currency that the cost is displayed in