Class TradeConfPartsDef.CommonTradeConfirmationFields.Builder
- java.lang.Object
-
- com.caplin.generated.motif.fx.tradeconfirmation.TradeConfPartsDef.CommonTradeConfirmationFields.Builder
-
- Enclosing class:
- TradeConfPartsDef.CommonTradeConfirmationFields
public static final class TradeConfPartsDef.CommonTradeConfirmationFields.Builder extends java.lang.Object
-
-
Method Summary
-
-
-
Method Detail
-
addField
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder addField(@NotNull @NotNull java.lang.String key, @NotNull @NotNull java.lang.String value)
-
build
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields build()
-
toString
@NotNull public @NotNull java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
setTradeID
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setTradeID(@NotNull @NotNull java.lang.String tradeID)
- Parameters:
tradeID
- e.g. 00001561- Returns:
- A unique identifier for this trade
-
setCurrencyPair
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setCurrencyPair(@NotNull @NotNull java.lang.String currencyPair)
- Returns:
- The currency pair for the trade. For example, EURUSD
-
setDealtCurrency
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setDealtCurrency(@NotNull @NotNull java.lang.String dealtCurrency, boolean isEditable, boolean isRisk)
- Returns:
- The currency of the Amount of a trade or order.
-
setDealtCurrencyEditable
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setDealtCurrencyEditable()
-
setDealtCurrencyRisk
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setDealtCurrencyRisk()
-
setSpotRate
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setSpotRate(@NotNull @NotNull java.math.BigDecimal spotRate)
- Parameters:
spotRate
- e.g. 1.08341- Returns:
- spotRate
-
setSpotRate
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setSpotRate(@NotNull @NotNull java.lang.String spotRate)
- Parameters:
spotRate
- e.g. 1.08341- Returns:
- spotRate
-
setSpotMidRate
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setSpotMidRate(@NotNull @NotNull java.math.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 TradeConfPartsDef.CommonTradeConfirmationFields.Builder setSpotMidRate(@NotNull @NotNull java.lang.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.
-
setSpotRateDPS
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.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 TradeConfPartsDef.CommonTradeConfirmationFields.Builder setSpotRateDPS(@NotNull @NotNull java.lang.String spotRateDPS)
- Parameters:
spotRateDPS
- e.g. 5- Returns:
- The number of decimal places to display after the decimal point.
-
setExecutionDateTime
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setExecutionDateTime(@NotNull @NotNull java.lang.String executionDateTime)
- Parameters:
executionDateTime
- e.g. 20160322123621- Returns:
- executionDateTime
-
setTradeDate
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setTradeDate(@NotNull @NotNull java.lang.String tradeDate)
- Parameters:
tradeDate
- e.g. 20160314- Returns:
- tradeDate
-
setAccount
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setAccount(@NotNull @NotNull java.lang.String account, boolean isEditable)
- Parameters:
account
- e.g. Garfields|GARF- Returns:
- The account a trade or order has been submitted against. The format is <description>|<name> or <name>|<name>
-
setAccountEditable
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setAccountEditable()
-
setTraderUsername
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setTraderUsername(@NotNull @NotNull java.lang.String traderUsername)
- Parameters:
traderUsername
- e.g. sales_trader@novobank.co.za- Returns:
- The user who entered the trade. This may be on behalf of themselves, or on behalf of someone else. For example, if the logged in user dealer1@novobank.co.za wishes to make a trade on behalf of user client@customer.co.za, then the value of this field will be dealer1@novobank.co.za. If the user client@customer.co.za makes a trade on behalf of themselves it will be client@customer.co.za.
-
setTOBOUser
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setTOBOUser(@NotNull @NotNull java.lang.String tOBOUser, boolean isEditable, boolean isRisk)
- Parameters:
tOBOUser
- e.g. client@customer.co.za- Returns:
- The user the trade is on behalf of. For example, if the logged in user dealer1@novobank.co.za wishes to make a trade on behalf of user client@customer.co.za, then the value of this field will be client@customer.co.za.
-
setTOBOUserEditable
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setTOBOUserEditable()
-
setTOBOUserRisk
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setTOBOUserRisk()
-
setEntityId
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setEntityId(@NotNull @NotNull java.lang.String entityId)
- Parameters:
entityId
- e.g. CUSTONE- Returns:
- The entity the trade is on behalf of. For example, if the logged in user user1@customer.co.za wishes to make a trade on behalf of entity CUSTONE, then the value of this field will be CUSTONE.
-
setEntityDescription
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setEntityDescription(@NotNull @NotNull java.lang.String entityDescription)
- Parameters:
entityDescription
- e.g. Customer 1- Returns:
- The description of a trade on behalf of entity.
-
setAssetType
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setAssetType(@NotNull @NotNull java.lang.String assetType)
- Parameters:
assetType
- e.g. FX- Returns:
- A grouping of investments that exhibit similar characteristics and are subject to the same laws and regulations. Supported asset types are [FX, PM]
-
setTradingType
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setTradingType(@NotNull @NotNull java.lang.String tradingType)
- Returns:
- Caplin supported values are [SPOT, FWD, NDF, NDF_FIXING, TIME_OPTION, DRAWDOWN, SWAP, BLOCK]. See the constants defined within com.caplin.motif.fx.trading.FXTradingType for further details.
-
setDigitsBeforePips
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.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 bla 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 TradeConfPartsDef.CommonTradeConfirmationFields.Builder setDigitsBeforePips(@NotNull @NotNull java.lang.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 bla 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 TradeConfPartsDef.CommonTradeConfirmationFields.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 TradeConfPartsDef.CommonTradeConfirmationFields.Builder setNumberOfPips(@NotNull @NotNull java.lang.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.
-
setOrderID
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setOrderID(@NotNull @NotNull java.lang.String orderID)
- Returns:
- The id of the order.
-
setWarningCode
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setWarningCode(@NotNull @NotNull java.lang.String warningCode)
- Parameters:
warningCode
- e.g. 001- Returns:
- The code for the warning regarding a quote request.
-
setWarningMessage
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setWarningMessage(@NotNull @NotNull java.lang.String warningMessage)
- Parameters:
warningMessage
- e.g. You do not have sufficient credit for EUR- Returns:
- The message to display for any warnings regarding a quote request
-
setClient
@Deprecated @NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setClient(@NotNull @NotNull java.lang.String client)
Deprecated.- Returns:
- Client is a duplicate of TOBOUser
-
setCostAmount
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setCostAmount(@NotNull @NotNull java.math.BigDecimal costAmount)
- Parameters:
costAmount
- e.g. 12412891.31- Returns:
- The actual transactional cost of performing the trade to the client in the home currency
-
setCostAmount
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setCostAmount(@NotNull @NotNull java.lang.String costAmount)
- Parameters:
costAmount
- e.g. 12412891.31- Returns:
- The actual transactional cost of performing the trade to the client in the home currency
-
setCostCurrency
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setCostCurrency(@NotNull @NotNull java.lang.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
-
setCostPercentage
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setCostPercentage(@NotNull @NotNull java.math.BigDecimal costPercentage)
- Parameters:
costPercentage
- e.g. 13.56- Returns:
- Percentage of the overall price which is the transactional cost to the client of performing the trade. This number should be out of 100, where 100.0 represents 100%.
-
setCostPercentage
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setCostPercentage(@NotNull @NotNull java.lang.String costPercentage)
- Parameters:
costPercentage
- e.g. 13.56- Returns:
- Percentage of the overall price which is the transactional cost to the client of performing the trade. This number should be out of 100, where 100.0 represents 100%.
-
setContraCostAmount
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setContraCostAmount(@NotNull @NotNull java.math.BigDecimal contraCostAmount)
- Returns:
- The actual transactional cost of performing the trade to the client on the contra currency
-
setContraCostAmount
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setContraCostAmount(@NotNull @NotNull java.lang.String contraCostAmount)
- Returns:
- The actual transactional cost of performing the trade to the client on the contra currency
-
setContraCostCurrency
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setContraCostCurrency(@NotNull @NotNull java.math.BigDecimal contraCostCurrency)
- Returns:
- The contra currency that the cost is displayed in
-
setContraCostCurrency
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setContraCostCurrency(@NotNull @NotNull java.lang.String contraCostCurrency)
- Returns:
- The contra currency that the cost is displayed in
-
setContraCostPercentage
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setContraCostPercentage(@NotNull @NotNull java.math.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 TradeConfPartsDef.CommonTradeConfirmationFields.Builder setContraCostPercentage(@NotNull @NotNull java.lang.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%.
-
setCanAllocate
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setCanAllocate(boolean canAllocate)
- Returns:
- Defines if a user can allocate a trade.
-
setCanAllocate
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setCanAllocate(@NotNull @NotNull java.lang.String canAllocate)
- Returns:
- Defines if a user can allocate a trade.
-
setIsAllocated
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setIsAllocated(boolean isAllocated)
- Returns:
- Define if a trade is already allocated or not
-
setIsAllocated
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setIsAllocated(@NotNull @NotNull java.lang.String isAllocated)
- Returns:
- Define if a trade is already allocated or not
-
setIsReversible
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setIsReversible(boolean isReversible)
- Returns:
- Whether a trade can be reversed.
-
setIsReversible
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setIsReversible(@NotNull @NotNull java.lang.String isReversible)
- Returns:
- Whether a trade can be reversed.
-
setIsAmendable
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setIsAmendable(boolean isAmendable)
- Returns:
- Whether a trade can be amended.
-
setIsAmendable
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setIsAmendable(@NotNull @NotNull java.lang.String isAmendable)
- Returns:
- Whether a trade can be amended.
-
setIsCancellable
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setIsCancellable(boolean isCancellable)
- Returns:
- Whether a trade can be cancelled.
-
setIsCancellable
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setIsCancellable(@NotNull @NotNull java.lang.String isCancellable)
- Returns:
- Whether a trade can be cancelled.
-
setCostCurrencyDPS
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.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 TradeConfPartsDef.CommonTradeConfirmationFields.Builder setCostCurrencyDPS(@NotNull @NotNull java.lang.String costCurrencyDPS)
- Parameters:
costCurrencyDPS
- e.g. 2- Returns:
- The number of decimal places to display after the decimal point.
-
setRemarks
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setRemarks(@NotNull @NotNull java.lang.String remarks)
- Returns:
- The text content of a comment left on a leg of a trade or order.
-
setStreamingMode
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setStreamingMode(@NotNull @NotNull java.lang.String streamingMode)
- Parameters:
streamingMode
- e.g. MANUAL, STREAMING- Returns:
- Indicates whether the rates/margins of this trade have been manually set
-
setTraderSpotAskRate
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setTraderSpotAskRate(@NotNull @NotNull java.math.BigDecimal traderSpotAskRate)
- Parameters:
traderSpotAskRate
- e.g. 1.08575- Returns:
- traderSpotAskRate
-
setTraderSpotAskRate
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setTraderSpotAskRate(@NotNull @NotNull java.lang.String traderSpotAskRate)
- Parameters:
traderSpotAskRate
- e.g. 1.08575- Returns:
- traderSpotAskRate
-
setTraderSpotBidRate
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setTraderSpotBidRate(@NotNull @NotNull java.math.BigDecimal traderSpotBidRate)
- Parameters:
traderSpotBidRate
- e.g. 1.08575- Returns:
- traderSpotBidRate
-
setTraderSpotBidRate
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setTraderSpotBidRate(@NotNull @NotNull java.lang.String traderSpotBidRate)
- Parameters:
traderSpotBidRate
- e.g. 1.08575- Returns:
- traderSpotBidRate
-
setForceReporting
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setForceReporting(boolean forceReporting)
- Returns:
- Indicates whether a trade is flagged for reporting
-
setForceReporting
@NotNull public @NotNull TradeConfPartsDef.CommonTradeConfirmationFields.Builder setForceReporting(@NotNull @NotNull java.lang.String forceReporting)
- Returns:
- Indicates whether a trade is flagged for reporting
-
-