It has been a little over two years since Blue Trading Systems launched BTS Spark, an ultra low latency spreading and algo system with sub-10 microsecond response times. The premium solution for futures trading has seen significant traction and enables traders to control their server hardware as well as maintain their update schedule. Customers can use the server side Algo Plugin API to develop proprietary algorithms and combine them with the algos provided out of the box with Spark, all while retaining complete control of their Intellectual Property.
To provide further customization BTS Spark’s SDK enables users to create new algorithmic order types ("Algos"). This new functionality is implemented in C++, producing a shared library that is loaded at run time by our Spark Server. Below we discuss how to leverage the Spark Server, how we took speed into consideration while developing this functionality as well as how to implement your new algos.
Speed
The Spark platform offers sub-10 microsecond socket to socket response times for algorithmic trading. With the Spark Server SDK, you can create your order types in high-performance C++ and load them into the Spark server.
Since your order is running inside the Spark Server, there is virtually no overhead allowing your algorithm to take full advantage of the speed Spark offers. Hosting a high-performance language like C++ directly in the Spark server process allows it to respond to the market thousands of times faster than an Algo built using a proprietary drag and drop tool.
Easy to Get Started
If you are not actively developing with C++, it can be time-consuming to set up a complete development environment from scratch. That is why we provide a full development environment out of the box with Docker so you can download and try the Server SDK quickly and easily.
Docker works across Windows, macOS, and Linux, so you don't need to change your development environment to try the Spark API. Docker also ensures that all of the dependencies you need are packaged together in one image, so you know it will work out of the box, no matter the platform.
Implementation
Creating a new Algo begins with implementing a standard C++ class derived from IAlgoOrder. Start from the algo_template example to get going quickly.
The first call your new Algo receives is do_before_launch, which is an opportunity to validate parameters and allocate any long-lived resources needed during execution. Next, it receives either do_launch in the case of a new order or do_launch_attached if the order is attaching to an existing order.
The Algo receives a reference to IAlgoServices, which is how it calls out to the Spark system. It will use IAlgoServices to subscribe to market events, launch and control child orders, and communicate its state to the larger Spark system.
Fully Integrated
When a Spark Server plugin is loaded, it registers its exposed Algos with the Spark Server though the init_spark_plugin callback. This callback allows the Algo to describe the parameters it expects so they can be automatically entered in the Spark Client
Compose your Algo with out of the box Algos in the Spark Algo Studio to create new functionality on the fly.
Conclusion
Leveraging BTS Spark’s server side Algo Plugin API, users can implement custom Algos with the same sub-10 microsecond response times as the built in order types. Leveraging standard C++ loaded directly into the Spark server allows your Algos to respond to the market faster than an Algo built using a proprietary drag and drop tool.
If you are interested in sample code or would like a demo contact This email address is being protected from spambots. You need JavaScript enabled to view it..