FIX Session Sequence Resets and Maintenance
Zerohash support a hot-hot primary and secondary FIX gateway configuration with intra-session sequence resets that allow clients to always remain connected and trade 24/7 365.
Architecture Overview
Dual FIX Gateways (HOT-HOT):
- Primary and Secondary gateways are always active.
- Clients may send/receive orders through either gateway at any time
- Orders placed on one gateway may be cancelled or modified on the other
- Note: The same SenderCompId must be used on both primary and secondary
Daily Sequence Number Reset Schedule
Gateway | Reset Time (EST) | Reset Type |
---|---|---|
Primary | 16:01 PM | Zerohash sends logon with 141=Y, MsgSeqNum=1 |
Secondary | 18:01 PM | Zerohash sends logon with 141=Y, MsgSeqNum=1 |
- Purpose : Staggered resets ensure zero overlap, reducing the risk of message loss during client disconnects.
- Client should support receiving an intra-session logon without a preceding logout
Integration Scenarios and Expected Results
ID | Test Case | Expected Result |
---|---|---|
1 | Client connects to primary and secondary gateways with the same SenderCompId and TargetCompId combination | (1) Both logon requests are accepted by the Zerohash FIX Gateways |
2 | Client connects to primary and secondary gateways with the same dropcopy SenderCompId and TargetCompId combination | (1) Both dropcopy session logon requests are accepted by the Zerohash FIX Gateways |
3 | At 16:01 EST, Zerohash primary gateway sends Logon (141=Y, MesSeqNum = 1) intra-session | (1) Client resets MsqSeqNum to 1 |
4 | Client sends NewOrderSingle after reset on the primary | (1) If client sends preceeding login, Order has MsgSeqNum=2 and is accepted (2) If client doesn't send preceeding login, Order has MsgSeqNum=1 and is accepted |
5 | At 18:01 EST, Zerohash secondary gateway sends Logon (141=Y, MesSeqNum = 1) intra-session | (1) Same reset process occurs on the secondary independently. Client resets MsqSeqNum to 1 |
6 | Client sends NewOrderSingle after reset on the secondary | (1) If client sends preceeding login, Order has MsgSeqNum=2 and is accepted (2) If client doesn't send preceeding login, Order has MsgSeqNum=1 and is accepted |
7 | Client loses connectivity to primary at 15:55 EST, reconnects at 16:05 | (1) Zerohash cannot send the Logon request with 141=Y and MsqSeqNum continues to increase once reconnected (2) Client can still trading and receive Execution Reports on secondary gateway and dropcopy Session. |
8 | Client sends a high rate of new order singles close to and after the primary FIX gateway reset time at 16:01 EST | (1) All Execution Reports are returned on the primary gateway (2) All Execution Reports are returned on the secondary gateway (3) All Execution Reports are returned on the dropcopy session |
9 | Client sends a NewOrderSingle with same client order id on primary and secondary gateways | (1) The second placed order gets rejected with "ClOrdID already in use by an open order" Note: This protection only applies to open orders. |
10 | Client loses connectivity to primary at 15:55 EST, sends NewOrderSingle from the secondary, reconnects to Primary at 16:05 | (1) Zerohash cannot send the Logon request with 141=Y and MsqSeqNum continues to increase once reconnected (2) Client reconnects and resets seqNum to 1 or Client reconnects and doesn't reset SeqNum. Zerohash primary gateway will request a resend. The client should not resend NewOrderSingles. |
Updated about 11 hours ago