FIX API configuration

Created at 26 Feb 2018, 01:23
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
OC

ochosama308

Joined 26.02.2018

FIX API configuration
26 Feb 2018, 01:23


Hi Team,

I have recently required a demo account from FXPIG. When choosing the platform I wanted to use, I had to choose between MT4, ctrader and FIX API. 

I chose FIX  API and got an email back with the following FIX credentials :

FIX credentials:

[DEFAULT]
BeginString=FIX.4.4
ConnectionType=initiator
HeartBtInt=30
ReconnectInterval=30
StartTime=00:00:00
EndTime=23:59:59
StartDay=Sun
EndDay=Sat
DataDictionary=FIX44.xml

[SESSION]
SessionQualifier=QUOTES
SenderCompID=101197
TargetCompID=QUOTES
Username=101197
Password=1W4ZleP6
ResetOnLogon=Y
SocketConnectHost=208.68.172.83
SocketConnectPort=7549

[SESSION]
SessionQualifier=TRADES
SenderCompID=101197
TargetCompID=TRADES
Username=101197
Password=1W4ZleP6
SocketConnectHost=208.68.172.83
SocketConnectPort=7550

 

As I am a complete newbie when it comes to FIX API, I was wondering if  anyone could provide some guidance. Am I able to use these credentials with CTRADER ? How do I proceed ?

If someone could help or at least point me to the relevant website where I could learn more, that would be really appreciated

 

Thank you in advance

Ochosama


@ochosama308
Replies

PanagiotisCharalampous
26 Feb 2018, 11:50

Hi Ochosama,

Thanks for posting in our forum. These credentials are not related with cTrader. If you want to use FIX API with cTrader you need to create a cTrader account with your broker. You can read more details about cTrader FIX API here.

Best Regards,

Panagiotis


@PanagiotisCharalampous

ochosama308
26 Feb 2018, 12:23

Hello Panagiotis,

I was in contact with FX PIG and they have informed me that with ctrader, the FIX API functionality is built in, which means there is no need to install anything else, as opposed to a third party FIX engine which I would have to source separately

Could you confirm that this is the case ?

Thanx in advance


@ochosama308

PanagiotisCharalampous
26 Feb 2018, 12:25

Hi Ochosama,

Indeed cTrader provides FIX API for each cTrader account.

Best Regards,

Panagiotis


@PanagiotisCharalampous

ochosama308
26 Feb 2018, 13:23

Panagiotis,

Thanx for the link you've provided , great article you've written there. Nevertheless, I'm still confused. In the article, you give examples of messages surch as this :

       public string LogonMessage(SessionQualifier qualifier, int messageSequenceNumber,
           int heartBeatSeconds, bool resetSeqNum)
       {
           var body = new StringBuilder();
           //Defines a message encryption scheme.Currently, only transportlevel security
           //is supported.Valid value is "0"(zero) = NONE_OTHER (encryption is not used).
           body.Append("98=0|");
           //Heartbeat interval in seconds.
           //Value is set in the 'config.properties' file (client side) as    'SERVER.POLLING.INTERVAL'.
           //30 seconds is default interval value. If HeartBtInt is set to 0, no heart beat  message
           //is required.
           body.Append("108=" + heartBeatSeconds + "|");
           // All sides of FIX session should have
           //sequence numbers reset. Valid value
           //is "Y" = Yes(reset).
           if (resetSeqNum)
               body.Append("141=Y|");
           //The numeric User ID. User is linked to SenderCompID (#49) value (the
           //user’s organization).
           body.Append("553=" + _username + "|");
           //USer Password
           body.Append("554=" + _password + "|");

           var header = ConstructHeader(qualifier, SessionMessageCode(SessionMessageType.Logon),
               messageSequenceNumber, body.ToString());
           var headerAndBody = header + body;
           var trailer = ConstructTrailer(headerAndBody);
           var headerAndMessageAndTrailer = header + body + trailer;
           return headerAndMessageAndTrailer.Replace("|", "\u0001");

 

When using ctrader, what exactly am I supposed to do with this message ? copy and paste it within ctrader ?

Sorry if I'm asking stupid qquestions but I'm a complete newbie here and your knowlege is really appreciated

 

Thanx in advance

 


@ochosama308

PanagiotisCharalampous
26 Feb 2018, 14:04

Hi Ochosama,

No this is not meant to be used in cTrader. FIX API is way to trade with your cTrader account without having to use cTrader. You can use it to develop your own trading software. If you explain us why do you want to use FIX API in the first place then maybe I can guide you with more relevant information.

Best Regards,

Panagiotis


@PanagiotisCharalampous

ochosama308
26 Feb 2018, 14:34

OK Panagiotis,

The main reason I would like to use API FIX is to reduce latency  as much as possible. I have used  many MT4 brokers in the past and I now realise that MT4 is an outdated technology. By contrast, FIX API (via ctrader) eliminates a lot of the steps in the execution process and allows trader to get connected to liquidity providers in a more direct way.

Thanx Panagiotis


@ochosama308

PanagiotisCharalampous
26 Feb 2018, 14:40

Hi Ochosama,

Thanks for clarifying. In order to use FIX then you will need to develop your own application using FIX API.

Best Regards,

Panagiotis


@PanagiotisCharalampous