com.fxcm.fix.pretrade
Class MarketDataSnapshot

java.lang.Object
  extended by com.fxcm.fix.pretrade.MarketDataSnapshot
All Implemented Interfaces:
ITransportable
Direct Known Subclasses:
MarketDataSnapshot, MarketDataSnapshot

public abstract class MarketDataSnapshot
extends Object
implements ITransportable

Market Data Snapshot Full Refresh, FIX 4-3 with historical snapshots.


Field Summary
static com.fxcm.entity.ICode OBJ_TYPE
          Object Type
 
Method Summary
 boolean equals(Object o)
           
abstract  boolean fill(IMessage aMsg)
          Recreates object state from given message.
 double getAskClose()
          Obtains closing ask price.
abstract  String getAskCurrency()
          Returns dealt currency, when field empty dealt currency is a left currency of quote symbol
abstract  double getAskEntrySize()
          Returns quote liquidity, impressed in dealt currency, when field is missed any order quantity possible
abstract  UTCDate getAskExpireDate()
          Returns quote expiration date
abstract  UTCTimeOnly getAskExpireTime()
          Returns quote expiration time
 double getAskHigh()
          Obtains high ask price.
abstract  String getAskId()
          Returns ask quote id
 double getAskLow()
          Obtains low ask price.
 double getAskOpen()
          Obtains opening ask price.
abstract  String getAskOriginator()
          Returns name of quote source
abstract  String getAskQuoteCondition()
          Returns quote condition, Possible values: "A" active "B" closed
abstract  int getAskQuoteType()
          Returns quote Type.
 double getBidClose()
          Obtains closing bid price.
abstract  String getBidCurrency()
          Returns dealt currency, when field empty dealt currency is a left currency of quote symbol
abstract  double getBidEntrySize()
          Returns quote liquidity, impressed in dealt currency, when field is missed any order quantity possible
abstract  UTCDate getBidExpireDate()
          Returns quote expiration date
abstract  UTCTimeOnly getBidExpireTime()
          Returns quote expiration time
 double getBidHigh()
          Obtains high bid price.
abstract  String getBidId()
          Returns bid quote id
 double getBidLow()
          Obtains low bid price.
 double getBidOpen()
          Obtains opening bid price.
abstract  String getBidOriginator()
          Returns name of quote source
abstract  String getBidQuoteCondition()
          Returns quote condition, Possible values: "A" active "B" closed
abstract  int getBidQuoteType()
          Returns quote Type.
 UTCTimestamp getCloseTimestamp()
          Obtains ending snapshot timestamp.
 UTCDate getDate()
          Obtains snapshot date.
 int getFXCMContinuousFlag()
          Obtains Continuous Flag value.
 Long getFXCMMsgID()
          Obtains an ID of message
 IFXCMTimingInterval getFXCMTimingInterval()
          Obtains candle timing interval.
 double getHigh()
          Obtains trade session high price for ticks.
 Instrument getInstrument()
          Obtains snapshot currency.
 double getLow()
          Obtains trade session low price for ticks.
 long getMakingTime()
          Return the time when this instance of ITransportable object was made
 
 String getMDReqID()
          Obtains current market data request ID.
 String getName()
          Deprecated.  
 UTCTimestamp getOpenTimestamp()
          Obtains starting snapshot timestamp.
 UTCTimestamp getOpenTimestampRef()
          Deprecated. use getOpenTimestamp() instead
 String getOriginator()
          Originator of the Market Data Entry
 String getPriceStream()
           
 String getQuoteID()
          Obtains the Quote ID for this Snapshot, Uniquely identifies the quote
 String getRequestID()
          Obtains message request ID.
 Object getTickTime()
           
 int getTickVolume()
           
 UTCTimeOnly getTime()
          Obtains snapshot time.
 String getTradingSessionID()
          Obtains the Trading Session ID
 String getTradingSessionSubID()
          Obtains the Trading Session Sub ID
 com.fxcm.entity.ICode getType()
          Obtains object type.
 int hashCode()
           
 boolean isComplete()
          Determines whether candle is completed.
 boolean isTradeable()
          Returns if Tradeable
 boolean isValid()
          Validates object state.
 void reset()
          Reset object state to default values.
