Which api is the right one to use for copy trading

Created at 13 Feb 2023, 11:26
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

ctid4797769

Joined 16.06.2022

Which api is the right one to use for copy trading
13 Feb 2023, 11:26


Hi, we are a software company that will develop an application where we can copy all trades from a single Ctrader account to thousands of different accounts at IC and Pepperstone. Quick execution is super important so that trades are as good as 1:1. We are looking at "OPEN API" but are afraid that it is too slow and not really suitable for the task, alternatively "FIX API". What would your recommendation be and how quickly would we be able to execute a copy in your system? Is there an alternative and is there sample code?

Thanks in advance

Regards, Dennis


@ctid4797769
Replies

ctid1980098
13 Feb 2023, 12:43

RE:

Hi Dennis, 

I have never used "Open API" and can only speak to "FIX API". 

I currently have connections to 16 broker accounts via FIX api and the execution is pretty much seamless across all. I am able to buy and sell across all brokers pretty much at the same time. I have never experienced an issue where I have vastly different execution times across brokers, provided you have a vps.... to reduce latency. 

FIX took me a while to code up and get into the hang of things, but once up and running the system works flawlessly. My client was happy to copy trades across multiple platforms with FIX platform we designed. 

 

 


@ctid1980098

PanagiotisChar
13 Feb 2023, 15:11

Hi Dennis,

How did you conclude that Open API is slow?

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 


@PanagiotisChar

ctid5696420
23 Feb 2023, 12:59

RE: RE:

ctid1980098 said:

Hi Dennis, 

I have never used "Open API" and can only speak to "FIX API". 

I currently have connections to 16 broker accounts via FIX api and the execution is pretty much seamless across all. I am able to buy and sell across all brokers pretty much at the same time. I have never experienced an issue where I have vastly different execution times across brokers, provided you have a vps.... to reduce latency. 

FIX took me a while to code up and get into the hang of things, but once up and running the system works flawlessly. My client was happy to copy trades across multiple platforms with FIX platform we designed. 

 

Hi lahsihv,

Hope you are dong good.

I have some questions regarding the fix API ,It would be great if you please help me n this regards . Thanks in advance.

1. Can we copy Trade from one account to multiple accounts using Fix API ?
2. Can we make account linking ? if yes then is limit on account linking ?
3. we have to give minimum 1000 milliseconds delay while switching accounts for copy trading else trade is not being copied ,is there any why out of this ?

below is example code for last question.

 foreach (var listacc in result)
            {                
                    listacc._tradeInitiator.Start();                  
                   Thread.Sleep(milliseconds);
                    listacc._tradeApp.SendMessage(message);
                    listacc._tradeApp.Dispose();
                    listacc._tradeInitiator.Stop();               
             }

 


@ctid5696420

ctid1980098
24 Feb 2023, 16:16

RE: RE: RE:

ctid5696420 said:

ctid1980098 said:

Hi Dennis, 

I have never used "Open API" and can only speak to "FIX API". 

I currently have connections to 16 broker accounts via FIX api and the execution is pretty much seamless across all. I am able to buy and sell across all brokers pretty much at the same time. I have never experienced an issue where I have vastly different execution times across brokers, provided you have a vps.... to reduce latency. 

FIX took me a while to code up and get into the hang of things, but once up and running the system works flawlessly. My client was happy to copy trades across multiple platforms with FIX platform we designed. 

 

Hi lahsihv,

Hope you are dong good.

I have some questions regarding the fix API ,It would be great if you please help me n this regards . Thanks in advance.

1. Can we copy Trade from one account to multiple accounts using Fix API ?
2. Can we make account linking ? if yes then is limit on account linking ?
3. we have to give minimum 1000 milliseconds delay while switching accounts for copy trading else trade is not being copied ,is there any why out of this ?

below is example code for last question.

 foreach (var listacc in result)
            {                
                    listacc._tradeInitiator.Start();                  
                   Thread.Sleep(milliseconds);
                    listacc._tradeApp.SendMessage(message);
                    listacc._tradeApp.Dispose();
                    listacc._tradeInitiator.Stop();               
             }

 

Hi Dennis,

Sure I will try to explain on what you have asked. 

1. I'm not sure exactly what you mean by copy trade. But with FIX api we were able to code a platform to connect to 16 brokers for our client. So the client can control buying and selling along with stop losses across all these brokers. Our client can select to buy x amount of lots and press the buy button and it will almost at the same time (give a take a few milliseconds) buy those x lots across all the brokers and subsequently manage those positions with stop losses etc. But all this logic must be programmed into the fix app. 

2. Not sure what you mean by account linking. But I can connect as many accounts as we need. Currently my client has 16 broker accounts connected for their trading. 

