FIX API access to client accounts via access token?

Created at 28 Mar 2019, 10:27
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!
CT

ctid320188

Joined 19.04.2017

FIX API access to client accounts via access token?
28 Mar 2019, 10:27


Hi,

I'm brand new to FIX API and wonder if I could ask some advice. I've created a working solution for mirroring my trades to my clients using Connect API and accessing their accounts to place/close trades using their access tokens. All good.

Is this possible via FIX API too? or do you need the password to their accounts to connect using FIX?

Reason for looking into FIX over my current Connect API solution is I now have clients that want to use a MT4 broker rather than a cTrader broker and I "believe" FIX can go to either broker where Connect is only cTrader? Please correct me if this is an incorrect assumption....

I have tried using the FIX API example from github.com/spotware/FIX-API-Sample but it just errors when I try anything. I got it to logon but that was about all it would do. Maybe it's an old version?

Hope some people can advise as I'm brand new to FIX and need some guidance.

Thank you.

Ro


@ctid320188
Replies

PanagiotisCharalampous
28 Mar 2019, 11:31

Hi Rowie,

1) You cannot use tokens with FIX API. You need the trading account passwords.

2) Can you tell us what problems do you have with FIX API Sample? Should be working out of the box.

Best Regards,

Panagiotis


@PanagiotisCharalampous

ctid320188
28 Mar 2019, 11:48

RE:

Panagiotis Charalampous said:

Hi Rowie,

1) You cannot use tokens with FIX API. You need the trading account passwords.

2) Can you tell us what problems do you have with FIX API Sample? Should be working out of the box.

Best Regards,

Panagiotis

 

Thank you for clarifying that for me. That will be a show stopper for me then.

The sample: I run it and fill in all the credentials. I click Price Stream logon and then click on the Spot Market Data Request button and it throws the following error:

"Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host"

I get this for any of the buttons after I click on the logon button


@ctid320188

PanagiotisCharalampous
28 Mar 2019, 11:59

Hi Rowie,

Do you receive a response after a price stream logon? Can you send the messages you send and receive? 

Best Regards,

Panagiotis


@PanagiotisCharalampous

ctid320188
28 Mar 2019, 12:22

RE:

Panagiotis Charalampous said:

Hi Rowie,

Do you receive a response after a price stream logon? Can you send the messages you send and receive? 

Best Regards,

Panagiotis

 

I just get a byte array of 1024 zeros - so nothing helpful


@ctid320188

PanagiotisCharalampous
28 Mar 2019, 12:25

Hi Rowie,

So probably your login is not successful. A successful logon response is the below

8=FIX.4.4|9=106|35=A|34=1|49=CSERVER|50=TRADE|52=20170117- 08:03:04.509|56=theBroker.12345|57=any_string|98=0|108=30|141=Y|10=066| 

You can find more information about what responses you should expect here.

Best Regards,

Panagiotis


@PanagiotisCharalampous