org.otfeed.event
Class OTQuote

java.lang.Object
  extended by org.otfeed.event.OTQuote
All Implemented Interfaces:
java.lang.Comparable<OTQuote>

public final class OTQuote
extends java.lang.Object
implements java.lang.Comparable<OTQuote>

This class provides either a real-time or a historical level I quote from an exchange. This comes from the exchange when the price or size of either the bid or ask changes. Both the bid and the ask prices along with their sizes are provided in a quote.


Constructor Summary
OTQuote()
          Default constructor.
OTQuote(java.util.Date timestamp, int bidSize, double bidPrice, int askSize, double askPrice, java.lang.String askExchange, char indicator, char tickIndicator, java.lang.String bidExchange, java.lang.String exchange, java.lang.String symbol)
          Constructor.
 
Method Summary
 int compareTo(OTQuote other)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getAskExchange()
           
 double getAskPrice()
           
 int getAskSize()
           
 java.lang.String getBidExchange()
           
 double getBidPrice()
           
 int getBidSize()
           
 java.lang.String getExchange()
           
 char getIndicator()
           
 java.lang.String getSymbol()
           
 char getTickIndicator()
           
 java.util.Date getTimestamp()
           
 int hashCode()
           
 void setAskExchange(java.lang.String askExchange)
          Stes ask exchange identifier.
 void setAskPrice(double askPrice)
          Sets ask price.
 void setAskSize(int askSize)
          Sets number of round lots in the ask.
 void setBidExchange(java.lang.String val)
          Sets bidExchange value.
 void setBidPrice(double bidPrice)
          Sets bid price.
 void setBidSize(int bidSize)
          Sets number of round lots in the bid.
 void setExchange(java.lang.String exchange)
          Sets exchange code.
 void setIndicator(char indicator)
          Sets indicator.
 void setSymbol(java.lang.String symbol)
          Symbol code.
 void setTickIndicator(char tickIndicator)
          Sets tick indicator: D - Down, U - Up, N - Not provided.
 void setTimestamp(java.util.Date timestamp)
          Sets time of the event.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OTQuote

public OTQuote()
Default constructor.


OTQuote

public OTQuote(java.util.Date timestamp,
               int bidSize,
               double bidPrice,
               int askSize,
               double askPrice,
               java.lang.String askExchange,
               char indicator,
               char tickIndicator,
               java.lang.String bidExchange,
               java.lang.String exchange,
               java.lang.String symbol)
Constructor.

Parameters:
timestamp - Time when the event occurred.
bidSize - Number of round lots in the bid.
bidPrice - Bid price.
askSize - Number of round lots in the ask.
askPrice - Ask price.
askExchange - Ask exchange identifier.
indicator - Bid exchange identifier.
tickIndicator - Indicator.
bidExchange - Bid exchange identifier.
exchange - Exchange code.
symbol - Symbol code.
Method Detail

getTimestamp

public java.util.Date getTimestamp()
Returns:
Time when the event occurred.

setTimestamp

public void setTimestamp(java.util.Date timestamp)
Sets time of the event.

Parameters:
timestamp - Time when the event occurred.

getBidSize

public int getBidSize()
Returns:
Number of round lots in the bid.

setBidSize

public void setBidSize(int bidSize)
Sets number of round lots in the bid.

Parameters:
bidSize - Number of round lots in the bid.

getBidPrice

public double getBidPrice()
Returns:
Bid price.

setBidPrice

public void setBidPrice(double bidPrice)
Sets bid price.

Parameters:
bidPrice - Bid price.

getAskSize

public int getAskSize()
Returns:
Number of round lots in the ask.

setAskSize

public void setAskSize(int askSize)
Sets number of round lots in the ask.

Parameters:
askSize - Number of round lots in the ask.

getAskPrice

public double getAskPrice()
Returns:
Ask price.

setAskPrice

public void setAskPrice(double askPrice)
Sets ask price.

Parameters:
askPrice - Ask price.

getAskExchange

public java.lang.String getAskExchange()
Returns:
Ask exchange identifier.

setAskExchange

public void setAskExchange(java.lang.String askExchange)
Stes ask exchange identifier.

Parameters:
askExchange - Ask exchange identifier.

getIndicator

public char getIndicator()
Returns:
Indicator.

setIndicator

public void setIndicator(char indicator)
Sets indicator.

Parameters:
indicator - Indicator.

getTickIndicator

public char getTickIndicator()
Returns:
Tick indicator: D - Down, U - Up, N - Not provided.

setTickIndicator

public void setTickIndicator(char tickIndicator)
Sets tick indicator: D - Down, U - Up, N - Not provided.

Parameters:
tickIndicator - Tick indicator: D - Down, U - Up, N - Not provided.

getBidExchange

public java.lang.String getBidExchange()
Returns:
Bid exchange identifier.

setBidExchange

public void setBidExchange(java.lang.String val)
Sets bidExchange value.


getExchange

public java.lang.String getExchange()
Returns:
Exchange code.

setExchange

public void setExchange(java.lang.String exchange)
Sets exchange code.

Parameters:
exchange - Exchange code.

getSymbol

public java.lang.String getSymbol()
Returns:
Symbol code; this field is provided for option chains only, because there can be more than one symbol appropriate to the requested underlyer and expiry date.

setSymbol

public void setSymbol(java.lang.String symbol)
Symbol code.

Parameters:
symbol - Symbol code.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(OTQuote other)
Specified by:
compareTo in interface java.lang.Comparable<OTQuote>


Copyright © 2007 Mike Kroutikov. All Rights Reserved.