Add market Data Request, Market Data Snapshot/Full Refresh, Market Data Request Rejection Methods on FIX module
uwezukwechibuzor opened this issue · 2 comments
here's an example of a Market Data Request message that includes the Market Identification Code (MIC) for the New York Stock Exchange (XNYS):
8=FIX.4.2|9=161|35=V|34=4|49=FirmA|52=20230315-10:35:00.000|56=CounterpartyB|262=2|263=0|264=1|265=1|267=2|269=1|55=XYZ|207=XNYS|10=038|
In this example, the 207 field is included with a value of "XNYS" to indicate that the security being requested is listed on the New York Stock Exchange. Here's a breakdown of the key fields in this message:
35=V: This is the message type, indicating that this is a Market Data Request message.
49=FirmA: This is the sender ID, indicating that the message is being sent by Firm A.
52=20230315-10:35:00.000: This is the timestamp, indicating the time at which the message was sent.
56=CounterpartyB: This is the target ID, indicating that the message is being sent to Counterparty B.
262=2: This is the MDReqID field, which provides a unique identifier for the market data request message.
263=0: This is the SubscriptionRequestType field, indicating that this is a full book request (i.e., a request for the entire order book).
264=1: This is the MarketDepth field, indicating that Firm A wants the top-of-book (best bid/ask) market data.
265=1: This is the MDUpdateType field, indicating that Firm A wants incremental updates to the market data.
269=1: This is the NoRelatedSym field, indicating that there is only one symbol (XYZ) for which market data is being requested.
55=XYZ: This is the symbol or identifier for the security for which market data is being requested.
207=XNYS: This is the Security Exchange (MIC) code field, indicating that the security being requested is listed on the New York Stock Exchange.
10=038: This is the message checksum, indicating that the message has been correctly formatted.
Note that different firms and trading platforms may use slightly different message formats and field values depending on their specific needs and requirements. Additionally, this example is only one possible configuration for a Market Data Request message with a MIC; other configurations may use different field values or additional message fields.
Market Data Snapshot/Full Refresh is a FIX message that is used to deliver a one-time snapshot of all market data for a given instrument or a set of instruments. This message is typically sent in response to a Market Data Request message with the SubscriptionRequestType (263) set to Snapshot (4).
Here is a sample Market Data Snapshot/Full Refresh message:
8=FIX.4.4|9=322|35=W|34=2|49=TRADING_SYSTEM|52=20230315-10:12:15.387|56=CLIENT|262=MDReqID_123|55=MSFT|48=US5949181045|22=8|460=4|270=82.40|271=100|273=10:00:00|269=0|15=USD|10=191|
Explanation of the fields:
8=FIX.4.4: FIX protocol version.
9=322: Total message length in bytes, including the header and trailer.
35=W: Message type. W indicates a Market Data Snapshot/Full Refresh message.
34=2: Message sequence number.
49=TRADING_SYSTEM: Sender ID.
52=20230315-10:12:15.387: Timestamp of when the message was sent.
56=CLIENT: Target ID.
262=MDReqID_123: Unique identifier for the market data request.
55=MSFT: Symbol of the instrument being quoted.
48=US5949181045: Security identifier for the instrument being quoted.
22=8: ID of the trading session in which the quote was generated.
460=4: Specifies the type of trade being quoted. 4 indicates a normal trade.
270=82.40: The last traded price for the instrument.
271=100: The quantity of the last trade.
273=10:00:00: The time of the last trade.
269=0: Indicates the type of update being provided. 0 indicates a full refresh.
15=USD: Currency in which the market data is quoted.
10=191: Checksum.
In summary, this message contains a snapshot of all the market data for the MSFT instrument, including the last traded price, quantity, time of the last trade, and currency. It also specifies that this is a full refresh, meaning that all the market data for the instrument is being provided in this message.
Here's a sample Market Data Request Reject message:
8=FIX.4.4|9=138|35=Y|49=TRADING_SYSTEM|56=CLIENT|34=3|52=20230315-10:12:15.387|262=MDReqID_123|281=1|58=Invalid market data request type.|10=243|
Explanation of the fields:
8=FIX.4.4: FIX protocol version.
9=138: Total message length in bytes, including the header and trailer.
35=Y: Message type. Y indicates a Market Data Request Reject message.
49=TRADING_SYSTEM: Sender ID.
56=CLIENT: Target ID.
34=3: Message sequence number.
52=20230315-10:12:15.387: Timestamp of when the message was sent.
262=MDReqID_123: Unique identifier for the market data request.
281=1: Reason for rejection. 1 indicates an invalid market data request type.
58=Invalid market data request type.: Text description of the reason for rejection.
10=243: Checksum.