abstract  void setAskClose(double aAskClose)
          Updates closing ask price.
abstract  void setAskCurrency(String aAskCurrency)
          Sets dealt currency, when field empty dealt currency is a left currency of quote symbol
abstract  void setAskEntrySize(double aAskEntrySize)
          Sets quote liquidity, impressed in dealt currency, when field is missed any order quantity possible
abstract  void setAskExpireDate(UTCDate aAskExpireDate)
          Sets quote expiration date
abstract  void setAskExpireTime(UTCTimeOnly aAskExpireTime)
          Sets quote expiration time
abstract  void setAskHigh(double aAskHigh)
          Updates high ask price.
abstract  void setAskId(String aAskId)
          Sets ask quote id
abstract  void setAskLow(double aAskLow)
          Updates low ask price.
abstract  void setAskOpen(double aAskOpen)
          Updates opening ask price.
abstract  void setAskOriginator(String aAskOriginator)
          Sets name of quote source
abstract  void setAskQuoteCondition(String aAskQuoteCondition)
          Sets quote condition, Possible values: "A" active "B" closed
abstract  void setAskQuoteType(int aAskQuoteType)
          Sets quote Type.
abstract  void setBidClose(double aBidClose)
          Updates closing bid price.
abstract  void setBidCurrency(String aBidCurrency)
          Sets dealt currency, when field empty dealt currency is a left currency of quote symbol
abstract  void setBidEntrySize(double aBidEntrySize)
          Sets quote liquidity, impressed in dealt currency, when field is missed any order quantity possible
abstract  void setBidExpireDate(UTCDate aBidExpireDate)
          Sets quote expiration date
abstract  void setBidExpireTime(UTCTimeOnly aBidExpireTime)
          Sets quote expiration time
abstract  void setBidHigh(double aBidHigh)
          Updates high bid price.
abstract  void setBidId(String aBidId)
          Sets bid quote id
abstract  void setBidLow(double aBidLow)
          Updates low bid price.
abstract  void setBidOpen(double aBidOpen)
          Updates opening bid price.
abstract  void setBidOriginator(String aBidOriginator)
          Sets name of quote source
abstract  void setBidQuoteCondition(String aBidQuoteCondition)
          Sets quote condition, Possible values: "A" active "B" closed
abstract  void setBidQuoteType(int aBidQuoteType)
          Sets quote Type.
 void setComplete(boolean aComplete)
          Updates canlde completed flag.
 void setDate(UTCDate aDate)
          Updates snapshot date.
 void setFXCMContinuousFlag(int aValue)
          Updates Continuous Flag value.
 void setFXCMMsgID(Long aValue)
          Updates ID of message
 void setFXCMTimingInterval(IFXCMTimingInterval aInterval)
          Updates candle timing interval.
abstract  void setHigh(double aHigh)
          Updates trading session high price.
 void setInstrument(Instrument aInstrument)
          Updates snapshot currency.
abstract  void setLow(double aLow)
          Updates trading session low price.
 void setMDReqID(String aMDReqID)
          Sets Market Data Request ID, unique identifier.
 void setOpenTimestamp(UTCTimestamp aTime)
          Update date and time fields.
 void setOriginator(String aOriginator)
          Sets the Originator of the Market Data Entry
 void setPriceStream(String aPriceStream)
           
 void setQuoteID(String aQuoteID)
          Sets the Quote ID for this snapshot, Uniquely identifies the quote
abstract  void setTickVolume(int aTickVolume)
          Update period tick volume.
 void setTime(UTCTimeOnly aTime)
          Updates snapshot time.
 void setTradeable(boolean aIsTradeable)
          Sets the tradeable status
 void setTradingSessionID(String aTradingSessionID)
          Updates Trading Session ID.
 void setTradingSessionSubID(String aTradingSessionSubID)
          Updates Trading Session sub ID.
 IMessage toMessage(String aSID, IMessageFactory aFactory)
          Converts object to message.
