# 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](ct3-services-in-caplin-trader-3.md).

## 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_](renderer/index.md) 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_](presenter/index.md).

* _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_](../../caplin-platform/platform-architecture/index.md). The resulting architecture is illustrated in the diagram below.

![ct3_ov_diagram_services-all](../../images/ct3_ov_diagram_services-all.png)

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_](trading-api/index.md) 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.
