FIX Straight Through Processing
Overview
FIX Straight Through Processing (STP) is a fast and efficient way to integrate with the Zero Hash Settlement Service. By connecting to our FIX STP Gateway, a Platform Operator can send trade information in FIX protocol for settlement on-chain via our proprietary settlement agent, Zero Hash.
Supported Message Types
Administrative Messages
The following Administrative message types are supported under MsgType (35)
:
- Logon (35=A)
- HeartBeat (35=0)
- TestRequest (35=1)
- ResendRequest (35=2)
- Reject (35=3)
- SequenceReset (35=4)
- Logout (35=5)
Application Messages
Once connected to our FIX STP Gateway, the TradeCaptureReport acts as the FIX artifact which contains trade details for the Zero Hash Settlement Service to consume and effectuate. The tags and fields below describe the data objects necessary to report trades on behalf of counterparties involved in the trade.
- TradeCaptureReport (35=AE)
- TradeCaptureReportAck (35=AR)
Resources
Here is a QuickFIX-style data dictionary describing Zero Hash FIX Straight Through Processing messages.
Sequence Diagrams
Connectivity and Logon
The API client must establish a FIX session by sending a Logon (35=A)
message. Zero Hash will act as an acceptor for all FIX sessions.
Header and Trailer
Standard Header
Tag | Name | Data Type | Req’d | Description |
---|---|---|---|---|
8 | BeginString | String | Y |
Must be FIXT.1.1 for FIX 5.0 protocol version.Must be the first field in the message. |
9 | BodyLength | Length | Y | Must be the second field in the message. |
35 | MsgType | String | Y |
Message type. Must be the third field in the message. |
34 | MsgSeqNum | SeqNum | Y | Message sequence number. |
49 | SenderCompID | String | Y | Company identifier as allocated by Zero Hash. |
56 | TargetCompID | String | Y |
Receiver FIX session identifier. Always SEEDCX .
|
50 | SenderSubID | String | N | A text field to indicate the name or idenifier of the person or entity submitting the trade. |
142 | SenderLocationID | String | N | ISO identifier of message originator's location. |
1128 | ApplVerID | String | N | Indicates the protocol being used in this message. Supported values: 9 = FIX50SP2 |
57 | TargetSubID | String | N |
Identifies specific trading unit. Conditionally required for Application messages. Always ZERO .
|
52 | SendingTime | UTCTimestamp | Y | Time of message transmission. |
369 | LastMsgSeqNumProcessed | SeqNum | N |
The last MsgSeqNum (34) value received and processed. Used to detect a backlog. |
Standard Trailer
Tag | Name | Data Type | Req’d | Description |
---|---|---|---|---|
10 | CheckSum | String | Y | Checksum of message and end of message delimiter. |
Administrative Messages
The following are the message layouts for each FIX Market Data message supported by Zero Hash:
Logon (35=A)
Tag | Field Name | Data Type | Req’d | Description |
---|---|---|---|---|
|
||||
98 | EncryptMethod | Int | Y |
Method of encryption. Not validated by Zero Hash. Supported values: 0 = None
|
108 | HeartBtInt | Int | Y |
Heartbeat interval as assigned by the client. Note: Same value used by both sides. |
141 | ResetSeqNumFlag | Char | N |
Indicates that both sides of the FIX session should reset sequence numbers. Supported values: N = NoY = Yes, reset sequence numbers |
1137 | DefaultApplVerID | String | Y | Indicates the default protocol being used in this session. Supported values: 9 = FIX50SP2 |
|
Client to Zero Hash
8=FIXT.1.1|9=84|35=A|34=1|49=42022BE443|52=20190802-19:27:55.496|56=SEEDCX|98=0|108=30|141=Y|1137=9|10=174|
The Logon (35=A)
message is used by a market participant to establish a FIX session with Zero Hash. The Logon (35=A)
message must be the first message sent by the client requesting to initiate a FIX session. It must be received within 5 seconds
from establishing the connection, otherwise the connection will be closed.
Zero Hash to Client
8=FIXT.1.1|9=106|35=A|34=1|49=SEEDCX|52=20190802-19:25:18.522726112|56=42022BE443|142=US,IL|369=1|98=0|108=30|141=Y|1137=9|10=078|
A successful logon will result in a Logon (35=A)
acknowledgement sent by Zero Hash.
Heartbeat (35=0)
The Heartbeat (35=0)
message is used by both the initiator and Zero Hash during periods of inactivity. The duration of the inactive period is determined by the field HeartBtInt (108)
in Logon (35=A)
message.
Tag | Field Name | Data Type | Req’d | Description |
---|---|---|---|---|
|
||||
112 | TestReqID | String | N | Conditionally required if the heartbeat message is generated in response to a TestRequest (35=1) message. |
|
TestRequest (35=1)
Heartbeat (35=0)
and TestRequest (35=1)
messages are used by Zero Hash to monitor the live status of a FIX Session.
In the event of no response within the agreed upon heartbeat interval, HeartBtInt (108)
, in Logon (35=A)
message, a TestRequest (35=1)
message will be sent. The client must respond immediately to the TestRequest (35=1)
message.
If Zero Hash does not receive a response to the TestRequest (35=1)
message within the heartbeat interval, it will terminate the FIX session to the counterparty.
Tag | Field Name | Data Type | Req’d | Description |
---|---|---|---|---|
|
||||
112 | TestReqID | String | Y | TestRequest (35=1) identifier. |
|
ResendRequest (35=2)
ResendRequest (35=2)
message is used as per FIX specification.
Tag | Field Name | Data Type | Req’d | Description |
---|---|---|---|---|
|
||||
7 | BeginSeqNo | SeqNum | Y | Message sequence number of first message in range to be resent. Valid sequence number for session. |
16 | EndSeqNo | SeqNum | Y | Message sequence number of last message in range to be resent. Specify 0 for all the messages subsequent to a particular message. |
|
Reject (35=3)
8=FIXT.1.1|9=128|35=3|34=2|49=SEEDCX|52=20190802-19:25:20.529628759|56=42022BE443|142=US,IL|369=2|45=2|58=Incorrect value for tag.|371=57|372=AE|10=207|
The Reject (35=3)
message will be sent by Zero Hash when a message is received but cannot be properly processed due to session-level rule violation.
Tag | Field Name | Data Type | Req’d | Description |
---|---|---|---|---|
|
||||
45 | RefSeqNum | SeqNum | Y | MsgSeqNum (34) of the rejected message. |
371 | RefTagID | Int | N | The tag number of the FIX field being referenced. |
372 | RefMsgType | String | N | The MsgType (35) of the FIX message being referenced. |
373 | SessionRejectReason | Int | N | Code to identify reason for a session-level Reject (35=3) message.Supported values: 1 = Required tag missing5 = Value is incorrect (out of range) for this tag 6 = Type is incorrect for this tag 9 = CompID problem 10 = Sending time inaccuracy 11 = Invalid message type 99 = Other reason |
58 | Text | String | N | Provides the reason the message was rejected. |
|
SequenceReset (35=4)
SequenceReset (35=4)
message can be used for both Gap Fill or to reset sequence numbers.
Tag | Field Name | Data Type | Req’d | Description |
---|---|---|---|---|
|
||||
36 | NewSeqNo | SeqNum | Y | New sequence number. The number cannot be lower than the expected sequence number of either side of the connection. |
123 | GapFillFlag | Boolean | N | Indicates the sequence reset message is replacing messages which will not be resent. Supported values: Y = Gap Fill message, MsgSeqNum (34) is validN = Sequence Reset, ignore MsgSeqNum (34)
|
|
Logout (35=5)
Logout (35=5)
message initiates or confirms the termination of a FIX session.
Tag | Field Name | Data Type | Req’d | Description |
---|---|---|---|---|
|
||||
58 | Text | String | N | Reason for logout. |
789 | NextExpectedMsgSeqNum | SeqNum | Y | Next expected MsgSeqNum (34) value to be received. |
|
Application Messages
TradeCaptureReport (35=AE)
8=FIXT.1.1|9=621|35=AE|34=2|49=42022BE443|50=QGLUM5|52=20190802-16:41:41.141|56=SEEDCX|57=ZERO|142=US,IL|1128=9|31=9955.28|55=BTC/USD|58=Great trade!|60=20190802-16:41:41|167=SP|487=0|552=2|54=1|1154=BTC|453=1|448=LXAVL8|447=C|452=3|119=0.1|37=order-id-1-KQXuyrA7iw7aJf61Qj6aEC|11=cl-ord-id-1-HhJgVdPKdx98i2nbQCTPwJ|1427=side-exec-id-1-4JuK1QrzJREFR1Nw1UXrd3|54=2|1154=USD|453=1|448=JO514F|447=C|452=3|119=995.528|37=order-id-2-D92cpLPW2c4AkYux7HJE1Q|11=cl-ord-id-2-JeR2S5iXuQZ5SLiTL4dy19|1427=side-exec-id-2-LzbA8eXAszcXEbKcpCCuQe|828=0|856=0|1041=TX7uEfeNC9JMUzHoPeyhMf|1116=2|1117=QGLUM5|1118=C|1119=73|1117=ZERO|1118=G|1119=73|1193=P|10=145|
BeginString 8 = FIXT.1.1
BodyLength 9 = 621
MsgType 35 = AE (TradeCaptureReport)
MsgSeqNum 34 = 2
SenderCompID 49 = 42022BE443
SenderSubID 50 = QGLUM5
SendingTime 52 = 20190802-16:41:41.141
TargetCompID 56 = SEEDCX
TargetSubID 57 = ZERO
SenderLocationID 142 = US,IL
ApplVerID 1128 = 9 (FIX50SP2)
LastPx 31 = 9955.28
Symbol 55 = BTC/USD
Text 58 = Great trade!
TransactTime 60 = 20190802-16:41:41
SecurityType 167 = SP
TradeReportTransType 487 = 0 (NEW)
NoSides 552 = 2 (BOTH_SIDES)
Side 54 = 1 (BUY)
SideCurrency 1154 = BTC
NoPartyIDs 453 = 1
PartyID 448 = LXAVL8
PartyIDSource 447 = C (GENERALLY_ACCEPTED_MARKET_PARTICIPANT_IDENTIFIER)
PartyRole 452 = 3 (CLIENT_ID)
SettlCurrAmt 119 = 0.1
OrderID 37 = order-id-1-KQXuyrA7iw7aJf61Qj6aEC
ClOrdID 11 = cl-ord-id-1-HhJgVdPKdx98i2nbQCTPwJ
SideExecID 1427 = side-exec-id-1-4JuK1QrzJREFR1Nw1UXrd3
Side 54 = 2 (SELL)
SideCurrency 1154 = USD
NoPartyIDs 453 = 1
PartyID 448 = JO514F
PartyIDSource 447 = C (GENERALLY_ACCEPTED_MARKET_PARTICIPANT_IDENTIFIER)
PartyRole 452 = 3 (CLIENT_ID)
SettlCurrAmt 119 = 995.528
OrderID 37 = order-id-2-D92cpLPW2c4AkYux7HJE1Q
ClOrdID 11 = cl-ord-id-2-JeR2S5iXuQZ5SLiTL4dy19
SideExecID 1427 = side-exec-id-2-LzbA8eXAszcXEbKcpCCuQe
TrdType 828 = 0 (REGULAR_TRADE)
TradeReportType 856 = 0 (SUBMIT)
FirmTradeID 1041 = TX7uEfeNC9JMUzHoPeyhMf
NoRootPartyIDs 1116 = 2
RootPartyID 1117 = QGLUM5
RootPartyIDSource 1118 = C (GENERALLY_ACCEPTED_MARKET_PARTICIPANT_IDENTIFIER)
RootPartyRole 1119 = 73 (EXECUTION_VENUE)
RootPartyID 1117 = ZERO
RootPartyIDSource 1118 = G (MIC)
RootPartyRole 1119 = 73 (EXECUTION_VENUE)
SettlMethod 1193 = P (PHYSICAL_SETTLEMENT_REQUIRED)
CheckSum 10 = 145
Tag | Field Name | Data Type | Req’d | Description |
---|---|---|---|---|
|
||||
1041 | FirmTradeID | String | Y | Trade identifier as as allocated by Zero Hash. |
|
||||
856 | TradeReportType | Int | Y | This trade report's type. Supported values: 0 = Submit |
487 | TradeReportTransType | Int | Y | This trade report's transaction type. Supported values: 0 = New |
55 | Symbol | String | Y | Instrument identifier. |
31 | LastPx | Price | Y | Price of this trade. |
32 | LastQty | Qty | N | Quantity bought or sold on this trade. Required if SettlCurrAmt (119) is not included in side groups. |
167 | SecurityType | String | Y | Type of security being traded. Supported values: SP = Spot |
828 | TrdType | String | Y | Type of trade. Supported values: 0 = Regular Trade1 = Block Trade |
1193 | SettlMethod | Char | Y | Settlement method for this trade. Supported values: C = CashP = Physical |
60 | TransactTime | UTCTimestamp | Y | Timestamp of event submitting the trade. |
58 | Text | String | N | Free format text string. |
6761 | Anonymous | Char | N | Whether identifying information for this trade should be hidden. Defaults to 'Y' if not provided. |
|
||||
|
TradeCaptureReportAck (35=AR)
8=FIXT.1.1|9=704|35=AR|49=SEEDCX|56=42022BE443|34=2|50=QGLUM5|142=US,IL|1128=9|52=20190802-16:41:41.347823645|369=2|1041=TX7uEfeNC9JMUzHoPeyhMf|1116=2|1117=QGLUM5|1118=C|1119=73|1117=ZERO|1118=G|1119=73|856=0|487=0|55=BTC/USD|31=9955.28|167=SP|828=0|15=USD|120=BTC|1193=P|60=20190802-16:41:41.320000000|552=2|54=1|1154=BTC|119=0.1|37=order-id-1-KQXuyrA7iw7aJf61Qj6aEC|11=cl-ord-id-1-HhJgVdPKdx98i2nbQCTPwJ|1427=side-exec-id-1-4JuK1QrzJREFR1Nw1UXrd3|453=1|448=LXAVL8|452=3|447=C|54=2|1154=USD|119=995.528|37=order-id-2-D92cpLPW2c4AkYux7HJE1Q|11=cl-ord-id-2-JeR2S5iXuQZ5SLiTL4dy19|1427=side-exec-id-2-LzbA8eXAszcXEbKcpCCuQe|453=1|448=JO514F|452=3|447=C|1003=93c2e2ef-0746-41dd-9b2c-0832d689d831|939=0|58=Great trade!|751=0|10=102|
BeginString 8 = FIXT.1.1
BodyLength 9 = 704
MsgType 35 = AR (TradeCaptureReportAck)
SenderCompID 49 = SEEDCX
TargetCompID 56 = 42022BE443
MsgSeqNum 34 = 2
SenderSubID 50 = QGLUM5
SenderLocationID 142 = US,IL
ApplVerID 1128 = 9 (FIX50SP2)
SendingTime 52 = 20190802-16:41:41.347823645
LastMsgSeqNumProcessed 369 = 2
FirmTradeID 1041 = TX7uEfeNC9JMUzHoPeyhMf
NoRootPartyIDs 1116 = 2
RootPartyID 1117 = QGLUM5
RootPartyIDSource 1118 = C (GENERALLY_ACCEPTED_MARKET_PARTICIPANT_IDENTIFIER)
RootPartyRole 1119 = 73 (EXECUTION_VENUE)
RootPartyID 1117 = ZERO
RootPartyIDSource 1118 = G (MIC)
RootPartyRole 1119 = 73 (EXECUTION_VENUE)
TradeReportType 856 = 0 (SUBMIT)
TradeReportTransType 487 = 0 (NEW)
Symbol 55 = BTC/USD
LastPx 31 = 9955.28
SecurityType 167 = SP
TrdType 828 = 0 (REGULAR_TRADE)
Currency 15 = USD
SettlCurrency 120 = BTC
SettlMethod 1193 = P (PHYSICAL_SETTLEMENT_REQUIRED)
TransactTime 60 = 20190802-16:41:41.320000000
NoSides 552 = 2 (BOTH_SIDES)
Side 54 = 1 (BUY)
SideCurrency 1154 = BTC
SettlCurrAmt 119 = 0.1
OrderID 37 = order-id-1-KQXuyrA7iw7aJf61Qj6aEC
ClOrdID 11 = cl-ord-id-1-HhJgVdPKdx98i2nbQCTPwJ
SideExecID 1427 = side-exec-id-1-4JuK1QrzJREFR1Nw1UXrd3
NoPartyIDs 453 = 1
PartyID 448 = LXAVL8
PartyRole 452 = 3 (CLIENT_ID)
PartyIDSource 447 = C (GENERALLY_ACCEPTED_MARKET_PARTICIPANT_IDENTIFIER)
Side 54 = 2 (SELL)
SideCurrency 1154 = USD
SettlCurrAmt 119 = 995.528
OrderID 37 = order-id-2-D92cpLPW2c4AkYux7HJE1Q
ClOrdID 11 = cl-ord-id-2-JeR2S5iXuQZ5SLiTL4dy19
SideExecID 1427 = side-exec-id-2-LzbA8eXAszcXEbKcpCCuQe
NoPartyIDs 453 = 1
PartyID 448 = JO514F
PartyRole 452 = 3 (CLIENT_ID)
PartyIDSource 447 = C (GENERALLY_ACCEPTED_MARKET_PARTICIPANT_IDENTIFIER)
TradeID 1003 = 93c2e2ef-0746-41dd-9b2c-0832d689d831
TrdRptStatus 939 = 0 (ACCEPTED)
Text 58 = Great trade!
TradeReportRejectReason 751 = 0 (SUCCESSFUL)
CheckSum 10 = 102
Tag | Field Name | Data Type | Req’d | Description |
---|---|---|---|---|
|
||||
1041 | FirmTradeID | String | Y | Trade identifier as as allocated by Zero Hash. |
|
||||
856 | TradeReportType | Int | Y | This trade report's type. |
487 | TradeReportTransType | Int | Y | This trade report's transaction type. |
55 | Symbol | String | Y | Instrument identifier. |
31 | LastPx | Price | Y | Price of this trade. |
32 | LastQty | Qty | N | Quantity bought or sold on this trade. |
167 | SecurityType | String | Y | Type of security being traded. Supported values: SP = Spot |
828 | TrdType | Int | Y | Type of trade. |
1193 | SettlMethod | Char | Y | Settlement method for this trade. |
60 | TransactTime | UTCTimestamp | Y | Timestamp of event submitting the trade. |
6761 | Anonymous | Char | N | Whether identifying information for this trade should be hidden. Defaults to 'Y' if not provided. |
|
||||
1003 | TradeID | String | N | Identifier assigned to the matched trade. |
939 | TrdRptStatus | Int | Y | Whether the trade was accepted or rejected. Supported values: 0 = Accepted1 = Rejected |
58 | Text | String | N | Free format text string. |
751 | TradeReportRejectReason | Int | N | Reason for trade rejection. Supported values: 0 = Successful1 = Invalid Party Information2 = Unknown Instrument3 = Unauthorized to Report Trades4 = Invalid Trade Type99 = Other |
|
Message Components
The following components are used in the construction of STP messages:
RootParties
Repeating group identifying the owning and entering parties:
Tag | Name | Data Type | Required | Description |
---|---|---|---|---|
1116 | NoRootPartyIDs | NumInGroup | Y | Number of parties in the RootParty repeating group. |
→ 1117 | RootPartyID | String | Y | Unique identifier for this root party. When RootPartyIDSource is C , this must be the Zero Hash participant code. |
→ 1118 | RootPartyIDSource | Char | Y | The source of this root party. Supported values: C = Generally accepted market participant identifier (always exactly 1 required)G = MIC (optional) |
→ 1119 | RootPartyRole | Int | Y | The role of this root party. Supported values: 73 = Execution Venue |
TrdCapRptSideGrp
Repeating group describing the sides involved in the trade capture report:
Tag | Name | Data Type | Req’d | Description |
---|---|---|---|---|
552 | NoSides | NumInGroup | Y | Number of sides in this repeating group. Required to be 2 |
→ 54 | Side | Char | Y | Side of this party. Supported values: 1 = Buy2 = Sell |
→ 1154 | SideCurrency | Currency | Y | Currency used in the trade capture report. |
→ 119 | SettlCurrAmt | Amt | N | The amount of the SideCurrency (119) to be paid to this side for settlement of this trade.Required if LastQty (32) is not included. |
→ 1444 | SideLiquidityInd | Int | N | Indicator of whether liquidity was provided or taken. Supported values: 1 = AddedLiquidity2 = RemovedLiquidity |
→ 37 | OrderID | String | N | Unique identifier of the order as assigned by Zero Hash. |
→ 11 | ClOrdID | String | N | Client assigned unique identifier for the cancel or the cancel/replace request. Uniqueness must be guaranteed within a single trading day. Should not exceed 30 characters. |
→ 1427 | SideExecID | String | N | Identifier for this side. |
|
Parties
Repeating group denoting parties involved throughout the trade process:
Tag | Name | Data Type | Req’d | Description |
---|---|---|---|---|
453 | NoPartyIDs | NumInGroup | Y | Number of parties in this repeating group. |
→ 448 | PartyID | String | Y | Unique identifier for this party. |
→ 452 | PartyRole | Int | Y | The role of this party. Supported values: 3 = Client ID |
→ 447 | PartyIDSource | Char | Y | The source of this party. Supported values: C = Generally accepted market participant identifier |