abstract  IMessage toMessage(String aSID, String aTradingSessionID, String aTradingSessionSubID, String aRequestID, int aMDEntryTypeSet, IMessageFactory aFactory)
          Converts object to IMessage.
 boolean update(IMessage aMsg)
          Updates object state based on given message.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OBJ_TYPE

public static final com.fxcm.entity.ICode OBJ_TYPE
Object Type

Method Detail

setPriceStream

public void setPriceStream(String aPriceStream)

getPriceStream

public String getPriceStream()

isTradeable

public boolean isTradeable()
Returns if Tradeable


setTradeable

public void setTradeable(boolean aIsTradeable)
Sets the tradeable status

Parameters:
aIsTradeable -

getQuoteID

public String getQuoteID()
Obtains the Quote ID for this Snapshot, Uniquely identifies the quote

Returns:
quoteID

setQuoteID

public void setQuoteID(String aQuoteID)
Sets the Quote ID for this snapshot, Uniquely identifies the quote

Parameters:
aQuoteID -

getOriginator

public String getOriginator()
Originator of the Market Data Entry

Returns:
entry originator

setOriginator

public void setOriginator(String aOriginator)
Sets the Originator of the Market Data Entry

Parameters:
aOriginator -

getType

public com.fxcm.entity.ICode getType()
Description copied from interface: ITransportable
Obtains object type.


 

Specified by:
getType in interface ITransportable
Returns:
code of object type.

getName

public String getName()
Deprecated. 

Obtains entity name.

Returns:
Entity name (based on entity PK)

setMDReqID

public void setMDReqID(String aMDReqID)
Sets Market Data Request ID, unique identifier.

Conditionally required if this message is in response to a Market Data

Parameters:
aMDReqID - ID of original request

setTradingSessionID

public void setTradingSessionID(String aTradingSessionID)
Updates Trading Session ID.

"FXCM" by default.

Parameters:
aTradingSessionID -

setTradingSessionSubID

public void setTradingSessionSubID(String aTradingSessionSubID)
Updates Trading Session sub ID.

Use that as dealing desk name. Empty by default.

Parameters:
aTradingSessionSubID -

setInstrument

public void setInstrument(Instrument aInstrument)
Updates snapshot currency.

Parameters:
aInstrument -

setTime

public void setTime(UTCTimeOnly aTime)
Updates snapshot time.

"00:00:00" by default.

Parameters:
aTime - UTC time

setDate

public void setDate(UTCDate aDate)
Updates snapshot date.

Current date by default.

Parameters:
aDate - UTC date

setAskLow

public abstract void setAskLow(double aAskLow)
Updates low ask price.

0.00 by default.

Parameters:
aAskLow -

setAskHigh

public abstract void setAskHigh(double aAskHigh)
Updates high ask price.

0.00 by default.

Parameters:
aAskHigh - high ask price

setAskOpen

public abstract void setAskOpen(double aAskOpen)
Updates opening ask price.

Ask price for ticks.0.00 by default.

Parameters:
aAskOpen - opening ask price

setAskClose

public abstract void setAskClose(double aAskClose)
Updates closing ask price.

0.00 by default.

Parameters:
aAskClose - closing ask price

setLow

public abstract void setLow(double aLow)
Updates trading session low price.

0.00 by default.

Parameters:
aLow - low price

setHigh

public abstract void setHigh(double aHigh)
Updates trading session high price.

0.00 by default.

Parameters:
aHigh - high price

setBidLow

public abstract void setBidLow(double aBidLow)
Updates low bid price.

0.00 by default.

Parameters:
aBidLow - low bid price

setBidHigh

public abstract void setBidHigh(double aBidHigh)
Updates high bid price.

0.00 by default.

Parameters:
aBidHigh - high bid price

setBidOpen

public abstract void setBidOpen(double aBidOpen)
Updates opening bid price.

Bid price for ticks. 0.00 by default.

Parameters:
aBidOpen - opening bid price

setBidClose

public abstract void setBidClose(double aBidClose)
Updates closing bid price.

0.00 by default.

Parameters:
aBidClose - closing bid price