3. there is no account switching for the accounts in FIX api. We can send FIX messages to all brokers connected without any switching. 

I am not familiar with the code you posted. I have only worked with FIX api. Also FIX API does not give any data recording account properties. its only intended for trading. 

It is designed to be low latency and communicate directly with the server and manage multiple broker connections. Hope this helps


@ctid1980098

heinrich.munz
08 Mar 2023, 11:59

RE: RE:

ctid1980098 said:

Hi Dennis, 

I have never used "Open API" and can only speak to "FIX API". 

I currently have connections to 16 broker accounts via FIX api and the execution is pretty much seamless across all. I am able to buy and sell across all brokers pretty much at the same time. I have never experienced an issue where I have vastly different execution times across brokers, provided you have a vps.... to reduce latency. 

FIX took me a while to code up and get into the hang of things, but once up and running the system works flawlessly. My client was happy to copy trades across multiple platforms with FIX platform we designed. 

 

 

Can you give us the names of these 16 Brokers. 
I'm curios who they are, supporting FIX

 

Thx

 


@heinrich.munz

ctid1980098
08 Mar 2023, 12:46

RE: RE: RE:

heinrich.munz said:

ctid1980098 said:

Hi Dennis, 

I have never used "Open API" and can only speak to "FIX API". 

I currently have connections to 16 broker accounts via FIX api and the execution is pretty much seamless across all. I am able to buy and sell across all brokers pretty much at the same time. I have never experienced an issue where I have vastly different execution times across brokers, provided you have a vps.... to reduce latency. 

FIX took me a while to code up and get into the hang of things, but once up and running the system works flawlessly. My client was happy to copy trades across multiple platforms with FIX platform we designed. 

 

 

Can you give us the names of these 16 Brokers. 
I'm curios who they are, supporting FIX

 

Thx

 

Hi heinrich.munz

Notice i said 16 broker accounts and not 16 brokers. 

Here is a link to cTrader featured brokers. In total i think its 8 icmarket accounts, 5 pepperstone account, 2 skilling accounts and 1 trade view markets account giving a total of 16 accounts. They all support fix. 

 

 


@ctid1980098

adrian.buzatu
03 Jun 2023, 11:49

RE: RE: RE: RE:

> I have never used "Open API" and can only speak to "FIX API". 

> I currently have connections to 16 broker accounts via FIX api and the execution is pretty much seamless across all. I am able to buy and sell across all brokers pretty much at the same time. I have never experienced an issue where I have vastly different execution times across brokers, provided you have a vps.... to reduce latency. 

> FIX took me a while to code up and get into the hang of things, but once up and running the system works flawlessly. My client was happy to copy trades across multiple platforms with FIX platform we designed. 

Hi, Thank you for the answer, that is very helpful to show this is possible with FIX, as it is designed to be low level and thus flexibile.

Did you code the FIX code from scratch, or on the top of the FIX API provided by cTrader?

Do you use C# or Python with https://github.com/spotware/cTraderFixPy ? I tried the latter and I can place trades, but I struggle with seeing the list of positions so that I can close them back; I also struggle with TP and SL in FixAPI, I know about the 721 to the main position. I wonder if you would able to help me get started with a hello world?

Do you keep all 16 connnections opened all the time and send heartbeats to them? Or you open and close them after every time the client presses a button in their platform? 

Thank you!


@adrian.buzatu

ctid1980098
04 Jun 2023, 14:31

RE: RE: RE: RE: RE:

adrian.buzatu said:

> I have never used "Open API" and can only speak to "FIX API". 

> I currently have connections to 16 broker accounts via FIX api and the execution is pretty much seamless across all. I am able to buy and sell across all brokers pretty much at the same time. I have never experienced an issue where I have vastly different execution times across brokers, provided you have a vps.... to reduce latency. 

> FIX took me a while to code up and get into the hang of things, but once up and running the system works flawlessly. My client was happy to copy trades across multiple platforms with FIX platform we designed. 

Hi, Thank you for the answer, that is very helpful to show this is possible with FIX, as it is designed to be low level and thus flexibile.

Did you code the FIX code from scratch, or on the top of the FIX API provided by cTrader?

Do you use C# or Python with https://github.com/spotware/cTraderFixPy ? I tried the latter and I can place trades, but I struggle with seeing the list of positions so that I can close them back; I also struggle with TP and SL in FixAPI, I know about the 721 to the main position. I wonder if you would able to help me get started with a hello world?

Do you keep all 16 connnections opened all the time and send heartbeats to them? Or you open and close them after every time the client presses a button in their platform? 

Thank you!

Hi,

You can email me here for the questions you have on fix. hvfixapi@gmail.com and will try to assist. thanks


@ctid1980098