connamara / quickfixn Goto Github PK
View Code? Open in Web Editor NEWQuickFIX/n implements the FIX protocol on .NET.
Home Page: http://quickfixn.org
License: Other
QuickFIX/n implements the FIX protocol on .NET.
Home Page: http://quickfixn.org
License: Other
Is there a reason I'm unable to run multiple instances of a vb.net program with quickfix? It fails on instantiating the SocketInitiator.
The generated constructors for certain messages have different parameter lists than those for C++ and Java.
Example:
For ExecutionReport, C# takes a symbol. C++ and Java do not. See pasted code fragments below.
C++:
ExecutionReport( const FIX::OrderID& aOrderID, const FIX::ExecID& aExecID, const FIX::ExecType& aExecType, const FIX::OrdStatus& aOrdStatus, const FIX::Side& aSide, const FIX::LeavesQty& aLeavesQty, const FIX::CumQty& aCumQty, const FIX::AvgPx& aAvgPx ) : Message(MsgType())
C#:
public ExecutionReport( QuickFix.Fields.OrderID aOrderID, QuickFix.Fields.ExecID aExecID, QuickFix.Fields.ExecType aExecType, QuickFix.Fields.OrdStatus aOrdStatus, QuickFix.Fields.Symbol aSymbol, QuickFix.Fields.Side aSide, QuickFix.Fields.LeavesQty aLeavesQty, QuickFix.Fields.CumQty aCumQty, QuickFix.Fields.AvgPx aAvgPx ) : this()
I suspect maybe there is a different interpretation of the "Instrument" component. In the XML, the component is marked Required=Y, but all the fields inside are Required=N. I think the C# generator is considering the first field of this component to be required, and thus putting it in the ctor parameter list, whereas C++ and Java must just ignore it completely.
quickfixn.net
quickfixn.org
quickfixn.com
Message.ToXML and the like.
Need investigation to determine full scope of this work (i.e. see the interfaces for QF/C++ and QF/J and port them).
As subject. Examples: BodyLength, SecureDataLen, SignatureLen.
I believe I've found a bug:
As an initiator, if you receive constant traffic for an amount of time greater than your heartbeat interval, you'll skip the heartbeat and therefore will/should be disconnected by the remote host.
I think the logic responsible is found in SocketInitiatorThread.Read, within the nested if/then statements.
if CurrentCulture property is different than English(for example Turkish), convert method is not working properly.
To achieve this issue, you can change current thread CurrentCulture property to english culture before calling Message.GetDecimal() method.
To solve this issue, in Convert method on QuickFix.Fields.Converters.Convert class, Line System.Convert.ToDecimal(d) should be changed to System.Convert.ToDecimal(d, CultureInfo.InvariantCulture).
Added unit test MessageTests:TestGetMsgType() to confirm failure.
Related question: why have both this function and Message.IdentifyType? Kinda redundant.
There is no way to provide an alternate DD for message serialization (e.g. creation of OUTGOING messages only). Repeating groups will be serialized with the in-built DD only, which means it won't use alternate delimiter fields or field orderings.
FIX50 generated files are serializing with the wrong BeginString (FIX.5.0 instead of FIX.T or whatever).
Task 1: Make an acceptance test that causes test app to send an application-level message. It should fail because the BeginString is wrong.
Task 2: Fix the BeginString and make the test pass.
Remove all TODO/FIXME comments.
If they can be fixed easily, fix them.
If they are non-trivial, remove the comment and create a new issue for it.
Environment.TickCount is used to check if it is time to connect in the SocketInitiator.OnStart method.
The problem is that after 25 days the PC is running, this value becomes negative and the application will never connect again.
(check http://msdn.microsoft.com/en-us/library/system.environment.tickcount.aspx).
I tested the code using instead DateTime.Now and the DateTime.Subtract.Seconds and it seems to work fine.
...in accordance with standard C# naming convention.
Existing interface names should be changed to empty sub-interfaces of the new-named interface in order to preserve compilation of existing projects. They should also be deprecated (with the System.Obsolete annotation).
Example: see IAcceptor and it's empty sub-interface Acceptor.
FIX44.xml is missing values for tag 452. Spec seems to define values up to 85, however the Fix44.xml spec included in the project only defines 1-9. Similar bug was filed for quickfixj.
Fix spec (FixWiki):
http://fixwiki.fixprotocol.org/fixwiki/PartyRole
similar bug filed at quickfixj:
http://www.quickfixj.org/jira/browse/QFJ-365
Report on mail list:
http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/2012q1/000078.html
Needs investigation.
FIX5 says fields within repeating groups do not need a specific order, except that the delimiter must come first.
FIX.4.4 (and earlier?) says that fields within repeating groups must match the order specified in the message definition. (see Section "FIX PROTOCOL SYNTAX", sub-section "FIX 'Tag=Value' SYNTAX" -> Message Format -> Item 4)
Thus, we will provide a boolean config option named something like "ExactOrderForRepeatingGroupFields=Y/N" to specify whether messages will be serialized with fields in the prescribed full order or not. If Y, then the FIX.4.4 behavior will be obeyed. If N, then FIX.5 behavior will be used.
to improve build times.
SocketInitiator no longer has GetSessions function, as per (Threaded)SocketAcceptor, so not sure how to access the list of sessions when initiating
After calling Load(StreamReader) in SessionSettings constructor, FileStream.Close() method should be called. Otherwise file is still being used by other process.
if i create SessionSettings object and delete config file, we get exception which Message is "The process cannot access the file because it is being used by another process".
Altough we changed property ValidateLengthAndChecksum to false on OnCreate method, we saw "Could not parse message: Invalid body length" message on event log file. we expect to pass such as these errors.
when we check ReadFixMessage method on Parser class, BodyLength is being checked. so ValidateLengthAndChecksum setting for checking bodylength is becoming useless.
i think checking bodylength on ReadFixMessage method is not necessary.
if you agree with me, some codes which check bodylength on ReadFixMessage method should be removed.
The former is an artifact from the early versions (name was changed because of trademark concerns).
Looks like we may only need to change the dir name, the sln reference to that dir, and any scripts that point to that dir.
See mail list:
http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/2012q1/000096.html
Need to determine if we should do this, and if yes, do it.
If an initiator is connected, Initiator::Stop() doesn't appear to have any effect. There's probably an exception getting swallowed.
If the initiator is in a disconnected state, then Stop() will kill the QF thread.
If don't call Stop(), then the QF thread will stay open. GUI apps will stay open in the background.
because it feels dirty to copy an executable from a different project
Each release needs to have it's assembly version updated to match.
Need to update release scripts to do this.
when trying send message which has group(for example Instrument block in Market Data Request), group tags are not sent in order according to fieldOrder array property in the group.
Reject message which reject reason is "REPEATING_GROUP_FIELDS_OUT_OF_ORDER" can be received related to this issue.
Would it be possible to integrate SSL into QuickFIX/n? We currently have to set up stunnel around the FIX connections so it would be fantastic to remove this requirement and allow it to be a configuration option.
This can get nasty for optional fields - requires a ton of try/catch which is not only ugly as hell but also slow (always creating a stack frame context).
The proper .NET way would be if fields that are not natively nullable (classes as strings) are Nullable which has full .NETsupport and a nice .HasValue field.
Hi,
I downloaded quickFIXN Demo, I builded and run...
But I cannnot establish any connection, I try even to change protocol FIX (FIX42 to FIX44) because I have to set Username and Password.
But seems that I have another kind of problem
QFApp::Start() called
The thread '' (0xa84) has exited with code 0 (0x0).
The thread '' (0x1d40) has exited with code 0 (0x0).
.....
do you have any suggestion??
best regards
Alessio
Field SubscriptionRequestType (263) in message AQ is not required, but DataDictionary is saying it is.
See mail list chain:
http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/2012q1/000056.html
Investigate issues reported in this mail:
http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/2012q1/000038.html
I'm not sure if we even want to do this.
In an ideal world, the whole project is ".NET" (it's incredibly easy to install ruby on windows, though).
This would mean all code generation and testing is converted to native .NET somehow.
One possibility: http://ironruby.net/
Very low priority.
Hello, I am trying to process a trade capture report and I cannot parse a non-standard group. The exchange is sending NoPartyIDGroup on that message as an extension to FIX44. The fields are definitely there (453). IsSetField reports false. I converted the message to just a standard FIX message and IsSetField passed, but when I tried to access the group, it reported that the tag was not on the message.
...if one does not want to implement ALL OnMessage methods.
I suggest tocreate an alternative TryCrack method that returns true (if an OnMessage method was found) or false (if not).
The Crack method should use OnCrack and still throw exception on false.
This allows those who want partial strong handling to work properly. It is in sync with .NET collection and other handling (TryGet, TryParse etc.).
QuickFix.FieldMap.GetField(QuickFix.Fields.XXXField) does not return anything because they are defined as Sub procs rather than Functions
some text
I reconnected my FIX session today, having last received a message last week. The last sequence number received last week was 6202. When the connection came up today it seemed to be expecting the next sequence (6203) rather than resetting back to 1. The configuration I am using has a distinct start/end time, so the sequences should be getting reset automatically when the connection comes up on a new day.
This is a critical problem. Log attached
20111229-16:59:29.101 : 8=FIX.4.4|9=75|35=0|34=6202|49=TID|52=20111229-16:59:24.651|56=SID|112=TEST|10=116|
20111229-16:59:54.333 : 8=FIX.4.4|9=233|35=Q|34=177|49=SID|52=20111229-16:59:54.328|56=TID|128=ABN|17=tB_Exec_5|31=1|32=10000|37=tB_Ord_3|38=0|54=1|55=LLOY|58=Execution tB_Exec_5 received has quantity exceeding order. 10000 received, only 0 remaining.|127=C|10=216|
20111229-17:00:42.036 : 8=FIX.4.4|9=74|35=1|34=178|49=SID|52=20111229-17:00:42.033|56=TID|112=TEST|10=055|
20111229-17:02:25.297 : 8=FIX.4.4|9=77|35=A|34=179|49=SID|52=20111229-17:02:25.294|56=TID|98=0|108=60|10=097|
20120104-10:33:52.616 : 8=FIX.4.4|9=77|35=A|34=180|49=SID|52=20120104-10:33:52.429|56=TID|98=0|108=60|10=078|
20120104-10:33:52.710 : 8=FIX.4.4|9=75|35=A|34=1|49=TID|52=20120104-10:33:52.710|56=SID|98=0|108=60|10=221|
20120104-10:33:52.773 : 8=FIX.4.4|9=117|35=5|34=181|49=SID|52=20120104-10:33:52.773|56=TID|58=MsgSeqNum too low, expecting 6203 but received 1|10=132|
20120104-10:34:52.384 : 8=FIX.4.4|9=77|35=A|34=182|49=SID|52=20120104-10:34:52.381|56=TID|98=0|108=60|10=078|
20120104-10:34:52.389 : 8=FIX.4.4|9=75|35=A|34=4|49=TID|52=20120104-10:34:52.387|56=SID|98=0|108=60|10=235|
20120104-10:34:52.391 : 8=FIX.4.4|9=117|35=5|34=183|49=SID|52=20120104-10:34:52.389|56=TID|58=MsgSeqNum too low, expecting 6203 but received 4|10=141|
QuickFix.FieldMap.GetField(XXXField) doesn't return anything.
This seems odd. Both QF/C++ and QF/J return stuff. I'm not sure where the precedent came from for our version.
I'm inclined to change them to be more in line with the other ports. Any objections?
SocketConnectHost does not support IP6 addresses, so if the setting is set to “localhost” which then resolves to ::1, it is unable to continue
To reproduce:
Run Examples.SimpleAcceptor with its default config
Run UIDemo with its default config
UIDemo => click Connect button, wait till it connects, then click Disconnect
In SimpleAcceptor's event logs, you'll see:
20111117-17:47:56.010 : SocketReader Error: System.NullReferenceException: Object reference not set to an instance of an object. at QuickFix.SocketReader.Read() in C:\dev\quickfixn\QuickFIX.NET\SocketReader.cs:line 28 20111117-17:47:56.010 : shutdown requested: Object reference not set to an instance of an object. 20111117-17:47:56.010 : shutdown 20111117-17:48:20.764 : shutdown requested: reactor is shutting down
If you run it in a debugger, that's all the stacktrace you'll get.
At time of creating this bug, the code lines are:
24 public void Read() 25 { 26 try 27 { 28 if (tcpClient_.Client.Poll(1000000, SelectMode.SelectRead)) // one-second timeout
The variable that's null is tcpClient_.Client.
I suspect that SocketReader::Disconnect() is getting invoked, shutting down the socket, while something else is still running Socket::Read() in a loop somewhere.
Would be great to build with vs2010
Hi all,
I'm trying to get a Group out of a message, but the generic group won't cast into the specific group variable.
The following code is based on the example shown on the website at http://quickfixn.org/tutorial/repeating-groups
public void OnMessage(QuickFix.FIX42.MarketDataIncrementalRefresh message, SessionID sessionID)
{
MDReqID mdReqID = message.MDReqID;
var noMDEntriesGroup = new QuickFix.FIX42.MarketDataIncrementalRefresh.NoMDEntriesGroup();
for (int grpIndex = 1; grpIndex <= message.GetInt(Tags.NoMDEntries); grpIndex += 1)
{
noMDEntriesGroup = message.GetGroup(grpIndex, Tags.NoMDEntries);
// code omitted here
}
}
It generates the following error in Visual Studio
Error 1 Cannot implicitly convert type 'QuickFix.Group' to 'QuickFix.FIX42.MarketDataIncrementalRefresh.NoMDEntriesGroup'. An explicit conversion exists (are you missing a cast?)
According to the error message, I tried an explicit conversion to no avail (code follows). Doing this got rid of the Visual Studio error message, but resulted in an InvalidCastException at runtime.
noMDEntriesGroup = (QuickFix.FIX42.MarketDataIncrementalRefresh.NoMDEntriesGroup)message.GetGroup(grpIndex, Tags.NoMDEntries);
Thanks,
Logan
There may be cases when an application wants to control the sequence number. Investigate on QuickFIX implements this and whether we should support a writable property.
See this thread: https://groups.google.com/forum/#!topic/quickfixn/AVbVUXmw8JM
You are not accounting for being in-between days when doing your check for StartDay/EndDay for the CheckTime call which will cause SessionSchedule.IsSessionTime to fail... To repro just add a StartTime/EndTime of like 20:00:00 and 22:00:00 with a StartDay & EndDay that is valid. So today is Thursday and if my StartDay is Sunday and EndDay is Friday, my session never starts because the IsSessionTime fails.
From an email to quickfixn:
It seems all your currency fields (e.g. QuickFix.Fields.Currency/SettlCurrency/AllocSettlCurrency)
have been defined as DecimalField rather than StringField. These fields are for
currencies (e.g. "GBP") not a decimal amount.
case "UTCDATEONLY": return typeof(Fields.DateTimeField);
in DDField.cs
Repeating groups just use default FieldMap ordering of fields, which is incompatible with FIX, which says that the delimiter field should come first.
See the mail list chain that starts here:
http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/2011q4/000004.html
if it is possible, can you provide to change character encoding(Default is UTF8) for sending and receiving messages?
I was using .NET wrapper for quickfix and everything worked fine. Recently I was looking for a native alternative and I found this project. So I took my old project and basicly rewrite it. But now it seems that my initiator can´t even get a working connection since the OnLogon event is never called. My configuration file is still the same:
[DEFAULT]
ConnectionType=initiator
LogonTimeout=1
LogoutTimeout=1
ValidateFieldsOutOfOrder=Y
ValidateUserDefinedFields=Y
ValidateFieldsHaveValues=Y
AllowUnknownMsgFields=Y
SocketTcpNoDelay=Y
FileStorePath=Store
FileLogPath=Log
CheckLatency=N
CheckCompID=Y
SendRedundantResendRequests=Y
ContinueInitializationOnError=Y
ResetOnLogon=Y
ResetOnLogout=Y
ResetOnDisconnect=Y
ForceResync=Y
HeartBtInt=30
StartTime=03:00:00
EndTime=22:00:00
UseLocalTime=Y
ReconnectInterval=20
UseDataDictionary=Y
DataDictionary=FXService.FXCM.xml
BeginString=FIX.4.4
[SESSION]
username=xxx
password=xxx
pin=xxx
SenderCompID=xxx
TargetCompID=xxx
TargetSubID=xxx
SocketConnectHost=fixdemo.fxcorporate.com
SocketConnectPort=8043
I don't know if this is a proper channel for this kind of problem but I appreciate any help.
Session waits forever for a response instead of disconnecting due to "Timed out waiting for logon response"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.