QuickFIX Session Schedules: Daily vs Weekly Sessions, Time Zones and Sunday to Thursday Markets
Written and maintained by ZagTrader. Last reviewed . How this page is sourced and checked
The schedule decides two things: when the session may be logged on, and when a new session period starts. A new period starts with sequence numbers at 1. Getting the schedule wrong gives sessions that will not log on, or that reset on a day the counterparty does not.
Daily or weekly
| Pattern | Settings | Sequence numbers reset |
|---|---|---|
| Daily | StartTime, EndTime | At every StartTime |
| Daily on some days only | StartTime, EndTime, Weekdays (QuickFIX/J, QuickFIX/n) | At StartTime on each listed day |
| Weekly | StartDay, StartTime, EndDay, EndTime | Once a week, at StartDay and StartTime |
| Never ends | NonStopSession=Y | Never by time; only by a reset you trigger |
- Agree the reset point with the counterparty. If you reset daily and they reset weekly, Tuesday morning starts with MsgSeqNum too low.
- At start-up the engine compares the store's creation time with the schedule. If the store belongs to an earlier period, QuickFIX/J logs "Session state is not current; resetting" and starts at 1.
- StartDay and EndDay must come together; Weekdays cannot be combined with them.
Time zones
Times are UTC by default. That is safe but easy to get wrong when the counterparty states its hours in local time. The options differ by engine:
| Setting | Engines | Notes |
|---|---|---|
| TimeZone | QuickFIX/J, QuickFIX/n | QuickFIX/J takes Java zone IDs such as Asia/Riyadh and stops with an error on an unknown ID. QuickFIX/n hands the ID to the operating system; check it resolves on your host. |
StartTime=07:00:00 Asia/Riyadh | QuickFIX/J | A zone after the time applies to that time only. |
| UseLocalTime | QuickFIX/n, QuickFIX C++ | Uses the host's clock zone. QuickFIX/n refuses it next to TimeZone. |
Prefer a named zone over UseLocalTime: the schedule then does not change when the server moves or its clock zone is changed. Messages always carry UTC in SendingTime (52) whatever the schedule uses.
Sunday to Thursday markets
The Saudi Exchange and Boursa Kuwait have traded Sunday to Thursday, and the UAE exchanges Monday to Friday (sources and details in FIX in GCC and MENA markets); take each venue's days from its own trading calendar. A firm connected to both can run sessions on six days, so each session needs its own schedule. The times below are examples; use the counterparty's session hours.
[SESSION]
BeginString=FIX.4.4
SenderCompID=BUYSIDE
TargetCompID=RIYADH-BRK
TimeZone=Asia/Riyadh
StartTime=08:00:00
EndTime=17:00:00
Weekdays=Sun,Mon,Tue,Wed,Thu[SESSION]
StartDay=Sunday
StartTime=05:00:00
EndDay=Thursday
EndTime=14:00:00- QuickFIX C++ has no Weekdays setting. Use the weekly form, or one daily session and logon control in your application.
- QuickFIX/J reads Weekdays in the JVM's default locale. On a server whose locale is Arabic or French,
Sun,Monmay not parse; set the JVM locale or use the names of that locale. - With the weekly form, a day order's life and the sequence reset no longer line up: the session keeps its numbers all week. Make sure the counterparty resets weekly too.
- A Sunday session on an engine scheduled Monday to Friday is simply outside its schedule and never logs on. That is the first thing to check when a regional session is silent on Sunday.
Questions
- What time zone does QuickFIX use for StartTime and EndTime?
- UTC, unless you set TimeZone (QuickFIX/J and QuickFIX/n), put a zone after the time (QuickFIX/J) or set UseLocalTime=Y (QuickFIX/n and QuickFIX C++).
- How do I run a QuickFIX session Sunday to Thursday?
- In QuickFIX/J and QuickFIX/n, use StartTime, EndTime and Weekdays=Sun,Mon,Tue,Wed,Thu with a TimeZone. In any engine, a weekly session with StartDay=Sunday and EndDay=Thursday also works.
- Why does my QuickFIX session not log on at the weekend?
- It is outside its schedule. QuickFIX only logs on between StartTime and EndTime on the scheduled days.
The FIX side of the problem
What the error means on any FIX engine, with example messages you can open in the parser:
Reference
Sources
- QuickFIX/J user manual: Configuration
- QuickFIX/J source: DefaultSessionSchedule.java (StartTime, Weekdays, TimeZone)
- QuickFIX/J source: Session.java (setting names, defaults, logout and reject texts)
- QuickFIX/n documentation: Configuration
- QuickFIX/n source: SessionSchedule.cs (Weekdays, TimeZone, UseLocalTime)
- QuickFIX C++ documentation: Configuration
- QuickFIX C++ source: SessionSettings.h (setting names)
Setting names, defaults and message texts were checked against the projects' source code and documentation on the review date shown at the top of the page. Behaviour can change between releases; check the version you run. This guide is independent and not affiliated with the QuickFIX projects.
See also
More QuickFIX guides
- QuickFIX/J vs QuickFIX/n vs QuickFIX C++: Which One to Use
- QuickFIX Session Settings Explained: Configuration Reference
- QuickFIX with FIX 5.0 SP2: FIXT.1.1, Transport and Application Dictionaries
- Custom Fields and a Custom Data Dictionary in QuickFIX
- Repeating Groups in QuickFIX: Reading, Writing and Validation Errors
- QuickFIX "Tag not defined for this message type": Causes and Fixes
- QuickFIX "Conditionally Required Field Missing": Why Your Handler Caused It
- QuickFIX "Incorrect data format for value": Field Types and Fixes
- QuickFIX "MsgSeqNum too low": Reset Sequence Numbers Safely and Fix the File Store
- QuickFIX Logon Problems: Session Not Found, CompID Mismatch and Rejected Logons
- QuickFIX SSL and TLS: Setup per Engine and Handshake Failures
- QuickFIX onMessage Not Called: Message Cracking Problems
- Reading and Analyzing QuickFIX Logs: messages.log and event.log