# KeySquare Documentation

> Technical documentation for the KeySquare platform.

## Getting Started

- [Introduction](./docs/intro.md): Introduces the KeySquare fixed-income trading platform, its messaging model, client APIs, access control, monitoring and administration tools.
- [Quick start](./docs/quick-start.md): Walks through installing and starting a single-host KeySquare platform, verifying it and choosing the next client integration guide.

## Platform

- [Architecture](./docs/platform/architecture.md): Explains the sequencer-based platform architecture and the responsibilities of relays, monitoring, access control, workspaces and proxies.
- [Topic Structure](./docs/platform/topic-structure.md): Defines the Type, Source, Group and ID fields used to form the topic structure, route, partition and uniquely identify KeySquare messages.
- [Serialization](./docs/platform/serialization.md): Compares SBE, DTO, flexible, custom and raw serialization options, including their performance and schema trade-offs.
- [Message Structure](./docs/platform/message-structure.md): Describes the KeySquare message structure and the header metadata carried with every published message.
- [Monitoring](./docs/platform/monitoring.md): Explains platform and application telemetry for message rates, latency, processing performance, health metrics and custom monitoring.
- [Message Caching](./docs/platform/message-caching.md): Explains cache modes, voiding and automatic eviction for controlling the latest values retained and replayed to subscribers.
- [Resilience](./docs/platform/resilience.md): Explains high-availability behaviour for platform services, web ingress and applications, including leadership and status reporting.

## Services

- [Static Data Server](./docs/services/static-data-server.md): Explains Static Data Server installation, entitlements, dependencies, data feeds, UI, topic structure and reference-data workflows.
- [Instruments](./docs/services/static-data-server/instruments.md): Documents instrument identifiers, providers, lifecycle, validation, profiles and RPC workflows for search, aliases and benchmarks.
- [Instrument Profiles](./docs/services/static-data-server/instrument-profiles.md): Explains instrument profile fields, defaults, Bloomberg yellow keys and how profiles are created, edited and assigned.
- [Business Dates](./docs/services/static-data-server/business-dates.md): Explains per-currency business dates, manual overrides and integration with holiday calendars.
- [Holiday Calendars](./docs/services/static-data-server/holiday-calendars.md): Documents weekend rules, holiday dates, combined calendars, fallback behaviour and calendar-management workflows.
- [Indices & Fixings](./docs/services/static-data-server/indices-and-fixings.md): Explains reference-index definitions, historical fixings, loading windows and their relationship to floating-rate instruments.
- [Configuration Reference](./docs/services/static-data-server/configuration.md): Reference for Static Data Server source, timeout, matured-bond, edit-restriction and fixing-window settings.
- [Static Data Provider](./docs/services/static-data-server/data-provider.md): Shows how to implement, configure permissions for and operate a Java static-data provider for instruments, calendars, indices and fixings.
- [Analytics Engine](./docs/services/analytics-engine.md): Explains Analytics Engine installation, entitlements, supported bonds and valuations, RPC functions, integration, troubleshooting and UI.
- [Bond Calculator](./docs/services/analytics-engine/bond-calculator.md): Walks through the Key UI Bond Calculator inputs, valuation results, cash flows, diagnostics and direct RPC testing.
- [Configuration Reference](./docs/services/analytics-engine/configuration.md): Reference for Analytics Engine currency, instrument-group and dependent-service topic-source settings.
- [Price Engine](./docs/services/price-engine.md): Explains Price Engine installation, entitlements, dependencies, pricing workflow, controls, UI, RPC functions and troubleshooting.
- [Price Controls](./docs/services/price-engine/price-controls.md): Defines price-control fields, supported pricing models, driver sides, recalculation triggers and resolved-control assembly.
- [Price Profiles](./docs/services/price-engine/profile-controls.md): Explains shared PriceProfile fields, profile assignment, resolved-control inheritance and defaults for new instruments.
- [Prices View](./docs/services/price-engine/prices-view.md): Reference for the Key UI Prices grid, editable controls, output columns, bump actions and context-menu operations.
- [Price Profiles View](./docs/services/price-engine/price-profiles-view.md): Explains creating and assigning profiles and configuring new-instrument defaults in the Key UI Price Profiles view.
- [Configuration Reference](./docs/services/price-engine/configuration.md): Reference for Price Engine price sources, instrument groups and analytics, static-data and curve service sources.
- [Price Data Provider](./docs/services/price-engine/data-provider.md): Shows how to implement, configure permissions for and register a Java price provider, including yields, invalid prices and benchmarks.
- [Quote Engine](./docs/services/quote-engine.md): Explains Quote Engine installation, entitlements, dependencies, quote workflow, controls, profiles, UI and troubleshooting.
- [Quote Controls](./docs/services/quote-engine/quote-controls.md): Defines quote-control fields, defaults, resolved controls, enabled and firm flags, size models and reference-tier synchronisation.
- [Quote Profiles](./docs/services/quote-engine/quote-profiles.md): Explains QuoteProfile fields, spread and size multipliers, master profiles, automatic creation, defaults and instrument assignment.
- [Configuration Reference](./docs/services/quote-engine/configuration.md): Reference for Quote Engine tiers, instrument groups, price and position sources and market instrument identifiers.

## Guides

