|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dxfeed.api.event.Event
com.dxfeed.api.event.TimeAndSale
public final class TimeAndSale
Time and Sale represents a trade (or other market event with price, e.g. market open/close price, etc.).
Time and Sales are intended to provide information about trades in a continuous time slice
(unlike Trade
events which are supposed to provide information about the current last trade).
Time and Sale events have unique event IDs
which can be used for later
correction/cancellation processing.
Constructor Summary | |
---|---|
TimeAndSale()
|
|
TimeAndSale(java.lang.String eventSymbol)
|
Method Summary | |
---|---|
double |
getAskPrice()
|
double |
getBidPrice()
|
long |
getEventId()
Returns identifier of this event. |
char |
getExchangeCode()
|
java.lang.String |
getExchangeSaleConditions()
Returns sale conditions provided for this event by data feed. |
double |
getPrice()
|
long |
getSize()
|
long |
getTime()
Returns timestamp of original event in milliseconds. |
boolean |
isCancel()
Returns whether this is a cancellation of a previous event. |
boolean |
isCorrection()
Returns whether this is a correction of a previous event. |
boolean |
isNew()
Returns whether this is a new event (not cancellation or correction). |
boolean |
isTrade()
Returns true if this event represents a trade. |
void |
setAskPrice(double askPrice)
|
void |
setBidPrice(double bidPrice)
|
void |
setCancel()
|
void |
setCorrection()
|
void |
setEventId(long eventId)
|
void |
setExchangeCode(char exchangeCode)
|
void |
setExchangeSaleConditions(java.lang.String exchangeSaleConditions)
|
void |
setNew()
|
void |
setPrice(double price)
|
void |
setSize(long size)
|
void |
setTime(long time)
|
void |
setTrade(boolean trade)
|
java.lang.String |
toString()
|
Methods inherited from class com.dxfeed.api.event.Event |
---|
getEventSymbol, setEventSymbol |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TimeAndSale()
public TimeAndSale(java.lang.String eventSymbol)
Method Detail |
---|
public long getEventId()
public void setEventId(long eventId)
public long getTime()
public void setTime(long time)
public char getExchangeCode()
public void setExchangeCode(char exchangeCode)
public double getPrice()
public void setPrice(double price)
public long getSize()
public void setSize(long size)
public double getBidPrice()
public void setBidPrice(double bidPrice)
public double getAskPrice()
public void setAskPrice(double askPrice)
public java.lang.String getExchangeSaleConditions()
public void setExchangeSaleConditions(java.lang.String exchangeSaleConditions)
public boolean isTrade()
true
if this event represents a trade.
Note, that correction for a previously distributed trade represents a new trade,
but trade cancellation does not.
true
if this event is a tradepublic void setTrade(boolean trade)
public boolean isNew()
public void setNew()
public boolean isCorrection()
public void setCorrection()
public boolean isCancel()
public void setCancel()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |