Class TradeConfPartsDef.LegTradeConfirmationFields.Builder
- java.lang.Object
-
- com.caplin.generated.motif.fx.tradeconfirmation.TradeConfPartsDef.LegTradeConfirmationFields.Builder
-
- Enclosing class:
- TradeConfPartsDef.LegTradeConfirmationFields
public static final class TradeConfPartsDef.LegTradeConfirmationFields.Builder extends Object
-
-
Method Summary
-
-
-
Method Detail
-
addField
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder addField(@NotNull @NotNull String key, @NotNull @NotNull String value)
-
build
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields build()
-
setAllInRate
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setAllInRate(@NotNull @NotNull BigDecimal allInRate)
- Parameters:
allInRate
- e.g. 1.091790- Returns:
- allInRate
-
setAllInRate
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setAllInRate(@NotNull @NotNull String allInRate)
- Parameters:
allInRate
- e.g. 1.091790- Returns:
- allInRate
-
setAllInRateDPS
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setAllInRateDPS(int allInRateDPS)
- Parameters:
allInRateDPS
- e.g. 5- Returns:
- The number of decimal places to display after the decimal point.
-
setAllInRateDPS
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setAllInRateDPS(@NotNull @NotNull String allInRateDPS)
- Parameters:
allInRateDPS
- e.g. 5- Returns:
- The number of decimal places to display after the decimal point.
-
setAllInMidRate
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setAllInMidRate(@NotNull @NotNull BigDecimal allInMidRate)
- Parameters:
allInMidRate
- e.g. 1.091790- Returns:
- The mid rate used in charging customers for accepting banker's acceptances, consisting of the discount interest rate plus the commission.
-
setAllInMidRate
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setAllInMidRate(@NotNull @NotNull String allInMidRate)
- Parameters:
allInMidRate
- e.g. 1.091790- Returns:
- The mid rate used in charging customers for accepting banker's acceptances, consisting of the discount interest rate plus the commission.
-
setFwdPoints
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setFwdPoints(@NotNull @NotNull BigDecimal fwdPoints)
- Parameters:
fwdPoints
- e.g. 0.001198- Returns:
- fwdPoints
-
setFwdPoints
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setFwdPoints(@NotNull @NotNull String fwdPoints)
- Parameters:
fwdPoints
- e.g. 0.001198- Returns:
- fwdPoints
-
setFwdMidPoints
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setFwdMidPoints(@NotNull @NotNull BigDecimal fwdMidPoints)
- Parameters:
fwdMidPoints
- e.g. 0.005390- Returns:
- The number of basis points added to or subtracted from the mid rate to determine the forward rate for delivery on a specific value date.
-
setFwdMidPoints
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setFwdMidPoints(@NotNull @NotNull String fwdMidPoints)
- Parameters:
fwdMidPoints
- e.g. 0.005390- Returns:
- The number of basis points added to or subtracted from the mid rate to determine the forward rate for delivery on a specific value date.
-
setFwdPips
@Deprecated @NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setFwdPips(@NotNull @NotNull String fwdPips)
Deprecated.- Parameters:
fwdPips
- e.g. 11.98- Returns:
- fwdPips
-
setBuySell
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setBuySell(@NotNull @NotNull String buySell)
- Returns:
- The direction of the trade or trade leg, from the client's perspective. This always refers to the BaseCurrency, NOT the DealtCurrency.
-
setAmount
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setAmount(@NotNull @NotNull BigDecimal amount, boolean isEditable, boolean isRisk)
- Returns:
- The amount of a trade or order in the DealtCurrency.
-
setAmount
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setAmount(@NotNull @NotNull BigDecimal amount)
- Returns:
- The amount of a trade or order in the DealtCurrency.
-
setAmount
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setAmount(@NotNull @NotNull String amount, boolean isEditable, boolean isRisk)
- Returns:
- The amount of a trade or order in the DealtCurrency.
-
setAmount
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setAmount(@NotNull @NotNull String amount)
- Returns:
- The amount of a trade or order in the DealtCurrency.
-
setAmountEditable
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setAmountEditable()
-
setAmountRisk
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setAmountRisk()
-
setContraAmount
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setContraAmount(@NotNull @NotNull BigDecimal contraAmount)
- Parameters:
contraAmount
- e.g. 350- Returns:
- The amount that is exchanged for the Amount. This will be defined in the contra currency of the DealtCurrency.
-
setContraAmount
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setContraAmount(@NotNull @NotNull String contraAmount)
- Parameters:
contraAmount
- e.g. 350- Returns:
- The amount that is exchanged for the Amount. This will be defined in the contra currency of the DealtCurrency.
-
setTenor
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setTenor(@NotNull @NotNull String tenor, boolean isEditable, boolean isRisk)
- Parameters:
tenor
- e.g. 1M- Returns:
- Supported types are [ON, [TODAY, TOD, TD], TN, [TOM, ND], SPOT, SN, 1D, 1W, 2W, 3W, 4W, 1M, 2M, 4M, 5M, 6M, 7M, 8M, 9M, 10M, 11M, [1Y, 12M], 15M, 18M, 21M, [2Y, 24M], [3Y, 36M], [4Y, 48M], [5Y, 60M], broken]. broken indicates that a SettlementDate must be sent
-
setTenor
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setTenor(@NotNull @NotNull String tenor)
- Parameters:
tenor
- e.g. 1M- Returns:
- Supported types are [ON, [TODAY, TOD, TD], TN, [TOM, ND], SPOT, SN, 1D, 1W, 2W, 3W, 4W, 1M, 2M, 4M, 5M, 6M, 7M, 8M, 9M, 10M, 11M, [1Y, 12M], 15M, 18M, 21M, [2Y, 24M], [3Y, 36M], [4Y, 48M], [5Y, 60M], broken]. broken indicates that a SettlementDate must be sent
-
setTenorEditable
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setTenorEditable()
-
setTenorRisk
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setTenorRisk()
-
setSettlementDate
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setSettlementDate(@NotNull @NotNull String settlementDate, boolean isEditable, boolean isRisk)
- Returns:
- settlementDate
-
setSettlementDate
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setSettlementDate(@NotNull @NotNull String settlementDate)
- Returns:
- settlementDate
-
setSettlementDateEditable
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setSettlementDateEditable()
-
setSettlementDateRisk
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setSettlementDateRisk()
-
setFilledAmount
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setFilledAmount(@NotNull @NotNull BigDecimal filledAmount)
- Parameters:
filledAmount
- e.g. 0- Returns:
- filledAmount
-
setFilledAmount
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setFilledAmount(@NotNull @NotNull String filledAmount)
- Parameters:
filledAmount
- e.g. 0- Returns:
- filledAmount
-
setRemainingAmount
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setRemainingAmount(@NotNull @NotNull BigDecimal remainingAmount)
- Parameters:
remainingAmount
- e.g. 500- Returns:
- remainingAmount
-
setRemainingAmount
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setRemainingAmount(@NotNull @NotNull String remainingAmount)
- Parameters:
remainingAmount
- e.g. 500- Returns:
- remainingAmount
-
setRiskDate
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setRiskDate(@NotNull @NotNull String riskDate)
- Parameters:
riskDate
- e.g. 20160314- Returns:
- The date in the settlement window which yields the lowest client sell price, or the highest client buy price.
-
setRiskTenor
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setRiskTenor(@NotNull @NotNull String riskTenor)
- Parameters:
riskTenor
- e.g. 1W- Returns:
- The tenor in the settlement window which yields the lowest client sell price, or the highest client buy price.
-
setStartDate
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setStartDate(@NotNull @NotNull String startDate, boolean isRisk)
- Parameters:
startDate
- e.g. 20150620- Returns:
- startDate
-
setStartDate
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setStartDate(@NotNull @NotNull String startDate)
- Parameters:
startDate
- e.g. 20150620- Returns:
- startDate
-
setStartDateRisk
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setStartDateRisk()
-
setStartTenor
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setStartTenor(@NotNull @NotNull String startTenor, boolean isRisk)
- Parameters:
startTenor
- e.g. 1W- Returns:
- startTenor
-
setStartTenor
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setStartTenor(@NotNull @NotNull String startTenor)
- Parameters:
startTenor
- e.g. 1W- Returns:
- startTenor
-
setStartTenorRisk
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setStartTenorRisk()
-
setIsTimeOption
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setIsTimeOption(boolean isTimeOption)
- Parameters:
isTimeOption
- e.g. true- Returns:
- true if a leg is time-option
-
setIsTimeOption
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setIsTimeOption(@NotNull @NotNull String isTimeOption)
- Parameters:
isTimeOption
- e.g. true- Returns:
- true if a leg is time-option
-
setAccount
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setAccount(@NotNull @NotNull String account)
- 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>
-
setProfit
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setProfit(@NotNull @NotNull BigDecimal profit)
- Parameters:
profit
- e.g. 1000- Returns:
- The sales profit in the specified currency.
-
setProfit
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setProfit(@NotNull @NotNull String profit)
- Parameters:
profit
- e.g. 1000- Returns:
- The sales profit in the specified currency.
-
setCostAmount
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setCostAmount(@NotNull @NotNull 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.LegTradeConfirmationFields.Builder setCostAmount(@NotNull @NotNull String costAmount)
- Parameters:
costAmount
- e.g. 12412891.31- Returns:
- The actual transactional cost of performing the trade to the client in the home currency
-
setEntityId
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setEntityId(@NotNull @NotNull 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. If this field is absent on a leg then the default entity should be presumed.
-
setCostCurrency
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.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
-
setCostPercentage
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setCostPercentage(@NotNull @NotNull 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.LegTradeConfirmationFields.Builder setCostPercentage(@NotNull @NotNull 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.LegTradeConfirmationFields.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 TradeConfPartsDef.LegTradeConfirmationFields.Builder setContraCostAmount(@NotNull @NotNull String contraCostAmount)
- Returns:
- The actual transactional cost of performing the trade to the client on the contra currency
-
setContraCostCurrency
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setContraCostCurrency(@NotNull @NotNull BigDecimal contraCostCurrency)
- Returns:
- The contra currency that the cost is displayed in
-
setContraCostCurrency
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setContraCostCurrency(@NotNull @NotNull String contraCostCurrency)
- Returns:
- The contra currency that the cost is displayed in
-
setContraCostPercentage
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.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 TradeConfPartsDef.LegTradeConfirmationFields.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%.
-
setTOBOUser
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setTOBOUser(@NotNull @NotNull 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.
-
setTOBOUser
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setTOBOUser(@NotNull @NotNull String tOBOUser)
- 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.LegTradeConfirmationFields.Builder setTOBOUserEditable()
-
setTOBOUserRisk
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setTOBOUserRisk()
-
setForwardPointsDecimalOffset
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setForwardPointsDecimalOffset(int forwardPointsDecimalOffset)
- Parameters:
forwardPointsDecimalOffset
- e.g. 4- Returns:
- Optional override to determine the number of decimal places to move forward points before displaying them. Should be used if standard display of pips is not desired.
-
setForwardPointsDecimalOffset
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setForwardPointsDecimalOffset(@NotNull @NotNull String forwardPointsDecimalOffset)
- Parameters:
forwardPointsDecimalOffset
- e.g. 4- Returns:
- Optional override to determine the number of decimal places to move forward points before displaying them. Should be used if standard display of pips is not desired.
-
setSettlementTradeFields
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setSettlementTradeFields(@NotNull SettlementInstructionsPartsDef.SettlementTradeFields settlementTradeFields)
- Returns:
- settlementTradeFields
-
setNostroAccountFields
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setNostroAccountFields(@NotNull SettlementInstructionsPartsDef.NostroAccount nostroAccountFields)
- Returns:
- nostroAccountFields
-
addRemarks
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder addRemarks(@NotNull @NotNull TradeConfPartsDef.RemarksEntry remarks)
- Returns:
- remarks
-
setRemarks
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder setRemarks(@NotNull @NotNull TradeConfPartsDef.RemarksEntry remarks, int id)
- Returns:
- remarks
-
addAllRemarks
@NotNull public @NotNull TradeConfPartsDef.LegTradeConfirmationFields.Builder addAllRemarks(@NotNull @NotNull Collection<TradeConfPartsDef.RemarksEntry> remarks)
- Returns:
- remarks
-
-