Record Class VenueQuote

java.lang.Object
java.lang.Record
com.quantfinlib.execution.VenueQuote
Record Components:
lastUpdateNanos - the feed timestamp (same clock as the nowNanos passed to SmartOrderRouter.route(Side, long, List, boolean)) this quote was last refreshed at, so a router can detect a dead/frozen feed. Pass Long.MAX_VALUE only to mean "always fresh" (the 2.x 8-argument constructor did this).

public record VenueQuote(String venue, double bid, long bidSize, double ask, long askSize, double feeBps, long latencyNanos, boolean dark, long lastUpdateNanos) extends Record
A venue's dealable top of book for routing. For dark venues, bid/ask sizes are the estimated executable liquidity and fills are assumed at the venue's midpoint.
  • Constructor Summary

    Constructors
    Constructor
    Description
    VenueQuote(String venue, double bid, long bidSize, double ask, long askSize, double feeBps, long latencyNanos, boolean dark, long lastUpdateNanos)
    Creates an instance of a VenueQuote record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    ask()
    Returns the value of the ask record component.
    long
    Returns the value of the askSize record component.
    double
    bid()
    Returns the value of the bid record component.
    long
    Returns the value of the bidSize record component.
    boolean
    Returns the value of the dark record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    double
    Returns the value of the feeBps record component.
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the lastUpdateNanos record component.
    long
    Returns the value of the latencyNanos record component.
    double
    mid()
     
    final String
    Returns a string representation of this record class.
    Returns the value of the venue record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • VenueQuote

      public VenueQuote(String venue, double bid, long bidSize, double ask, long askSize, double feeBps, long latencyNanos, boolean dark, long lastUpdateNanos)
      Creates an instance of a VenueQuote record class.
      Parameters:
      venue - the value for the venue record component
      bid - the value for the bid record component
      bidSize - the value for the bidSize record component
      ask - the value for the ask record component
      askSize - the value for the askSize record component
      feeBps - the value for the feeBps record component
      latencyNanos - the value for the latencyNanos record component
      dark - the value for the dark record component
      lastUpdateNanos - the value for the lastUpdateNanos record component
  • Method Details

    • mid

      public double mid()
    • 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.
    • venue

      public String venue()
      Returns the value of the venue record component.
      Returns:
      the value of the venue record component
    • bid

      public double bid()
      Returns the value of the bid record component.
      Returns:
      the value of the bid record component
    • bidSize

      public long bidSize()
      Returns the value of the bidSize record component.
      Returns:
      the value of the bidSize record component
    • ask

      public double ask()
      Returns the value of the ask record component.
      Returns:
      the value of the ask record component
    • askSize

      public long askSize()
      Returns the value of the askSize record component.
      Returns:
      the value of the askSize record component
    • feeBps

      public double feeBps()
      Returns the value of the feeBps record component.
      Returns:
      the value of the feeBps record component
    • latencyNanos

      public long latencyNanos()
      Returns the value of the latencyNanos record component.
      Returns:
      the value of the latencyNanos record component
    • dark

      public boolean dark()
      Returns the value of the dark record component.
      Returns:
      the value of the dark record component
    • lastUpdateNanos

      public long lastUpdateNanos()
      Returns the value of the lastUpdateNanos record component.
      Returns:
      the value of the lastUpdateNanos record component