Caplin Libraries and CT3

This page describes the libraries used by Caplin Trader, and explains how they use the Renderer Framework to display live data, and how they integrate with Caplin Platform. You can find out about the services the libraries support, in Caplin Trader Services.

BladeRunner Libraries

Many of the features, services and infrastructure described in the other CT3 tutorials, are supplied by the Caplin JavaScript Libraries. Full API documentation is supplied for all libraries. The following base libraries, are supplied with BladeRunner.

  • Component: Defines the Caplin display component interface.

  • Core: A number of low level utilities and interfaces.

  • Dom: A number of useful widgets and utilities for working with the browser Document Object Model.

  • I18n: Implements the internationalisation and localisation features.

  • Presenter: An MVC framework used as a layout manager, and for implementing GUI components.

  • Services: Defines common shared resources used throughout the libraries.

  • Testing: Contains test infrastructure and common fixtures and stubs.

  • Workbench: Tools that can be used in your blade workbenches.

Additional Caplin Trader Libraries

These additional libraries are only available with Caplin Trader. Generally, they add the features required for building low-latency trading apps.

  • Chart: Financial charting, integrated with streaming data.

  • FX: Supports Foreign Exchange trading.

  • Grid: Provides high-performance displays of streamed data in windowed grids.

  • Security: Supplies authorisation data from a streamed connection.

  • Trading: General (state-driven) trading functionality for all asset classes.

  • StreamLink: Caplin’s implementation of a streamed publish/subscribe service.

  • Webcentric: A flexible GUI-based layout manager.

The Renderer framework is tailored for the display and update of constantly changing, streamed data. The renderer libraries are used by the grid library to format and display data. Renderers can be defined in XML and a single formatting style used throughout your application. Renderers can also be used by Presenter.

  • Stream: Handles streaming data from the server.

  • Control: Used to render data to screen.

  • Element: Provides a flexible means of incorporating controls.

Caplin Libraries Integration with Caplin Platform

The Caplin Trader domain libraries have default services implementations that integrate directly with the Caplin Platform. The resulting architecture is illustrated in the diagram below.

Caplin Trader Service Diagram - Thumbnail

The app code (labelled "Custom Display Components") integrates with the domain libraries through their API. In some cases (such as the Permissions Library), the API is a service interface.

If we take the example of the Trade Library interface, the Trade API works via a set of domain objects. The domain logic is encapsulated within the library and includes such features as an XML state-machine to manage financial trades. The Trade Model sends trade messages to a server, through the TradeMessageService. When using the Caplin Platform, the TradeSubscriber implements the TradeMessageService, and communicates with Caplin Liberator. Any trade messages are forwarded to a trading system via the "Trade Integration API". If you want to use the Trading Library without Caplin Platform, then you will need to create your own trade subscriber.