FIX API with C++ and Boost

Created at 08 May 2021, 19:02
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!
SW

swapd0

Joined 07.10.2019

FIX API with C++ and Boost
08 May 2021, 19:02


Hello, I'm trying to use the FIX API with C++, but I can't even connect to the server, If I change the IP address to google(142.250.201.78) and port 80 it works.

I've no idea what is wrong as the code is very simple.

 

boost::asio::io_service ios;

boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::address::from_string("85.234.140.193"), 5201);   // IP for h30.p.ctrader.com

boost::asio::ip::tcp::socket socket(ios);

socket.connect(endpoint);   // this throw an exception: Operation not permited

 

Edited: maybe it doesn't connect because the market is closed?

Edited: No, now the market is open and I can't create a socket to the same IP address that is using cTrader.

 

Fixed: You have to turn on the application network capabilities... 


@swapd0