694 lines
29 KiB
C
694 lines
29 KiB
C
|
|
#ifndef __GMAC_TEMPLATE_COMMON_H__
|
|
#define __GMAC_TEMPLATE_COMMON_H__
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
#ifndef GMAC_DEPRECATED
|
|
#define GMAC_DEPRECATED __attribute__((deprecated))
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif /* __cplusplus */
|
|
|
|
/** \defgroup dataformatcommon GMAC Data Format Common
|
|
* @{
|
|
* \brief Shared header file for the GMAC template
|
|
*/
|
|
|
|
/**
|
|
* \ingroup GMAC_UserAPI
|
|
* \brief Channel ID
|
|
*
|
|
* GMAC groups the multicasts it listens to into channels such that all the multicasts on
|
|
* the same market are in the same channel, and thus have the same channel ID. A market in
|
|
* this context corresponds to a gmac.market node in the GMAC configuration file (see the
|
|
* GMAC Configuration Guide for further details)
|
|
*
|
|
* This channel ID is returned by \ref GMACQueueRead.
|
|
*
|
|
* This is distinct from the LocalChannelId, which is unique for each multicast of the same
|
|
* type, within the same market, and which corresponds to the Id in the GMAC configuration file.
|
|
* To get the LocalChannelId, use \ref GMACGetLocalChannelID.
|
|
*/
|
|
typedef uint32_t GMACChannelID;
|
|
|
|
#define UNDEFINIED_GMAC_CHANNEL_ID ~0U
|
|
/**
|
|
* \ingroup GMAC_UserAPI
|
|
* \brief Multicast ID
|
|
*
|
|
* Unique multicast group identification. The GMACMulticastID is present in the \ref GMACPacketHeader.
|
|
*/
|
|
typedef uint32_t GMACMulticastID;
|
|
|
|
#define UNDEFINIED_GMAC_MULTICAST_ID ~0U
|
|
/**
|
|
* \brief ID of the source venue
|
|
*/
|
|
typedef uint8_t GMACVenueID;
|
|
|
|
/**
|
|
* \brief Side of the order
|
|
*/
|
|
typedef enum {
|
|
SIDE_ASK = -1, //!< Ask (Offer)
|
|
SIDE_UNKNOWN = 0,//!< Unknown
|
|
SIDE_BID = 1 //!< Bid
|
|
} GMACSideType;
|
|
|
|
|
|
/**
|
|
* \brief Order Side
|
|
*
|
|
* -1 Ask, 1 Bid, 0 Unknown
|
|
*/
|
|
typedef int8_t GMACSide;
|
|
|
|
/**
|
|
* \brief Market Local Instrument Name length
|
|
*/
|
|
#define GMAC_LOCAL_NAME_LENGTH 32
|
|
|
|
/**
|
|
* \brief Market Local Instrument Name prefix length
|
|
*/
|
|
#define GMAC_LOCAL_NAME_PREFIX_LENGTH 4
|
|
|
|
/**
|
|
* \brief EISIN length
|
|
*/
|
|
#define GMAC_EISIN_LENGTH 36
|
|
/* Note: (GMAC_LOCAL_NAME_LENGTH + GMAC_LOCAL_NAME_PREFIX_LENGTH) */
|
|
|
|
/**
|
|
* \brief Market Local Instrument Name
|
|
*
|
|
* Instrument name in the format used by the feed. If less than GMAC_LOCAL_NAME_LENGTH characters,
|
|
* C-standard zero byte is used at the end (null terminated string).
|
|
*/
|
|
typedef char GMACLocalName[GMAC_LOCAL_NAME_LENGTH];
|
|
|
|
/**
|
|
* \brief Market Local Instrument Index
|
|
*
|
|
* Instrument index in the format used by the feed. If less than GMAC_LOCAL_NAME_LENGTH characters,
|
|
* C-standard zero byte is used at the end.
|
|
*
|
|
*/
|
|
typedef char GMACLocalIndex[GMAC_LOCAL_NAME_LENGTH];
|
|
|
|
/**
|
|
* \brief Timesamp type from midnight, resolution nano seconds
|
|
*/
|
|
typedef uint64_t MidnightNanoSec;
|
|
|
|
#define UNDEFINED_MIDNIGHT_NANOSEC ~0ULL
|
|
|
|
|
|
#define UNDEFINED_RAW_EXCHANGE_CHANNEL_ID ~0ULL
|
|
/**
|
|
* \ingroup GMAC_UserAPI
|
|
* \brief Packet Header
|
|
*
|
|
* The packet header is prefixed to the data returned by \ref GMACQueueRead. It contains information about the data that follows.
|
|
*
|
|
* <ul>
|
|
* <li>\ref Messages and \ref Sequence can be used to detect gaps in the incoming data.
|
|
* (note: GMAC generates data without gaps if the recovery feature is enabled)</li>
|
|
* <li>\ref TranscodedMessages and/or \ref Length can be used to determine how many transcoded messages there are</li>
|
|
* <li>\ref MulticastID gives information about which multicast the data come from</li>
|
|
* </ul>
|
|
*/
|
|
|
|
typedef struct {
|
|
union
|
|
{
|
|
GMACMulticastID MulticastID; /**< \brief Multicast ID OLD NAME */
|
|
GMACChannelID DstChannel; /**< \brief Destination channel id (a one context sequence number data) */
|
|
};
|
|
union
|
|
{
|
|
GMACMulticastID OrigMulticastID; /**< \brief Original Multicast ID OLD NAME. Set when packet was redirected from another Multicast ID. Sometimes used for recovery. */
|
|
GMACChannelID SrcChannel; /**< \brief Source channel a unique identifier of originated channel */
|
|
};
|
|
|
|
uint64_t HWTimestamp; /**< \brief Time stamp from HW clock, taken when the last byte arrives from the wire */
|
|
uint8_t HWTimestampValid; /**< \brief Set to 1 when HWTimestamp is valid, otherwise set to 0 (Note: Some messages do not have HWTimestamp, e.g. when the message was received from the recovery server) */
|
|
uint8_t Live; /**< \brief Flags whether a packet originates from a live interface and has been delivered directly
|
|
and without buffering. I.e. this flag would be set to 0 for buffered packets (e.g. packets
|
|
waiting for a retransmission or a snapshot/refresh cycle), or for packets received as a
|
|
response to a retransmission or snapshot/refresh request. */
|
|
uint8_t Tainted; /**< \brief Set to 1 when the GMAC core passes a gap to the user. Remains set until the multicast is closed. */
|
|
uint8_t TranscodingType; /**< \brief Encoding type used for this feed, see \ref GMACChannelGetTranscodingType */
|
|
uint32_t Messages; /**< \brief Original number of messages in the packet (for next packet sequence checking) */
|
|
uint32_t TranscodedMessages; /**< \brief Number of transcoded messages */
|
|
|
|
uint32_t Length; /**< \brief Total length of the data including this header */
|
|
uint64_t Sequence; /**< \brief Original sequence number of the first message in the packet */
|
|
uint64_t NextSequence; /**< \brief The next expected sequence number */
|
|
uint64_t RawExchangeChannelID; /**< \brief Exchange given identifer for this multicast */
|
|
MidnightNanoSec PacketEmissionTime; /**< \brief Packet Emission time from exchange gateway nano-seconds since midnight. */
|
|
} GMACPacketHeader;
|
|
|
|
/**
|
|
* \brief Extended ISIN
|
|
*
|
|
* The GMAC "Extended ISIN" is a Celoxica-specific code and it provides a global
|
|
* naming scheme for instruments across all the supported markets. The codes
|
|
* are prefixed by 4 characters. The aim is to have a single type of identifier
|
|
* for the instruments, even if there is no real ISIN code. The prefixes
|
|
* available are:
|
|
*
|
|
* <ul>
|
|
* <li>ISIN - real ISIN code follows</li>
|
|
* <li>SEDO - follows 5 spaces and SEDOL code</li>
|
|
* <li>MARC - ARCA Equities instruments</li>
|
|
* <li>MNAO - ARCA Options instruments</li>
|
|
* <li>MBAT - BATS instruments</li>
|
|
* <li>MBIT - LSE Borsa Italiana instruments</li>
|
|
* <li>MCHI - Chi-X instruments</li>
|
|
* <li>MCME - CME instruments</li>
|
|
* <li>MDIR - Direct Edge instruments</li>
|
|
* <li>MICE - ICE instruments</li>
|
|
* <li>MISE - ISE instruments</li>
|
|
* <li>MITC - ITCH instruments</li>
|
|
* <li>MLIF - Liffe XDP instruments</li>
|
|
* <li>MLSE - LSE instruments</li>
|
|
* <li>MNYS - NYSE instruments</li>
|
|
* <li>MOPR - OPRA instruments</li>
|
|
* <li>MPHL - PHLX instruments</li>
|
|
* <li>MTSX - TSX instruments</li>
|
|
* </ul>
|
|
*
|
|
*/
|
|
|
|
typedef char GMACEISIN[GMAC_EISIN_LENGTH];
|
|
|
|
/**
|
|
* \brief Price Factor
|
|
*
|
|
* The price factor is published to the user in the \ref GMACReferenceHeader,
|
|
* which is part of all data referential messages.
|
|
*
|
|
* To correct the price supplied in book related messages, use \ref GMACCorrectPrice
|
|
*/
|
|
typedef struct __GMACPriceFactor GMACPriceFactor;
|
|
|
|
struct __GMACPriceFactor
|
|
{
|
|
int64_t Denominator; /**< \brief Used as price Denominator */
|
|
int64_t Numerator; /**< \brief Used as price Numerator */
|
|
/********* DEPRECATED *********/
|
|
int64_t PriceDenominator;
|
|
int64_t PriceNominator;
|
|
/******** DEPRECATED *********/
|
|
};
|
|
|
|
|
|
/**
|
|
* \ingroup GMAC_UserAPI
|
|
* \brief GMAC Price
|
|
*
|
|
* The price as present in the feed message. The price factor(display factor) correction is not applied,
|
|
* use \ref GMACCorrectPrice to apply it.
|
|
*
|
|
* Depending on feed, the price is usually shifted to 8 digits fixed point.
|
|
*
|
|
* The price 12.34 is coded as 1234000000.
|
|
*/
|
|
typedef int64_t GMACPrice;
|
|
typedef int64_t GMACDecimal;
|
|
|
|
/**
|
|
* \brief GMACTradeConditions
|
|
*
|
|
* Additional conditions for a trade, market specific and may not be set
|
|
*/
|
|
typedef struct {
|
|
|
|
unsigned SystemPricedCrackSpreadLeg:1;
|
|
unsigned SystemPricedLeg :1;
|
|
unsigned ImpliedSpreadAtMarketOpen :1;
|
|
unsigned AdjustedTrade :1;
|
|
unsigned OpeningTrade :1;
|
|
unsigned PriceCalculatedByExchange :1;
|
|
unsigned OffMarketTrade :1;
|
|
unsigned OccurredAtCross :1;
|
|
unsigned ContinuousTrading :1;
|
|
unsigned OpenAuctionTrade :1;
|
|
unsigned EndOfDayAuction :1;
|
|
|
|
/* LiffeXDP Trade Types */
|
|
unsigned Block :1;
|
|
unsigned Others :1;
|
|
unsigned Cross :1;
|
|
unsigned Auctions :1;
|
|
|
|
/* Eurex_EMDI Trade Types */
|
|
unsigned ExchangeLast :1; /* also for ISE_MDI and Xetra */
|
|
unsigned OpeningPrice :1;
|
|
unsigned HighPrice :1;
|
|
unsigned LowPrice :1;
|
|
unsigned OfficialClosingPrice :1;
|
|
unsigned OpeningAuctionTrade :1;
|
|
unsigned ReOpeningAuctionTrade :1;
|
|
unsigned OPAAuction :1;
|
|
unsigned IntradayAuctionTrade :1;
|
|
unsigned VolatilityAuctionTrade :1;
|
|
unsigned ClosingAuctionTrade :1;
|
|
unsigned CrossAuctionTrade :1;
|
|
unsigned OutOfSequence :1; /* also for ISE_MDI */
|
|
unsigned HaltedAuctionTrade :1;
|
|
unsigned VolumeOnly :1;
|
|
unsigned ExchangeForSwap :1;
|
|
unsigned ExchangeBasisFacility :1;
|
|
unsigned VolaTrade :1;
|
|
unsigned EFPFin :1;
|
|
unsigned EFPIndexFutures :1;
|
|
unsigned PreviousClosingPrice :1;
|
|
|
|
/* Xetra Trade Types */
|
|
unsigned BestPrice :1;
|
|
unsigned MidPointPrice :1;
|
|
unsigned SubscriptionPrice :1;
|
|
unsigned SpecialAuction :1;
|
|
unsigned MiniAuction :1;
|
|
unsigned LiquidityInterruption :1;
|
|
|
|
/* CSM flags */
|
|
unsigned Late :1;
|
|
unsigned IntermarketSweep :1; /* also for ISE_MDI */
|
|
unsigned Benchmark :1;
|
|
unsigned ExchangeFutureForPhysical :1;
|
|
|
|
/* ISE MDI flags */
|
|
unsigned Spread :1;
|
|
unsigned Straddle :1;
|
|
unsigned Combo :1;
|
|
unsigned Stopped :1;
|
|
unsigned TradeThroughExempt :1;
|
|
unsigned MultilegTrade :1;
|
|
|
|
unsigned NoBookUpdate :1;
|
|
|
|
/* BME HFSmartGate flags*/
|
|
unsigned ManualAuctionTrade :1;
|
|
unsigned TradingAtLast :1;
|
|
unsigned Funds :1;
|
|
|
|
unsigned RFQTrade :1;
|
|
unsigned Dark :1;
|
|
|
|
} GMACTradeConditions;
|
|
|
|
/**
|
|
* \brief GMACTradingMOde
|
|
*
|
|
* Additional information about the trading mode, market specific and may not be set
|
|
*/
|
|
typedef struct {
|
|
|
|
/* BME HFSmartGate */
|
|
unsigned Continuous :1;
|
|
unsigned Fixing :1;
|
|
unsigned BlockTrades :1;
|
|
unsigned SpecialOperations :1;
|
|
unsigned PositionsNAV :1;
|
|
|
|
/* BME HFMeffGate */
|
|
unsigned FuturesHours :1;
|
|
unsigned CrossTradesFuturesHours :1;
|
|
unsigned NormalHours :1;
|
|
unsigned DeltaBasisTrades :1;
|
|
unsigned BonoHours :1;
|
|
unsigned CrossTradesNormalHours :1;
|
|
unsigned CrossTradesBonoHours :1;
|
|
unsigned Funds :1;
|
|
|
|
/* BATS */
|
|
unsigned OpeningClosingAuction :1;
|
|
unsigned PeriodicAuction :1;
|
|
unsigned OrderEntry :1;
|
|
unsigned ExchangeTradeReport :1;
|
|
unsigned OTCTradeReporting :1;
|
|
unsigned ExternalMTFTradeReporting :1;
|
|
unsigned SmartOrderRouting :1;
|
|
|
|
} GMACTradingMode;
|
|
|
|
/**
|
|
* \brief GMACSuspendedConditions
|
|
*
|
|
* Additional conditions for a suspended status, market specific and may not be set
|
|
*/
|
|
typedef struct {
|
|
|
|
/* SIX_IMI flags */
|
|
unsigned StopTrading :1;
|
|
unsigned NonOpening :1;
|
|
unsigned DelayOpen :1;
|
|
unsigned UnderlyingCondition :1;
|
|
unsigned MidPointBook :1;
|
|
} GMACSuspendedConditions;
|
|
|
|
/**
|
|
* \brief GMACTradingStatusConditions
|
|
*
|
|
* Additional conditions for a trading status, market specific and may not be set
|
|
*/
|
|
typedef struct {
|
|
|
|
/* SIX_IMI flags */
|
|
unsigned NoMatchingFollows :1;
|
|
/* Euronext flags */
|
|
unsigned ReferToSegment :1;
|
|
|
|
unsigned SurveillanceIntervention :1;
|
|
unsigned MarketEvent :1;
|
|
unsigned InstrumentActivation :1;
|
|
unsigned InstrumentExpiration :1;
|
|
unsigned NoCancel :1;
|
|
unsigned ChangeTradingSession :1;
|
|
unsigned ImpliedOn :1;
|
|
unsigned ImpliedOff :1;
|
|
|
|
} GMACTradingStatusConditions;
|
|
|
|
/**
|
|
* \brief GMACCTradingStatusConditions
|
|
*
|
|
* Additional conditions for a Halt Reason, market specific and may not be set
|
|
*/
|
|
/* CTS Exchange Spec : Page 89; HaltReason */
|
|
typedef struct {
|
|
unsigned NewsDissemination :1;
|
|
unsigned Unused :1;
|
|
|
|
unsigned OrderImbalance :1;
|
|
unsigned LULDTradingPause :1;
|
|
unsigned NewsPending :1;
|
|
unsigned EquipmentChangeover :1;
|
|
unsigned SubPennyTrading :1;
|
|
unsigned MarketWideCBLvl1Breach :1;
|
|
unsigned MarketWideCBLvl2Breach :1;
|
|
unsigned MarketWideCBLvl3Breach :1;
|
|
|
|
} GMACCTradingStatusConditions;
|
|
|
|
/**
|
|
* \brief GMACImbalanceConditions
|
|
*
|
|
* Additional conditions for a imbalance message, market specific and may not be set
|
|
*/
|
|
typedef struct {
|
|
|
|
/* XETRA flags */
|
|
unsigned DeleteReference :1;
|
|
unsigned DeletePaired :1;
|
|
unsigned DeleteImbalance :1;
|
|
unsigned Extended :1;
|
|
} GMACImbalanceConditions;
|
|
|
|
/**
|
|
* \brief GMACOrderConditions
|
|
*
|
|
* Bit Mask Conditions for an order, market specific and may not be set.
|
|
*/
|
|
typedef struct {
|
|
unsigned SIPDisplay :1;
|
|
unsigned RetainPriority :1;
|
|
unsigned ImpliedOrder :1; //used by ITCH OMX Broker Tec
|
|
unsigned Force :1; //used by ITCH OMX Broker Tec
|
|
unsigned ShortSell :1; //used by ITCH OMX Broker Tec
|
|
unsigned MarketBid :1; //used by ITCH OMX Broker Tec
|
|
unsigned PriceStabilization :1; //used by ITCH OMX Broker Tec
|
|
unsigned OverrideCrossing :1; //used by ITCH OMX Broker Tec
|
|
unsigned Undisclosed :1; //used by ITCH OMX Broker Tec
|
|
unsigned FillAndKill :1; //used by ITCH OMX Broker Tec
|
|
unsigned FirmColorDisabled :1; //used by ITCH OMX Broker Tec
|
|
unsigned ConvertToAggressive :1; //used by ITCH OMX Broker Tec
|
|
unsigned Renotification :1; //used by PHLX TOPO Plus
|
|
unsigned MarketOrder :1;
|
|
unsigned LimitOrder :1;
|
|
unsigned MarketToLimitOrder :1;
|
|
unsigned PegOrder :1;
|
|
unsigned OpeningOrder :1; //used by PHLX TOPO Plus
|
|
unsigned GoodTillCancel :1;
|
|
unsigned RequestForQuote :1; // used by ICE
|
|
unsigned AllOrNoneOrder :1; // used by ICE
|
|
unsigned Auction :1;
|
|
unsigned StopOrder :1; // used by Euronext Optiq
|
|
} GMACOrderConditions;
|
|
|
|
/**
|
|
* \brief GMACOrderValidity
|
|
*
|
|
* Bit Mask Validity for an order, market specific and may not be set.
|
|
*/
|
|
|
|
typedef struct
|
|
{
|
|
unsigned MorningHours :1;
|
|
unsigned NormalHours :1;
|
|
unsigned ExtendedHours :1;
|
|
} GMACOrderValidity;
|
|
|
|
/**
|
|
* \brief GMACBestMaskConditions
|
|
*
|
|
* Additional conditions for an order, market specific and may not be set
|
|
*/
|
|
typedef struct {
|
|
unsigned NationalBBO :1; //used by CQS 1
|
|
unsigned FINRABBO :1; //used by CQS 2
|
|
unsigned NoNationalBBO :1; //used by CQS 4
|
|
unsigned NoFINRABBO :1; //used by CQS 8
|
|
unsigned NoNationalBBOChange :1; //used by CQS 16
|
|
unsigned NoFINRABBOChange :1; //used by CQS 32
|
|
unsigned BestBid :1; //used by OPRA/OPRA_BINARY
|
|
unsigned BestOffer :1; //used by OPRA/OPRA_BINARY
|
|
unsigned NoBestBid :1; //used by OPRA/OPRA_BINARY
|
|
unsigned NoBestOffer :1; //used by OPRA/OPRA_BINARY
|
|
unsigned ExcludedBBO :1; //used by OPRA/OPRA_BINARY
|
|
} GMACBestMaskConditions;
|
|
|
|
/**
|
|
* \brief GMACBookType
|
|
*
|
|
* The type of book the Status message should be applied to.
|
|
*/
|
|
typedef struct {
|
|
unsigned OffBook :1; // Used on various Millennium feeds.
|
|
unsigned LitBook :1; // Used by Turquoise Millennium
|
|
unsigned DarkBook :1; // Used by Turquoise Millennium
|
|
} GMACBookType;
|
|
|
|
/**
|
|
* \brief GMACQuoteConditions
|
|
*
|
|
* Additional conditions for a quotes, market specific and may not be set
|
|
*/
|
|
typedef struct {
|
|
unsigned ExchangeBest :1;
|
|
unsigned Implied :1;
|
|
unsigned OutrightOrder :1;
|
|
unsigned OutrightQuote :1;
|
|
unsigned SlowQuote :1; // Used on NYSE to indicate slow quote condition for this side of the book
|
|
unsigned NoLP :1; // No Liquidity Provider flag provided by NYSE Euronext
|
|
unsigned LPOnlyAsk :1; // Liquidity Provider On Ask Side Only provided by NYSE Euronext
|
|
unsigned LPOnlyBid :1; // Liquidity Provider On Bid Side Only provided by NYSE Euronext
|
|
unsigned LPAskBid :1; // Liquidity Provider On Ask And Bid Side provided by NYSE Euronext
|
|
unsigned RMFQuotes :1; // Quote message transcoded from a Retail Matching Facility message by NYSE Euronext
|
|
unsigned MarketOrder :1;
|
|
unsigned LimitOrder :1;
|
|
unsigned MarketToLimitOrder :1;
|
|
unsigned PegOrder :1;
|
|
unsigned CurrentMulticast :1;
|
|
unsigned AtOpeningOrder :1; // Used on Euronext for messages 140 & 146
|
|
unsigned CrossedBook :1; // Used on Eurex EMDI for TopOfBookImplied message.
|
|
unsigned Funds :1; // Used on BME HFSmartGate
|
|
unsigned LP :1; // Used on Euronext Optiq
|
|
} GMACQuoteConditions;
|
|
|
|
/**
|
|
* \ingroup GMAC_UserAPI
|
|
* \brief GMAC Trading Status
|
|
*
|
|
* Enum of Trading states used in TradingStatus fields of various messages
|
|
*/
|
|
typedef enum
|
|
{
|
|
TSTATUS_UNKNOWN = 'U', /**< Unknown or invalid */
|
|
TSTATUS_CLOSE = 'C', /**< Closed */
|
|
TSTATUS_SUSPEND = 'S', /**< Suspended or halted */
|
|
TSTATUS_QUOTE = 'Q', /**< Quotation Only (intermediate state between 'S' or 'C' and 'O') */
|
|
TSTATUS_EXTEND = 'E', /**< Extended market hours, the trading is open but outside regular market hours */
|
|
TSTATUS_OPEN = 'O' /**< Open for trading */
|
|
} GMACTradingStatus;
|
|
|
|
/**
|
|
* \ingroup GMAC_UserAPI
|
|
* \brief GMAC SHO Short Sale Price Test Restriction
|
|
*
|
|
* Denotes the Reg SHO Short Sale Price Test Restriction status for the issue at the time of the message dissemination.
|
|
*/
|
|
typedef enum
|
|
{
|
|
REGSHO_NOT_IN_EFFECT, /**< No price test in place */
|
|
REGSHO_IN_EFFECT /**< Reg SHO Short Sale Price Test Restriction in effect or remains in effect */
|
|
}GMACSHOShortSaleRestriction;
|
|
|
|
/**
|
|
* \ingroup GMAC_UserAPI
|
|
* \brief GMAC Suspended Status
|
|
*
|
|
* Enum of Suspended states used in SuspendedStatus fields of various messages
|
|
*/
|
|
typedef enum
|
|
{
|
|
SUSPENDEDSTATUS_RESUMED = 'R', /**< The instrument is no longer suspended. */
|
|
SUSPENDEDSTATUS_SUSPENDED = 'S' /**< The instrument is suspended */
|
|
}GMACSuspendedStatus;
|
|
|
|
|
|
/**
|
|
* \brief Key in Extension Messages
|
|
*
|
|
* Specifies the meaning of the Value in Extension Messages
|
|
*/
|
|
typedef enum {
|
|
GMAC_EXTENSION_KEY_LAST_MSG_SEQ_NUM, /**< \brief LastMsgSeqNumProcessed as uint64_t
|
|
* (used for snapshots) */
|
|
GMAC_EXTENSION_KEY_MD_FEED_TYPE, /**< \brief Type of Feed as string
|
|
* (Part of multiple feed type entries) */
|
|
GMAC_EXTENSION_KEY_MARKET_DEPTH, /**< \brief Depth of book as uint64_t
|
|
* (Part of multiple feed type entries) */
|
|
GMAC_EXTENSION_KEY_UNDERLYING_SECURITY_ID, /**< \brief Instrument ID as qualified by the exchange as uint64_t
|
|
* (Part of multiple underlying legs entries) */
|
|
GMAC_EXTENSION_KEY_INSTR_ATTRIB_TYPE, /**< \brief Instrument attribute code as uint64_t
|
|
* (Part of multiple instrument attributes entries) */
|
|
GMAC_EXTENSION_KEY_INSTR_ATTRIB_VALUE, /**< \brief Value associated with the \ref GMAC_EXTENSION_KEY_INSTR_ATTRIB_TYPE atribute code as string
|
|
* (Part of multiple instrument attributes entries) */
|
|
GMAC_EXTENSION_KEY_TOT_NUM_REPORTS, /**< \brief Total reports returned in response to a request as uint64_t
|
|
* (Part of security definition and snapshots entries) */
|
|
GMAC_EXTENSION_KEY_LAST_MSG_SYMBOL_SEQ_NUM, /**< \brief The sequence number of the last packet that contained a message for this symbol.
|
|
* (used for snapshots where the exchange uses a per-symbol refresh) */
|
|
GMAC_EXTENSION_KEY_DISPLAYED_IN_SIP, /**< \brief Indicates whether the order is displays in the SIP using a single character ('Y' or 'N')
|
|
* (used for some NASDAQ feeds) */
|
|
GMAC_EXTENSION_KEY_MAINTAIN_PRIORITY, /**< \brief Indicates whether the order priority should be maintained in updates using a single character ('Y' or 'N')
|
|
* (used for some NASDAQ feeds) */
|
|
GMAC_EXTENSION_KEY_MARKET_TYPE, /**< \brief The market type as uint64_t
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_IS_SPREAD, /**< \brief Indicates whether the market is a spread using a single character ('Y' or 'N')
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_IS_CRACK_SPREAD, /**< \brief Indicates whether the market is a crack spread using a single character ('Y' or 'N')
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_PRIMARY_MARKET_ID, /**< \brief The ID of the primary market used for spreads as uint64_t
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_SECONDARY_MARKET_ID, /**< \brief The ID of the secondary market used for spreads as uint64_t
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_TICK_VALUE, /**< \brief The Tick Value as uint64_t
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_ALLOW_OPTIONS, /**< \brief Indicates whether options are allowed within the market using a single character ('Y' or 'N')
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_PRODUCT_ID, /**< \brief The ID of the product the contract/market is under as uint64_t
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_PRODUCT_NAME, /**< \brief The name of the pruduct the contract/market is under as string
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_HUB_ID, /**< \brief The ID of the hub for the contract/market as uint64_t
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_HUB_ALIAS, /**< \brief The alias of the hub for the contract/market as string
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_STRIP_ID, /**< \brief The ID of the strip for the contract/market as uint64_t
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_STRIP_NAME, /**< \brief The name of the strip for the contract/market as string
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_MARKET_DESC, /**< \brief The market description as string
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_MIN_OPT_PRICE, /**< \brief The Minimum premium price for the option
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_MAX_OPT_PRICE, /**< \brief The Maximum premium price for the option
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_MIN_QUANTITY, /**< \brief The Minimum quantity for this market
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_PRICE_INCREMENT, /**< \brief The Price increment for the option market
|
|
* (used for ICE) */
|
|
GMAC_EXTENSION_KEY_SETTLEMENT_FLAG, /**< \brief Flag to indicate settlement price type (CME) as uint64_t */
|
|
|
|
GMAC_EXTENSION_KEY_CLEARED_VOLUME, /**< \brief Indicates the total cleared volume of instruments
|
|
* traded during the prior trading session (CME) as uint64_t */
|
|
GMAC_EXTENSION_KEY_OPEN_INTEREST_QTY, /**< \brief Indicates the total open interest for the market at the
|
|
* close of the prior trading session (CME) as uint64_t */
|
|
GMAC_EXTENSION_KEY_LOTTYPE_BLOCK_LOT, /**< \brief Indicates the type of minimum quantity accepted for order
|
|
entry, in this case the type is block lot (CME, as uint64_t) */
|
|
GMAC_EXTENSION_KEY_LOTTYPE_ROUND_LOT_VAR, /**< \brief Indicates the type of minimum quantity accepted for order
|
|
entry, in this case the type is round lot variable quantity (CME, as uint64_t) */
|
|
GMAC_EXTENSION_KEY_LIFFE_MODES, /**< \brief Liffe market status - modes - field group */
|
|
GMAC_EXTENSION_KEY_LIFFE_MU, /**< \brief Liffe Market Update - field group */
|
|
GMAC_EXTENSION_KEY_LIFFE_STL, /**< \brief Liffe Settlements - field group */
|
|
GMAC_EXTENSION_KEY_LIFFE_ALTSID, /**< \brief Liffe Strategy StandingData - Alt Sec ID */
|
|
GMAC_EXTENSION_KEY_LIFFE_LEG, /**< \brief Liffe Strategy StandingData - Leg data group */
|
|
|
|
GMAC_EXTENSION_KEY_ITCH_MATCH_NUMBER, /**< \brief ITCH - Match number as uint64_t. Deprecated -
|
|
will be removed in a future release */
|
|
|
|
GMAC_EXTENSION_KEY_END_OF_REFRESH_CYCLE, /**< \brief Issued at the end of a snapshot cycle (uint64_t returns
|
|
cycle number) */
|
|
GMAC_EXTENSION_KEY_TOTAL_TRADED_VOLUME, /**< \brief Total traded volume (uint64_t) for instrument referred to
|
|
in preceeding message */
|
|
GMAC_EXTENSION_KEY_GROUP_MULTICAST_ID, /**< \brief Group identifier unique to each multicast (LSE Millennium)
|
|
stored as an uint64_t */
|
|
|
|
GMAC_EXTENSION_KEY_BATS_AUCTION_UPDATE, /**< \brief Group identifier unique to each multicast (LSE Millennium)
|
|
stored as an uint64_t */
|
|
|
|
GMAC_EXTENSION_KEY_RPI_INDICATOR, /**< \brief Retail Price Improvement indicator condition (NYSE) stored as char */
|
|
|
|
GMAC_EXTENSION_KEY_NYSE_REG_IMBALANCE_INDICATOR /**< \brief Retail Price Improvement indicator condition (NYSE) stored as char */
|
|
|
|
} GMACExtensionKey;
|
|
|
|
// @cond NO_DOXYGEN
|
|
#define GMACMessageType int
|
|
// @endcond
|
|
|
|
/**
|
|
* \brief Message Header
|
|
*
|
|
* This header is present at the beginning of each message structure; it holds information for message type identification.
|
|
*/
|
|
typedef struct {
|
|
GMACMessageType MsgType; /**< \brief Message Type */
|
|
uint16_t Length; /**< \brief Length of the message in bytes */
|
|
uint16_t ExtensionsLength; /**< \brief Length of all the extension messages for this message
|
|
* Extension messages are located just after the GMAC message.
|
|
* The length of the whole set is Length + ExtensionLength (v3 only)
|
|
*/
|
|
uint64_t SymbolSequence; /**< \brief Unique sequence number associated with the symbol (for gap detection).
|
|
In case of market messages containing multiple updates the symbol sequence number
|
|
will be repeated. */
|
|
uint64_t Sequence; /**< \brief Message sequence number in original packet */
|
|
uint64_t ExchangeTimestamp; /**< \brief Timestamp published by the exchange
|
|
* Displayed in nano seconds past UTC midnight.
|
|
* Value ~0 presented, if the timestamp is undefined
|
|
*/
|
|
} GMACMessageHeader;
|
|
|
|
#undef GMACMessageType
|
|
|
|
/**
|
|
* @}
|
|
* //end of dataformat group
|
|
*/
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|
|
|
|
#endif /* __GMAC_TEMPLATE_COMMON_H__ */
|
|
|