Record Class CorporateActionsSseRequest

java.lang.Object
java.lang.Record
markets.alpaca.client.data.sse.CorporateActionsSseRequest

public record CorporateActionsSseRequest(List<CorporateActionEventType> eventTypes, CorporateActionsSseRequest.Region region, OffsetDateTime since, OffsetDateTime until, String sinceId, String untilId) extends Record
Filters and history cursors for the Market Data corporate-actions SSE endpoint.

ID cursors are uppercase ULIDs. When AlpacaSseOptions.initialLastEventId() is configured, the transport sends it in Last-Event-ID; the endpoint gives that header precedence over sinceId().

  • Constructor Details

    • CorporateActionsSseRequest

      public CorporateActionsSseRequest(List<CorporateActionEventType> eventTypes, CorporateActionsSseRequest.Region region, OffsetDateTime since, OffsetDateTime until, String sinceId, String untilId)
      Creates an instance of a CorporateActionsSseRequest record class.
      Parameters:
      eventTypes - the value for the eventTypes record component
      region - the value for the region record component
      since - the value for the since record component
      until - the value for the until record component
      sinceId - the value for the sinceId record component
      untilId - the value for the untilId record component
  • Method Details

    • live

      public static CorporateActionsSseRequest live()
      Returns a live, unfiltered subscription request.
    • fromEventId

      public static CorporateActionsSseRequest fromEventId(String sinceId)
      Returns an unbounded request starting from an event ID.
    • throughEventId

      public static CorporateActionsSseRequest throughEventId(String sinceId, String untilId)
      Returns a bounded request spanning two event IDs.
    • builder

      public static CorporateActionsSseRequest.Builder builder()
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • eventTypes

      public List<CorporateActionEventType> eventTypes()
      Returns the value of the eventTypes record component.
      Returns:
      the value of the eventTypes record component
    • region

      Returns the value of the region record component.
      Returns:
      the value of the region record component
    • since

      public OffsetDateTime since()
      Returns the value of the since record component.
      Returns:
      the value of the since record component
    • until

      public OffsetDateTime until()
      Returns the value of the until record component.
      Returns:
      the value of the until record component
    • sinceId

      public String sinceId()
      Returns the value of the sinceId record component.
      Returns:
      the value of the sinceId record component
    • untilId

      public String untilId()
      Returns the value of the untilId record component.
      Returns:
      the value of the untilId record component