Imported from previous forum
Hello forum members,
I have a problem receiving fix server indication when sending logon fix message
I was creatig a c# console app program using async request to a fix demo gateway
using this code:
using System;
using System.Text;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Security.Cryptography;
using System.Threading;
namespace Simple_async_socket_coonnect
{
public static class GlobalVar
{
static Byte[] _globalValueByteGetreceive;
/// <summary>
/// Access routine for global variable.
/// </summary>
public static Byte[] GlobalValueByteGetreceive
{
get
{
return _globalValueByteGetreceive;
}
set
{
_globalValueByteGetreceive = value;
}
}
/// <summary>
/// Static value protected by access routine.
/// </summary>
static Byte[] _globalValueByteGet;
/// <summary>
/// Access routine for global variable.
/// </summary>
public static Byte[] GlobalValueByteGet
{
get
{
return _globalValueByteGet;
}
set
{
_globalValueByteGet = value;
}
}
/// <summary>
/// Global static field.
/// </summary>
public static bool GlobalBoolean;
}
class Program
{
static void Main(string[] args)
{
Console.WriteLine(DoSocketGet("*****"));
}
static string DoSocketGet(string server)
{
//Set up variables and String to write to the server.
Random random = new Random();
Encoding ASCII = Encoding.ASCII;
StringBuilder nt = new StringBuilder();
nt.Append("8=FIX.4.4/9=136/35=A/49=*****/56=***/34=596");
//nt.Append("34=" + random.Next(1000) + " 52=" + DateTime.UtcNow.ToString("yyyyMMdd-HH:mm:ss") + " 98=0 108=30 554=" + sha256encrypt("1bird2lake") + " 10=015");
nt.Append("/52=" + DateTime.UtcNow.ToString("yyyyMMdd-HH:mm:ss") + "/98=0/108=30" + "/554=" + sha256encrypt("*****") + "/10=118/");
string Get = nt.ToString();
Byte[] ByteGet = ASCII.GetBytes(Get);
GlobalVar.GlobalValueByteGet = ByteGet;
Byte[] RecvBytes = new Byte[256];
GlobalVar.GlobalValueByteGetreceive = RecvBytes;
String strRetPage = null;
Socket s = null;
IPEndPoint hostEndPoint;
IPAddress hostAddress = null;
int conPort = 5679;
// Get DNS host information.
IPHostEntry hostInfo = Dns.GetHostEntry(server);
// Get the DNS IP addresses associated with the host.
IPAddress[] IPaddresses = hostInfo.AddressList;
hostAddress = IPaddresses[0];
hostEndPoint = new IPEndPoint(hostAddress, conPort);
// Creates the Socket to send data over a TCP connection.
s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
// Connect to the host using its IPEndPoint.
// ManualResetEvent connectDone = new ManualResetEvent(false);
s.BeginConnect(hostEndPoint, new AsyncCallback(Connected), s);///async connection request request
// connectDone.WaitOne(1000,false);
return strRetPage;
}
public static void Connected(IAsyncResult iar)
{
Socket sock = (Socket)iar.AsyncState;
try
{
sock.EndConnect(iar);
sock.BeginSend(GlobalVar.GlobalValueByteGet, 0, GlobalVar.GlobalValueByteGet.Length, SocketFlags.None, new AsyncCallback(SendData), sock);
}
catch (SocketException)
{
Console.WriteLine("Unable to connect to host");
}
}
static void ReceivedData(IAsyncResult iar)
{
//I dont get a response from the server here i dont stop here at break point
//its eather my code is wring or the fix message is wrong
Socket remote = (Socket)iar.AsyncState;
int recv = remote.EndReceive(iar);
string receivedData = Encoding.ASCII.GetString(GlobalVar.GlobalValueByteGetreceive, 0, recv);
Console.WriteLine(receivedData);
}
private static void SendData(IAsyncResult iar)
{
// ManualResetEvent connectDone = new ManualResetEvent(false);
Socket server = (Socket)iar.AsyncState;
int sent = server.EndSend(iar);
server.BeginReceive(GlobalVar.GlobalValueByteGetreceive, 0, GlobalVar.GlobalValueByteGetreceive.Length, SocketFlags.None, new AsyncCallback(ReceivedData), server);
// connectDone.WaitOne(3000);
}
public static string sha256encrypt(string phrase)
{
UTF8Encoding encoder = new UTF8Encoding();
SHA256Managed sha256hasher = new SHA256Managed();
byte[] hashedDataBytes = sha256hasher.ComputeHash(encoder.GetBytes(phrase));
return byteArrayToString(hashedDataBytes);
}
public static string byteArrayToString(byte[] inputArray)
{
StringBuilder output = new StringBuilder("");
for (int i = 0; i < inputArray.Length; i++)
{
output.Append(inputArray[i].ToString("X2"));
}
return output.ToString();
}
}
}
I am sending this string as my login message
8=FIX.4.4/9=136/35=A/49=****/56=MBT/34=1/52=20091230-18:41:27/98=0/108=30/554=AD8C8A0692F9B051E0A6CA3ED6123F7430C3CBF08E3ABF15E54F47D92E93C3C7/10=118/
and don’t get any response which means i am not getting into ReceivedData function
I am stuck at this point and I wil be glad to get some direction what is the problem
(might be my c# code or my fix string)
best regards
eyal
it could be a lot of things: wrong sequence, wrong session parameters ( session, version ), etc. the easy way to solve it is checking the server logs to see how your login message was handled by it. if it is quickfix based, check GLOBAL.event.log, GLOBAL.messages.log.
cheers,
Clebson Derivan
Hello forum members, I have a problem receiving fix server indication
when sending logon fix message I was creatig a c# console app program
using async request to a fix demo gateway using this code: using System;
using System.Text; using System.IO; using System.Net; using
System.Net.Sockets; using System.Security.Cryptography; using
System.Threading; namespace Simple_async_socket_coonnect {public static class GlobalVar { static Byte[] _globalValueByteGetreceive; /// <summary> /// Access routine for global variable. /// </summary> public static Byte[] GlobalValueByteGetreceive { get { return _globalValueByteGetreceive; } set { _globalValueByteGetreceive = value; } } /// <summary> /// Static value protected by access routine. /// </summary> static Byte[] _globalValueByteGet; /// <summary> /// Access routine for global variable. /// </summary> public static Byte[] GlobalValueByteGet { get { return _globalValueByteGet; } set { _globalValueByteGet = value; } } /// <summary> /// Global static field. /// </summary> public static bool GlobalBoolean; } class Program { static void Main(string[] args) { Console.WriteLine(DoSocketGet("*****")); } static string DoSocketGet(string server) { //Set up variables and String to write to the server. Random random = new Random(); Encoding ASCII = Encoding.ASCII; StringBuilder nt = new StringBuilder(); nt.Append("8=FIX.4.4/9=136/35=A/49=*****/56=***/34=596"); //nt.Append("34=" + random.Next(1000) + " 52=" + DateTime.UtcNow.ToString("yyyyMMdd- HH:mm:ss") + " 98=0 108=30 554=" + sha256encrypt("1bird2lake") + " 10=015"); nt.Append("/52=" + DateTime.UtcNow.ToString("yyyyMMdd-HH:mm:ss") + "/98=0/108=30" + "/554=" + sha256encrypt("*****") + "/10=118/"); string Get = nt.ToString(); Byte[] ByteGet = ASCII.GetBytes(Get); GlobalVar.GlobalValueByteGet = ByteGet; Byte[] RecvBytes = new Byte[256]; GlobalVar.GlobalValueByteGetreceive = RecvBytes; String strRetPage = null; Socket s = null; IPEndPoint hostEndPoint; IPAddress hostAddress = null; int conPort = 5679; // Get DNS host information. IPHostEntry hostInfo = Dns.GetHostEntry(server); // Get the DNS IP addresses associated with the host. IPAddress[] IPaddresses = hostInfo.AddressList; hostAddress = IPaddresses[0]; hostEndPoint = new IPEndPoint(hostAddress, conPort); // Creates the Socket to send data over a TCP connection. s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); // Connect to the host using its IPEndPoint. // ManualResetEvent connectDone = new ManualResetEvent(false); s.BeginConnect(hostEndPoint, new AsyncCallback(Connected), s);///async connection request request // connectDone.WaitOne(1000,false); return strRetPage; } public static void Connected(IAsyncResult iar) { Socket sock = (Socket)iar.AsyncState; try { sock.EndConnect(iar); sock.BeginSend(GlobalVar.GlobalValueByteGet, 0, GlobalVar.GlobalValueByteGet.Length, SocketFlags.None, new AsyncCallback(SendData), sock); } catch (SocketException) { Console.WriteLine("Unable to connect to host"); } } static void ReceivedData(IAsyncResult iar) { //I dont get a response from the server here i dont stop here at break point //its eather my code is wring or the fix message is wrong Socket remote = (Socket)iar.AsyncState; int recv = remote.EndReceive(iar); string receivedData = Encoding.ASCII.GetString(GlobalVar.Gl- obalValueByteGetreceive, 0, recv); Console.WriteLine(receivedData); } private static void SendData(IAsyncResult iar) { // ManualResetEvent connectDone = new ManualResetEvent(false); Socket server = (Socket)iar.AsyncState; int sent = server.EndSend(iar); server.BeginReceive(GlobalVar.GlobalValueByteGetreceive, 0, GlobalVar.GlobalValueByteGetreceive.Length, SocketFlags.None, new AsyncCallback(ReceivedData), server); // connectDone.WaitOne(3000); } public static string sha256encrypt(string phrase) { UTF8Encoding encoder = new UTF8Encoding(); SHA256Managed sha256hasher = new SHA256Managed(); byte[] hashedDataBytes = sha256hasher.ComputeHash(encoder.GetBytes(phrase)); return byteArrayToString(hashedDataBytes); } public static string byteArrayToString(byte[] inputArray) { StringBuilder output = new StringBuilder(""); for (int i = 0; i < inputArray.Length; i++) { output.Append(inputArray[i].ToString("X2")); } return output.ToString(); } } } I am sending this string as my login message 8=FIX.4.4/9=136/35=A/49=****/56=MBT/34=1/52=20091230- 18:41:27/98=0/108=30/554=AD8C8A0692F9B051E0A6CA3ED6123F7430C3CBF08E- 3ABF15E54F47D92E93C3C7/10=118/ and don't get any response which means i am not getting into ReceivedData function I am stuck at this point and I wil be glad to get some direction what is the problem (might be my c# code or my fix string)best regards eyal
do you know where can i test this fix message?
the third pary company does not give this support since its a demo environment …
do you know where can i test this simple console app?
thanks
it could be a lot of things: wrong sequence, wrong session parameters (
session, version ), etc. the easy way to solve it is checking the server
logs to see how your login message was handled by it. if it is quickfix
based, check GLOBAL.event.log, GLOBAL.messages.log.cheers, Clebson Derivan
Hello forum members, I have a problem receiving fix server indication
when sending logon fix message I was creatig a c# console app program
using async request to a fix demo gateway using this code: using
System; using System.Text; using System.IO; using System.Net; using
System.Net.Sockets; using System.Security.Cryptography; using
System.Threading; namespace Simple_async_socket_coonnect {public static class GlobalVar { static Byte[] _globalValueByteGetreceive; /// <summary> /// Access routine for global variable. /// </summary> public static Byte[] GlobalValueByteGetreceive { get { return _globalValueByteGetreceive; } set { _globalValueByteGetreceive = value; } } /// <summary> /// Static value protected by access routine. /// </summary> static Byte[] _globalValueByteGet; /// <summary> /// Access routine for global variable. /// </summary> public static Byte[] GlobalValueByteGet { get { return _globalValueByteGet; } set { _globalValueByteGet = value; } } /// <summary> /// Global static field. /// </summary> public static bool GlobalBoolean; } class Program { static void Main(string[] args) { Console.WriteLine(DoSocketGet("*****")); } static string DoSocketGet(string server) { //Set up variables and String to write to the server. Random random = new Random(); Encoding ASCII = Encoding.ASCII; StringBuilder nt = new StringBuilder(); nt.Append("8=FIX.4.4/9=136/35=A/49=*****/56=***/34=596"); //nt.Append("34=" + random.Next(1000) + " 52=" + DateTime.UtcNow.ToString("yyyyMMdd- HH:mm:ss") + " 98=0 108=30 554=" + sha256encrypt("1bird2lake") + " 10=015"); nt.Append("/52=" + DateTime.UtcNow.ToString("yyyyMMdd-HH:mm:ss") + "/98=0/108=30" + "/554=" + sha256encrypt("*****") + "/10=118/"); string Get = nt.ToString(); Byte[] ByteGet = ASCII.GetBytes(Get); GlobalVar.GlobalValueByteGet = ByteGet; Byte[] RecvBytes = new Byte[256]; GlobalVar.GlobalValueByteGetreceive = RecvBytes; String strRetPage = null; Socket s = null; IPEndPoint hostEndPoint; IPAddress hostAddress = null; int conPort = 5679; // Get DNS host information. IPHostEntry hostInfo = Dns.GetHostEntry(server); // Get the DNS IP addresses associated with the host. IPAddress[] IPaddresses = hostInfo.AddressList; hostAddress = IPaddresses[0]; hostEndPoint = new IPEndPoint(hostAddress, conPort); // Creates the Socket to send data over a TCP connection. s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); // Connect to the host using its IPEndPoint. // ManualResetEvent connectDone = new ManualResetEvent(false); s.BeginConnect(hostEndPoint, new AsyncCallback(Connected), s);///async connection request request // connectDone.WaitOne(1000,false); return strRetPage; } public static void Connected(IAsyncResult iar) { Socket sock = (Socket)iar.AsyncState; try { sock.EndConnect(iar); sock.BeginSend(GlobalVar.GlobalValueByteGet, 0, GlobalVar.GlobalValueByteGet.Length, SocketFlags.None, new AsyncCallback(SendData), sock); } catch (SocketException) { Console.WriteLine("Unable to connect to host"); } } static void ReceivedData(IAsyncResult iar) { //I dont get a response from the server here i dont stop here at break point //its eather my code is wring or the fix message is wrong Socket remote = (Socket)iar.AsyncState; int recv = remote.EndReceive(iar); string receivedData = Encoding.ASCII.GetString(GlobalVar.Gl- obalValueByteGetreceive, 0, recv); Console.WriteLine(receivedData); } private static void SendData(IAsyncResult iar) { // ManualResetEvent connectDone = new ManualResetEvent(false); Socket server = (Socket)iar.AsyncState; int sent = server.EndSend(iar); server.BeginReceive(GlobalVar.GlobalValueByteGetreceive, 0, GlobalVar.GlobalValueByteGetreceive.Length, SocketFlags.None, new AsyncCallback(ReceivedData), server); // connectDone.WaitOne(3000); } public static string sha256encrypt(string phrase) { UTF8Encoding encoder = new UTF8Encoding(); SHA256Managed sha256hasher = new SHA256Managed(); byte[] hashedDataBytes = sha256hasher.ComputeHash(encoder.GetBytes(phrase)); return byteArrayToString(hashedDataBytes); } public static string byteArrayToString(byte[] inputArray) { StringBuilder output = new StringBuilder(""); for (int i = 0; i < inputArray.Length; i++) { output.Append(inputArray[i].ToString("X2")); } return output.ToString(); } } } I am sending this string as my login message 8=FIX.4.4/9=136/35=A/49=****/56=MBT/34=1/52=20091230- 18:41:27/=0/108=30/554=AD8C8A0692F9B051E0A6CA3ED6123F7430C3CBF08E- 3ABF15E54F47D92E93C3C7/10=118/ and don't get any response which means i am not getting into ReceivedData function I am stuck at this point and I wil be glad to get some direction what is the problem (might be my c# code or my fix string)best regards eyal
use one of examples found on quickfix project folder. try the executor or the order match.
cheers,
Clebson
do you know where can i test this fix message? the third pary company
does not give this support since its a demo environment … do you know
where can i test this simple console app? thanksit could be a lot of things: wrong sequence, wrong session parameters
( session, version ), etc. the easy way to solve it is checking the
server logs to see how your login message was handled by it. if it is
quickfix based, check GLOBAL.event.log, GLOBAL.messages.log.cheers, Clebson Derivan
Hello forum members, I have a problem receiving fix server
indication when sending logon fix message I was creatig a c# console
app program using async request to a fix demo gateway using this
code: using System; using System.Text; using System.IO; using
System.Net; using System.Net.Sockets; using
System.Security.Cryptography; using System.Threading; namespace
Simple_async_socket_coonnect {public static class GlobalVar { static Byte[] _globalValueByteGetreceive; /// <summary> /// Access routine for global variable. /// </summary> public static Byte[] GlobalValueByteGetreceive { get { return _globalValueByteGetreceive; } set { _globalValueByteGetreceive = value; } } /// <summary> /// Static value protected by access routine. /// </summary> static Byte[] _globalValueByteGet; /// <summary> /// Access routine for global variable. /// </summary> public static Byte[] GlobalValueByteGet { get { return _globalValueByteGet; } set { _globalValueByteGet = value; } } /// <summary> /// Global static field. /// </summary> public static bool GlobalBoolean; } class Program { static void Main(string[] args) { Console.WriteLine(DoSocketGet("*****")); } static string DoSocketGet(string server) { //Set up variables and String to write to the server. Random random = new Random(); Encoding ASCII = Encoding.ASCII; StringBuilder nt = new StringBuilder(); nt.Append("8=FIX.4.4/9=136/35=A/49=*****/56=***/34=596"- ); //nt.Append("34=" + random.Next(1000) + " 52=" + DateTime.UtcNow.ToString("yyyyMMdd- HH:mm:ss") + " 98=0 108=30 554=" + sha256encrypt("1bird2lake") + " 10=015"); nt.Append("/52=" + DateTime.UtcNow.ToString("yyyyMMdd-HH:mm:ss") + "/98=0/108=30" + "/554=" + sha256encrypt("*****") + "/10=118/"); string Get = nt.ToString(); Byte[] ByteGet = ASCII.GetBytes(Get); GlobalVar.GlobalValueByteGet = ByteGet; Byte[] RecvBytes = new Byte[256]; GlobalVar.GlobalValueByteGetreceive = RecvBytes; String strRetPage = null; Socket s = null; IPEndPoint hostEndPoint; IPAddress hostAddress = null; int conPort = 5679; // Get DNS host information. IPHostEntry hostInfo = Dns.GetHostEntry(server); // Get the DNS IP addresses associated with the host. IPAddress[] IPaddresses = hostInfo.AddressList; hostAddress = IPaddresses[0]; hostEndPoint = new IPEndPoint(hostAddress, conPort); // Creates the Socket to send data over a TCP connection. s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); // Connect to the host using its IPEndPoint. // ManualResetEvent connectDone = new ManualResetEvent(false); s.BeginConnect(hostEndPoint, new AsyncCallback(Connected), s);///async connection request request // connectDone.WaitOne(1000,false); return strRetPage; } public static void Connected(IAsyncResult iar) { Socket sock = (Socket)iar.AsyncState; try { sock.EndConnect(iar); sock.BeginSend(GlobalVar.GlobalValueByteGet, 0, GlobalVar.GlobalValueByteGet.Length, SocketFlags.None, new AsyncCallback(SendData), sock); } catch (SocketException) { Console.WriteLine("Unable to connect to host"); } } static void ReceivedData(IAsyncResult iar) { //I dont get a response from the server here i dont stop here at break point //its eather my code is wring or the fix message is wrong Socket remote = (Socket)iar.AsyncState; int recv = remote.EndReceive(iar); string receivedData = Encoding.ASCII.GetString(GlobalVar.Gl- obalValueByteGetreceive, 0, recv); Console.WriteLine(receivedData); } private static void SendData(IAsyncResult iar) { // ManualResetEvent connectDone = new ManualResetEvent(false); Socket server = (Socket)iar.AsyncState; int sent = server.EndSend(iar); server.BeginReceive(GlobalVar.GlobalValueByteGetreceive, , GlobalVar.GlobalValueByteGetreceive.Length, SocketFlags.None, new AsyncCallback(ReceivedData), server); // connectDone.WaitOne(3000); } public static string sha256encrypt(string phrase) { UTF8Encoding encoder = new UTF8Encoding(); SHA256Managed sha256hasher = new SHA256Managed(); byte[] hashedDataBytes = sha256hasher.ComputeHash(encoder.GetBytes(phrase)); return byteArrayToString(hashedDataBytes); } public static string byteArrayToString(byte[] inputArray) { StringBuilder output = new StringBuilder(""); for (int i = 0; i < inputArray.Length; i++) { output.Append(inputArray[i].ToString("X2")); } return output.ToString(); } } } I am sending this string as my login message 8=FIX.4.4/9=136/35=A/49=****/56=MBT/34=1/52=20091230- 18:41:27//108=30/554=AD8C8A0692F9B051E0A6CA3ED6123F7430C3CBF08E- 3ABF15E54F47D92E93C3C7/10=118/ and don't get any response which means i am not getting into ReceivedData function I am stuck at this point and I wil be glad to get some direction what is the problem (might be my c# code or my fix string)best regards eyal
[ original email was from Zoltan Feledy - zoltan_feledy@ssga.com ]
> do you know where can i test this fix message?
nt.Append(“8=FIX.4.4/9=136/35=A/49=**/56=/34=596”)
It appears that you are delimiting your fields with “/”. This will not work with any FIX engine. Fields should be delimited with the ascii null character, which is the first character in the set. In C# it would be something like:
char delimiter = (char) 0;
To test FIX messages, you can use one of the free FIX engines or applications.
http://www.quickfixj.org/
http://fiximulator.org/
FIXimulator is built using QuickFIX/J and is fairly well documented. It only supports FIX 4.2 at this time though so you would need to change your test message if you’re sending anything to it.
Hope this helps.
Cheers,
Zoltan
Hi Zoltan,
Your analysis is correct, but you have the wrong delimiter value. FIX fields are delimited with an ASCII 1, not 0.
Eyal,
If you would like to use a FIX testing tool, you can also try out FIX Tester at www.jettekfix.com. It may shed some light on errors you face.
Regards,
Greg.
do you know where can i test this fix message?
nt.Append(“8=FIX.4.4/9=136/35=A/49=**/56=/34=596”)
It appears that you are delimiting your fields with “/”. This will not
work with any FIX engine. Fields should be delimited with the ascii null
character, which is the first character in the set. In C# it would be
something like:char delimiter = (char) 0;
To test FIX messages, you can use one of the free FIX engines or
applications.http://www.quickfixj.org/ http://fiximulator.org/
FIXimulator is built using QuickFIX/J and is fairly well documented. It
only supports FIX 4.2 at this time though so you would need to change
your test message if you’re sending anything to it.Hope this helps.
Cheers, Zoltan
[ original email was from Zoltan Feledy - zoltan_feledy@ssga.com ]
The first character in the ASCII set is the null character, the delimiter in FIX messages. The ascii set is numbered 0-127 in decimals. Here is a reference to get the decimal, octal, and hexadecimal values: http://www.asciitable.com/
For the sake of completeness, the character data type in C# actually uses Unicode. Casting the integer 0 to a character data type will return the first Unicode character. The below line of code therefore takes advantage of the fact that the first 128 Unicode characters are the same as the ASCII characters as Unicode is just an extension of the ASCII set.
The code below therefore returns the correct delimiter.
Hi Zoltan,
Your analysis is correct, but you have the wrong delimiter value. FIX
fields are delimited with an ASCII 1, not 0.Eyal,
If you would like to use a FIX testing tool, you can also try out FIX
Tester at www.jettekfix.com. It may shed some light on errors you face.Regards, Greg.
do you know where can i test this fix message?
nt.Append(“8=FIX.4.4/9=136/35=A/49=**/56=/34=596”)
It appears that you are delimiting your fields with “/”. This will not
work with any FIX engine. Fields should be delimited with the ascii
null character, which is the first character in the set. In C# it
would be something like:char delimiter = (char) 0;
To test FIX messages, you can use one of the free FIX engines or
applications.http://www.quickfixj.org/ http://fiximulator.org/
FIXimulator is built using QuickFIX/J and is fairly well documented.
It only supports FIX 4.2 at this time though so you would need to
change your test message if you’re sending anything to it.Hope this helps.
Cheers, Zoltan
[ original email was from Zoltan Feledy - zoltan_feledy@ssga.com ]
Greg,
I am so sorry to have questioned you on this as you are definitely more of an authority having written FIX engines.
You are completely right, the delimiter is the “Start of Header” character, the second character in the ascii set as opposed to the null character as I incorrectly mentioned below.
As such, the code should read:
char delimiter = (char) 1;
As you correctly pointed out.
Deepest apologies.
Cheers,
Zoltan
The first character in the ASCII set is the null character, the
delimiter in FIX messages. The ascii set is numbered 0-127 in decimals.
Here is a reference to get the decimal, octal, and hexadecimal values:
http://www.asciitable.com/For the sake of completeness, the character data type in C# actually
uses Unicode. Casting the integer 0 to a character data type will
return the first Unicode character. The below line of code therefore
takes advantage of the fact that the first 128 Unicode characters are
the same as the ASCII characters as Unicode is just an extension of the
ASCII set.The code below therefore returns the correct delimiter.
Hi Zoltan,
Your analysis is correct, but you have the wrong delimiter value. FIX
fields are delimited with an ASCII 1, not 0.Eyal,
If you would like to use a FIX testing tool, you can also try out
FIX Tester at www.jettekfix.com. It may shed some light on errors
you face.Regards, Greg.
do you know where can i test this fix message?
nt.Append(“8=FIX.4.4/9=136/35=A/49=**/56=/34=596”)
It appears that you are delimiting your fields with “/”. This will
not work with any FIX engine. Fields should be delimited with the
ascii null character, which is the first character in the set. In C#
it would be something like:char delimiter = (char) 0;
To test FIX messages, you can use one of the free FIX engines or
applications.http://www.quickfixj.org/ http://fiximulator.org/
FIXimulator is built using QuickFIX/J and is fairly well documented.
It only supports FIX 4.2 at this time though so you would need to
change your test message if you’re sending anything to it.Hope this helps.
Cheers, Zoltan
Hi greg
I downloaded the FIX Tester from www.jettekfix.com i have extracted two folder from the zip file (bin ,lib) but where is the exe file to install the fix tester tool ?
am i missing something?
Best regards
eyal
Hi Zoltan,
Your analysis is correct, but you have the wrong delimiter value. FIX
fields are delimited with an ASCII 1, not 0.Eyal,
If you would like to use a FIX testing tool, you can also try out FIX
Tester at www.jettekfix.com. It may shed some light on errors you face.Regards, Greg.
do you know where can i test this fix message?
nt.Append(“8=FIX.4.4/9=136/35=A/49=**/56=/34=596”)
It appears that you are delimiting your fields with “/”. This will not
work with any FIX engine. Fields should be delimited with the ascii
null character, which is the first character in the set. In C# it
would be something like:char delimiter = (char) 0;
To test FIX messages, you can use one of the free FIX engines or
applications.http://www.quickfixj.org/ http://fiximulator.org/
FIXimulator is built using QuickFIX/J and is fairly well documented.
It only supports FIX 4.2 at this time though so you would need to
change your test message if you’re sending anything to it.Hope this helps.
Cheers, Zoltan
Hi Eyal,
Please direct these queries to support@jettekfix.com so we don’t take up bandwidth on the FPL forums. I’ll try responding to your email address directly.
Thanks, Greg.
Hi greg I downloaded the FIX Tester from www.jettekfix.com i have
extracted two folder from the zip file (bin ,lib) but where is the exe
file to install the fix tester tool ? am i missing something? Best
regards eyalHi Zoltan,
Your analysis is correct, but you have the wrong delimiter value. FIX
fields are delimited with an ASCII 1, not 0.Eyal,
If you would like to use a FIX testing tool, you can also try out
FIX Tester at www.jettekfix.com. It may shed some light on errors
you face.Regards, Greg.
do you know where can i test this fix message?
nt.Append(“8=FIX.4.4/9=136/35=A/49=**/56=/34=596”)
It appears that you are delimiting your fields with “/”. This will
not work with any FIX engine. Fields should be delimited with the
ascii null character, which is the first character in the set. In C#
it would be something like:char delimiter = (char) 0;
To test FIX messages, you can use one of the free FIX engines or
applications.http://www.quickfixj.org/ http://fiximulator.org/
FIXimulator is built using QuickFIX/J and is fairly well documented.
It only supports FIX 4.2 at this time though so you would need to
change your test message if you’re sending anything to it.Hope this helps.
Cheers, Zoltan