setTickVolume

public abstract void setTickVolume(int aTickVolume)
Update period tick volume.

Parameters:
aTickVolume -

setFXCMTimingInterval

public void setFXCMTimingInterval(IFXCMTimingInterval aInterval)
Updates candle timing interval.

Tick by default.

Parameters:
aInterval - candle timing interval

setComplete

public void setComplete(boolean aComplete)
Updates canlde completed flag.

true by default.

Parameters:
aComplete - canlde completed flag

getMDReqID

public String getMDReqID()
Obtains current market data request ID.

Conditionally required if this message is in response to a Market Data Request.

Returns:
can be null when not present

getTradingSessionID

public String getTradingSessionID()
Description copied from interface: ITransportable
Obtains the Trading Session ID

Specified by:
getTradingSessionID in interface ITransportable

getTradingSessionSubID

public String getTradingSessionSubID()
Description copied from interface: ITransportable
Obtains the Trading Session Sub ID

Specified by:
getTradingSessionSubID in interface ITransportable

getInstrument

public Instrument getInstrument()
Obtains snapshot currency.

Returns:
can be null when not present

getTime

public UTCTimeOnly getTime()
Obtains snapshot time.

Returns:
can not be a null

getTickTime

public Object getTickTime()

getDate

public UTCDate getDate()
Obtains snapshot date.

Returns:
can not be a null

getOpenTimestamp

public UTCTimestamp getOpenTimestamp()
Obtains starting snapshot timestamp.

Returns:
new/cloned object or null

getOpenTimestampRef

public UTCTimestamp getOpenTimestampRef()
Deprecated. use getOpenTimestamp() instead

Obtains starting snapshot timestamp.

Returns:
refenecy to internal timestamp can be a null

setOpenTimestamp

public void setOpenTimestamp(UTCTimestamp aTime)
Update date and time fields.

Parameters:
aTime - can be a null

getCloseTimestamp

public UTCTimestamp getCloseTimestamp()
Obtains ending snapshot timestamp.

Returns:
can be a null

getAskLow

public double getAskLow()
Obtains low ask price.

Returns:
if not present return opening ask

getAskHigh

public double getAskHigh()
Obtains high ask price.

Returns:
if not present returns opening ask

getAskOpen

public double getAskOpen()
Obtains opening ask price.

For ticks this is ask price.

Returns:
can be a 0.00 opening ask

getAskClose

public double getAskClose()
Obtains closing ask price.

Returns:
if not present returns opening ask

getLow

public double getLow()
Obtains trade session low price for ticks.

Returns:
if not present returns opening bid

getHigh

public double getHigh()
Obtains trade session high price for ticks.

Returns:
if not present returns opening ask

getBidLow

public double getBidLow()
Obtains low bid price.

Returns:
if not present returns opening bid

getBidHigh

public double getBidHigh()
Obtains high bid price.

Returns:
if not present returns opening bid

getBidOpen

public double getBidOpen()
Obtains opening bid price.

Returns:
if not present returns 0.00

getBidClose

public double getBidClose()
Obtains closing bid price.

Returns:
if not present returns opening bid

getTickVolume

public int getTickVolume()

getFXCMTimingInterval

public IFXCMTimingInterval getFXCMTimingInterval()
Obtains candle timing interval.

Timing Interval requested can be omitted for non-historical Snapshot, Snapshot + Update,

Returns:
cannot be a null

isComplete

public boolean isComplete()
Determines whether candle is completed.

Returns:
true if candle is closed; false otherwise.

getFXCMContinuousFlag

public int getFXCMContinuousFlag()
Obtains Continuous Flag value.

Describes whether message within the message package, last message in package or just single message.

Returns:
one of FXCMCONTINUOUS_* values.

setFXCMContinuousFlag

public void setFXCMContinuousFlag(int aValue)
Updates Continuous Flag value.

Parameters:
aValue - one of FXCMCONTINUOUS_* values.

setFXCMMsgID

public void setFXCMMsgID(Long aValue)
Updates ID of message

Parameters:
aValue - could be set to null

getFXCMMsgID

