I've got something somewhat usable so I figured I'd share it in case anyone has any feedback before I make the code even shittier grin

Here's the source code.

Here's the DLL.

How to use:

  • Put a ctfix.ini in your Plugins directory. There's a sample configuration here. You should only need to change SocketConnectHost, SenderCompID, Username and Password, all of which you can find in the cTrader platform your broker provides in one of the menus labeled "FIX Credentials".
  • Set up your assets. cTrader's FIX API has numeric codes for all assets rather than names. There's a mapping of symbol -> FIX ID here but unlike other plugins, for the moment at least, you must add an account specific prefix with a dash to your assets. Where you'd write "1" (for EURUSD), you must instead write "broker-1" or "Oanda-1" or "FXCM-1" etc. My code is written to require a dash in all asset names.


What's working:


  • Connecting
  • Logging in
  • Multiple accounts
  • Subscribing to assets
  • Receiving data for assets


What's not working (yet):

  • Trading
  • Good, readable code


What will never work:

  • Account balances
  • Price history


I understand that without trading this is of limited use, I'm more putting it out there for anyone who cares to play with it to research arbitrage or something and so I can point people to code when I need help after breaking something.

I'll also add that this code is tailored specifically to cTrader. If you want it to work with another broker, more likely than not, you'll have to modify the code to do what your broker wants.

Last edited by Veratyr; 05/07/18 15:21.