Record Class CreateUpdatePositionDTO

java.lang.Object
java.lang.Record
com.bluebell.greenhouse.platform.models.api.dto.position.CreateUpdatePositionDTO
Record Components:
positionFamily - position family
positionType - position type
optionType - option type
strikePrice - option strike price
expirationDate - option expiration date
contractMultiplier - units represented by one option contract
optionContractCode - optional broker or exchange option contract identifier
symbol - position symbol
positionOpened - position open date
positionName - position name
sourceSystem - optional imported source namespace
externalPositionKey - optional stable external position identity
sourceReference - optional raw upstream reference
positionComment - position comment
strategyUid - optional assigned strategy uid
strategyReferenceCode - optional assigned strategy reference code
stopLoss - stop loss
takeProfit - take profit

public record CreateUpdatePositionDTO(@NotBlank @Size(max=255) String positionFamily, @Size(max=255) String positionType, @Size(max=255) String optionType, @Positive @DecimalMax("999999999") Double strikePrice, @Size(max=255) String expirationDate, @Positive @DecimalMax("999999999") Double contractMultiplier, @Size(max=255) String optionContractCode, @NotBlank @Size(min=1,max=25) String symbol, @NotBlank @Size(max=255) String positionOpened, @NotBlank @Size(max=75) String positionName, @Size(max=255) String sourceSystem, @Size(max=255) String externalPositionKey, @Size(max=255) String sourceReference, String positionComment, @Size(max=255) String strategyUid, @Size(max=255) String strategyReferenceCode, @PositiveOrZero @DecimalMax("999999999") double stopLoss, @PositiveOrZero @DecimalMax("999999999") double takeProfit) extends Record
Request object for creating and updating Positions.
Version:
3.0.1
Author:
Stephen Prizio
  • Constructor Details

    • CreateUpdatePositionDTO

      public CreateUpdatePositionDTO(@NotBlank @Size(max=255) @NotBlank @Size(max=255) String positionFamily, @Size(max=255) @Size(max=255) String positionType, @Size(max=255) @Size(max=255) String optionType, @Positive @DecimalMax("999999999") @Positive @DecimalMax("999999999") Double strikePrice, @Size(max=255) @Size(max=255) String expirationDate, @Positive @DecimalMax("999999999") @Positive @DecimalMax("999999999") Double contractMultiplier, @Size(max=255) @Size(max=255) String optionContractCode, @NotBlank @Size(min=1,max=25) @NotBlank @Size(min=1,max=25) String symbol, @NotBlank @Size(max=255) @NotBlank @Size(max=255) String positionOpened, @NotBlank @Size(max=75) @NotBlank @Size(max=75) String positionName, @Size(max=255) @Size(max=255) String sourceSystem, @Size(max=255) @Size(max=255) String externalPositionKey, @Size(max=255) @Size(max=255) String sourceReference, String positionComment, @Size(max=255) @Size(max=255) String strategyUid, @Size(max=255) @Size(max=255) String strategyReferenceCode, @PositiveOrZero @DecimalMax("999999999") @PositiveOrZero @DecimalMax("999999999") double stopLoss, @PositiveOrZero @DecimalMax("999999999") @PositiveOrZero @DecimalMax("999999999") double takeProfit)
      Creates an instance of a CreateUpdatePositionDTO record class.
      Parameters:
      positionFamily - the value for the positionFamily record component
      positionType - the value for the positionType record component
      optionType - the value for the optionType record component
      strikePrice - the value for the strikePrice record component
      expirationDate - the value for the expirationDate record component
      contractMultiplier - the value for the contractMultiplier record component
      optionContractCode - the value for the optionContractCode record component
      symbol - the value for the symbol record component
      positionOpened - the value for the positionOpened record component
      positionName - the value for the positionName record component
      sourceSystem - the value for the sourceSystem record component
      externalPositionKey - the value for the externalPositionKey record component
      sourceReference - the value for the sourceReference record component
      positionComment - the value for the positionComment record component
      strategyUid - the value for the strategyUid record component
      strategyReferenceCode - the value for the strategyReferenceCode record component
      stopLoss - the value for the stopLoss record component
      takeProfit - the value for the takeProfit record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • positionFamily

      @NotBlank @Size(max=255) public @NotBlank @Size(max=255) String positionFamily()
      Returns the value of the positionFamily record component.
      Returns:
      the value of the positionFamily record component
    • positionType

      @Size(max=255) public @Size(max=255) String positionType()
      Returns the value of the positionType record component.
      Returns:
      the value of the positionType record component
    • optionType

      @Size(max=255) public @Size(max=255) String optionType()
      Returns the value of the optionType record component.
      Returns:
      the value of the optionType record component
    • strikePrice

      @Positive @DecimalMax("999999999") public @Positive @DecimalMax("999999999") Double strikePrice()
      Returns the value of the strikePrice record component.
      Returns:
      the value of the strikePrice record component
    • expirationDate

      @Size(max=255) public @Size(max=255) String expirationDate()
      Returns the value of the expirationDate record component.
      Returns:
      the value of the expirationDate record component
    • contractMultiplier

      @Positive @DecimalMax("999999999") public @Positive @DecimalMax("999999999") Double contractMultiplier()
      Returns the value of the contractMultiplier record component.
      Returns:
      the value of the contractMultiplier record component
    • optionContractCode

      @Size(max=255) public @Size(max=255) String optionContractCode()
      Returns the value of the optionContractCode record component.
      Returns:
      the value of the optionContractCode record component
    • symbol

      @NotBlank @Size(min=1, max=25) public @NotBlank @Size(min=1,max=25) String symbol()
      Returns the value of the symbol record component.
      Returns:
      the value of the symbol record component
    • positionOpened

      @NotBlank @Size(max=255) public @NotBlank @Size(max=255) String positionOpened()
      Returns the value of the positionOpened record component.
      Returns:
      the value of the positionOpened record component
    • positionName

      @NotBlank @Size(max=75) public @NotBlank @Size(max=75) String positionName()
      Returns the value of the positionName record component.
      Returns:
      the value of the positionName record component
    • sourceSystem

      @Size(max=255) public @Size(max=255) String sourceSystem()
      Returns the value of the sourceSystem record component.
      Returns:
      the value of the sourceSystem record component
    • externalPositionKey

      @Size(max=255) public @Size(max=255) String externalPositionKey()
      Returns the value of the externalPositionKey record component.
      Returns:
      the value of the externalPositionKey record component
    • sourceReference

      @Size(max=255) public @Size(max=255) String sourceReference()
      Returns the value of the sourceReference record component.
      Returns:
      the value of the sourceReference record component
    • positionComment

      public String positionComment()
      Returns the value of the positionComment record component.
      Returns:
      the value of the positionComment record component
    • strategyUid

      @Size(max=255) public @Size(max=255) String strategyUid()
      Returns the value of the strategyUid record component.
      Returns:
      the value of the strategyUid record component
    • strategyReferenceCode

      @Size(max=255) public @Size(max=255) String strategyReferenceCode()
      Returns the value of the strategyReferenceCode record component.
      Returns:
      the value of the strategyReferenceCode record component
    • stopLoss

      @PositiveOrZero @DecimalMax("999999999") public @PositiveOrZero @DecimalMax("999999999") double stopLoss()
      Returns the value of the stopLoss record component.
      Returns:
      the value of the stopLoss record component
    • takeProfit

      @PositiveOrZero @DecimalMax("999999999") public @PositiveOrZero @DecimalMax("999999999") double takeProfit()
      Returns the value of the takeProfit record component.
      Returns:
      the value of the takeProfit record component