- [Deployment Guide](./docs/guides/deployment.md): Covers installing, configuring, verifying, updating and rolling back KeySquare, plus default routes and supported client entry points.
- [Application Management (KeyAccess)](./docs/guides/key-access.md): Explains registering applications, organising users and groups, assigning publish and subscribe permissions, API keys and UI roles.
- [Authentication](./docs/guides/authentication.md): Explains Key UI administrator and LDAP authentication setup and how authenticated users are provisioned.
- [Data Viewer (Key UI)](./docs/guides/data-viewer.md): Introduces the Key UI Data Viewer and its tools for exploring schemas, live messages and platform data.
- [Workspaces (Key UI)](./docs/guides/workspace.md): Introduces Key UI workspaces for arranging and saving operational views of KeySquare data.
- [Configurations](./docs/guides/configurations.md): Reference for shared and service-specific settings across Java clients, platform processes, WebDataServer and Key UI.
- [Platform Best Practices](./docs/guides/best-practices.md): Provides performance guidance for critical threads, platform processes, core pinning, idle strategies and system tuning.

## Java

- [Setup](./docs/java/overview/setup.md): Lists the Java version, Maven dependency, JVM arguments and KeyAccess prerequisites required by a KeySquare client application.
- [First Java App](./docs/java/overview/first-java-app.md): Builds a minimal Java application that connects to KeySquare, subscribes to a topic and publishes a message.
- [Session](./docs/java/overview/session.md): Explains KeySession creation, registration, transport, lifecycle, reconnect recovery, performance tuning and advanced configuration.
- [Topics](./docs/java/overview/topics.md): Shows how Java clients create exact and wildcard topics for routing publications and subscriptions.
- [Subscription](./docs/java/overview/subscription.md): Covers Java subscriptions for SBE, DTO, flexible, custom and raw messages, including lifetime, unsubscribe and void handling.
- [Publication](./docs/java/overview/publication.md): Covers publishing SBE, DTO, flexible, custom and raw messages and interpreting publication results.
- [Editing](./docs/java/overview/editing.md): Explains requesting, processing, rejecting and categorising experimental KeySquare edit operations.
- [Topic Sets](./docs/java/overview/topic-sets.md): Explains creating, updating and subscribing to reusable topic sets through the experimental Java API.
- [Monitoring](./docs/java/overview/monitoring.md): Shows how Java applications publish readiness, custom status, counters and histograms and use API-driven monitoring.
- [Threading Model](./docs/java/overview/threading-model.md): Explains the KeySession thread, post-processing, idle strategies, core pinning and when application work can run inline.
- [Resiliency](./docs/java/overview/resiliency.md): Explains application groups, leadership state and leadership-change handling through the Java resiliency API.
- [SBE and DTOs](./docs/java/overview/sbe-and-dtos.md): Shows how to configure Maven generation from SBE schemas and use the generated encoders, decoders and DTO classes.
- [Custom Codecs](./docs/java/overview/custom-codec.md): Explains registering custom Java codecs so applications can publish typed objects using application-defined binary formats.
- [Best Practices](./docs/java/overview/best-practices.md): Provides Java client garbage-collection guidance and measured latency effects for low-latency applications.
- [Code Examples](./docs/java/overview/code-examples.md): Catalogues the Java sample projects for messaging, serialization, pricing, monitoring, editing, topic sets and resiliency.
- [Eclipse Setup](./docs/java/overview/eclipse-setup.md): Configures automatic SBE and DTO code generation for KeySquare Java projects in Eclipse.
- [IntelliJ Setup](./docs/java/overview/intellij-setup.md): Configures automatic schema code generation in IntelliJ and resolves Maven refresh and generated-source issues.

### Generated Java API reference (website only)

- [Java API Reference](./java/api/index.html): Generated KeySquare Java API documentation.
- [All Java Classes and Interfaces](./java/api/allclasses-index.html): Alphabetical list of generated Java classes and interfaces.
- [All Java Packages](./java/api/allpackages-index.html): List of packages in the generated Java API documentation.
- [Java API Index](./java/api/index-all.html): Complete generated Java API symbol index.

## Python

- [Python Getting Started](./docs/python/getting-started.md): Walks through installing the Python client, connecting a KeySession and snapshotting, subscribing to and publishing data.
- [Header](./docs/python/reference/header.md): Reference for the Python Header type, including its fields and usage when addressing KeySquare messages.
- [KeyHeader](./docs/python/reference/key_header.md): Reference for KeyHeader metadata, attributes and usage when reading or constructing Python messages.
- [KeyHeaderFlags](./docs/python/reference/key_header_flags.md): Reference for KeyHeaderFlags values and how Python clients inspect message-header state.
- [KeyMessage](./docs/python/reference/key_message.md): Reference for the Python KeyMessage, its attributes and basic usage.
- [KeySession](./docs/python/reference/key_session.md): API reference for Python KeySession connection management, status and data operations including snapshots, subscriptions and publication.
- [KeySessionState](./docs/python/reference/key_session_data.md): Defines Python KeySessionState connection states, transitions and status-checking patterns.

## Excel Addin

- [Excel Getting Started](./docs/excel-addin/getting-started.md): Walks through installing and connecting the Excel Add-in and using functions for status, discovery, snapshots, subscriptions and publication.