public Long getFXCMMsgID()
Obtains an ID of message

Returns:
could a null

toMessage

public IMessage toMessage(String aSID,
                          IMessageFactory aFactory)
Converts object to message.


 

Specified by:
toMessage in interface ITransportable
Parameters:
aSID - User session ID
aFactory - message factory to create message objects
Returns:
Can be null in case of errors

toMessage

public abstract IMessage toMessage(String aSID,
                                   String aTradingSessionID,
                                   String aTradingSessionSubID,
                                   String aRequestID,
                                   int aMDEntryTypeSet,
                                   IMessageFactory aFactory)
Converts object to IMessage.


 

Specified by:
toMessage in interface ITransportable
Parameters:
aSID - user session ID
aTradingSessionID - Trading Session ID, to alternate a value from object state
aTradingSessionSubID - Trading Session Sub ID, to alternate a value from object state
aRequestID - Request ID, to alternate a value from object state
aFactory - message factory that is in use to process
aMDEntryTypeSet - Set of options for message creation, reserved
Returns:
new messge create or null if creation fails

reset

public void reset()
Reset object state to default values.


fill

public abstract boolean fill(IMessage aMsg)
Recreates object state from given message.

Specified by:
fill in interface ITransportable
Parameters:
aMsg - orignal message to fill out object state
Returns:
true when valid object state is generated and false in case of errors

update

public boolean update(IMessage aMsg)
Updates object state based on given message.

Specified by:
update in interface ITransportable
Parameters:
aMsg - orignal message to get updating fields from
Returns:
true when valid object state is generated and false in case of errors

isValid

public boolean isValid()
Validates object state.

Specified by:
isValid in interface ITransportable
Returns:
true when object state is valid and false otherwise

getBidId

public abstract String getBidId()
Returns bid quote id

Returns:
bid quote id

setBidId

public abstract void setBidId(String aBidId)
Sets bid quote id

Parameters:
aBidId - bid quote id

getAskId

public abstract String getAskId()
Returns ask quote id

Returns:
ask quote id

setAskId

public abstract void setAskId(String aAskId)
Sets ask quote id

Parameters:
aAskId - ask quote id

getBidQuoteCondition

public abstract String getBidQuoteCondition()
Returns quote condition, Possible values: "A" active "B" closed

Returns:
quote condition, Possible values: "A" active "B" closed

setBidQuoteCondition

public abstract void setBidQuoteCondition(String aBidQuoteCondition)
Sets quote condition, Possible values: "A" active "B" closed

Parameters:
aBidQuoteCondition - quote condition, Possible values: "A" active "B" closed

getBidQuoteType

public abstract int getBidQuoteType()
Returns quote Type. Possible values "0" - Indicative, "1" - Tradeable

Returns:
quote Type. Possible values "0" - Indicative, "1" - Tradeable

setBidQuoteType

public abstract void setBidQuoteType(int aBidQuoteType)
Sets quote Type. Possible values "0" - Indicative, "1" - Tradeable

Parameters:
aBidQuoteType - quote Type. Possible values "0" - Indicative, "1" - Tradeable

getBidExpireDate

public abstract UTCDate getBidExpireDate()
Returns quote expiration date

Returns:
quote expiration date

setBidExpireDate

public abstract void setBidExpireDate(UTCDate aBidExpireDate)
Sets quote expiration date

Parameters:
aBidExpireDate - quote expiration date

getBidExpireTime

public abstract UTCTimeOnly getBidExpireTime()
Returns quote expiration time

Returns:
quote expiration time

setBidExpireTime

public abstract void setBidExpireTime(UTCTimeOnly aBidExpireTime)
Sets quote expiration time

Parameters:
aBidExpireTime - quote expiration time

getBidOriginator

public abstract String getBidOriginator()
Returns name of quote source

Returns:
name of quote source

setBidOriginator

public abstract void setBidOriginator(String aBidOriginator)
Sets name of quote source

Parameters:
aBidOriginator - name of quote source

getBidCurrency

public abstract String getBidCurrency()
Returns dealt currency, when field empty dealt currency is a left currency of quote symbol

