Help Center Blog Open An Account

Rithmic API C# integration for a trading system developed in java


I switched to OptimusFutures recently and completed integration with R-API Plus .NET/C# API, thought of sharing my experiences that could be useful for others.

MattZ was very helpful in getting access to Rithmic API immediately with accounts on Rithmic Test and Live Trading platforms. I received API documentation and sample code from Rithmic. API itself is very well designed and well documented. Sample code provided with documentation is fully working examples for both market data and placing orders, they can help you get started right away. Other products with similar API access provide synchronous/real-time response for order placement but we have to keep checking over and over when there is action on resting orders like limit and stop orders. But with Rithmic, their callback mechanism calls our code in real-time when there is action on resting orders. We don’t have to fry our cpu for hours trying check the status of resting orders once every 500 milliseconds.

Automated Trading Strategy for Emini S&P

My trading system is developed in java and I don’t have much experience with writing code in C#.
But it was very easy to integrate my java based system with Rithmic API.

I searched around a bit and found this Simple HTTP Server written in C#:

It took me just a few minutes to integrate this simple http server with sample code provided by Rithmic, create a bridge program that can accept order over TCP/IP port. Now my java based trading system can call TCP port and place orders with Rithmic. You can cleanup simple http server code to get rid of http protocol to make every order just one line transaction, instead of following rules of http protocol. It comes with mutli-threading as well. I am planning to open a similar TCP/IP port listener in my java based system so that callback methods from the bridge program will notify me in real-time.

As you can see, you can use this bridge mechanism to integrate your system with Rithmic API very easily, no matter in which language your system is developed.


@FreeToChoose thank you for your contrinution and sharing your experience. We always learn from our customer’s expertise. For example, we are glad to know that Rithmic could integrate with Java as well. We had a lot of requests for that before. As far as we know, Rithmic also has something called R Protocol that can work across a multitude of languages and can integrate with Web-APIs as well.

Are you going to follow the trades on R Trader as well as they are sent to the market?

Thank you,
Matt Z
Optimus Futures