Returns:
dealt currency, when field empty dealt currency is a left currency of quote symbol

setBidCurrency

public abstract void setBidCurrency(String aBidCurrency)
Sets dealt currency, when field empty dealt currency is a left currency of quote symbol

Parameters:
aBidCurrency - dealt currency, when field empty dealt currency is a left currency of quote symbol

getBidEntrySize

public abstract double getBidEntrySize()
Returns quote liquidity, impressed in dealt currency, when field is missed any order quantity possible

Returns:
quote liquidity, impressed in dealt currency, when field is missed any order quantity possible

setBidEntrySize

public abstract void setBidEntrySize(double aBidEntrySize)
Sets quote liquidity, impressed in dealt currency, when field is missed any order quantity possible

Parameters:
aBidEntrySize - quote liquidity, impressed in dealt currency, when field is missed any order quantity possible

getAskQuoteCondition

public abstract String getAskQuoteCondition()
Returns quote condition, Possible values: "A" active "B" closed

Returns:
quote condition, Possible values: "A" active "B" closed

setAskQuoteCondition

public abstract void setAskQuoteCondition(String aAskQuoteCondition)
Sets quote condition, Possible values: "A" active "B" closed

Parameters:
aAskQuoteCondition - quote condition, Possible values: "A" active "B" closed

getAskQuoteType

public abstract int getAskQuoteType()
Returns quote Type. Possible values "0" - Indicative, "1" - Tradeable

Returns:
quote Type. Possible values "0" - Indicative, "1" - Tradeable

setAskQuoteType

public abstract void setAskQuoteType(int aAskQuoteType)
Sets quote Type. Possible values "0" - Indicative, "1" - Tradeable

Parameters:
aAskQuoteType - quote Type. Possible values "0" - Indicative, "1" - Tradeable

getAskExpireDate

public abstract UTCDate getAskExpireDate()
Returns quote expiration date

Returns:
quote expiration date

setAskExpireDate

public abstract void setAskExpireDate(UTCDate aAskExpireDate)
Sets quote expiration date

Parameters:
aAskExpireDate - quote expiration date

getAskExpireTime

public abstract UTCTimeOnly getAskExpireTime()
Returns quote expiration time

Returns:
quote expiration time

setAskExpireTime

public abstract void setAskExpireTime(UTCTimeOnly aAskExpireTime)
Sets quote expiration time

Parameters:
aAskExpireTime - quote expiration time

getAskOriginator

public abstract String getAskOriginator()
Returns name of quote source

Returns:
name of quote source

setAskOriginator

public abstract void setAskOriginator(String aAskOriginator)
Sets name of quote source

Parameters:
aAskOriginator - name of quote source

getAskCurrency

public abstract String getAskCurrency()
Returns dealt currency, when field empty dealt currency is a left currency of quote symbol

Returns:
dealt currency, when field empty dealt currency is a left currency of quote symbol

setAskCurrency

public abstract void setAskCurrency(String aAskCurrency)
Sets dealt currency, when field empty dealt currency is a left currency of quote symbol

Parameters:
aAskCurrency - dealt currency, when field empty dealt currency is a left currency of quote symbol

getAskEntrySize

public abstract double getAskEntrySize()
Returns quote liquidity, impressed in dealt currency, when field is missed any order quantity possible

Returns:
quote liquidity, impressed in dealt currency, when field is missed any order quantity possible

setAskEntrySize

public abstract void setAskEntrySize(double aAskEntrySize)
Sets quote liquidity, impressed in dealt currency, when field is missed any order quantity possible

Parameters:
aAskEntrySize - quote liquidity, impressed in dealt currency, when field is missed any order quantity possible

getRequestID

public String getRequestID()
Obtains message request ID.

Specified by:
getRequestID in interface ITransportable
Returns:
the same as getMDReqID().

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getMakingTime

public long getMakingTime()
Return the time when this instance of ITransportable object was made
 

Specified by:
getMakingTime in interface ITransportable
Returns:
object making time


Copyright © 2012 FXCM, LLC. All Rights Reserved.