trading

command
v0.0.0-...-b95923d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

README

Trading Platform

A variant-aware MCP server demonstrating API versioning and lifecycle management. Uses all three variant statuses (stable, experimental, deprecated) and DeprecationInfo to guide clients through API migrations.

Pattern demonstrated: Variant lifecycle, deprecation info, API versioning.

Variants

Variant Status Tools Description
v2-stable Stable place_order, get_quotes, get_portfolio, cancel_order Production API
v3-preview Experimental place_order_v3, stream_quotes, get_portfolio_v3 Next-gen API with streaming
v1-legacy Deprecated trade, quote, balance Legacy API, removal date 2026-06-30
analysis-only Stable get_quotes, get_portfolio, get_historical_data Read-only analytics subset

Deprecation Info

The v1-legacy variant includes DeprecationInfo with a replacement and scheduled removal date, demonstrating how servers communicate migration paths to clients:

{
  "deprecationInfo": {
    "message": "v1 API is deprecated. Migrate to v2-stable for improved order types, multi-symbol quotes, and portfolio tracking.",
    "replacement": "v2-stable",
    "removalDate": "2026-06-30"
  }
}

Run

go run ./examples/server/trading

The server listens on http://localhost:8080.

Documentation

Overview

Example: Trading Platform — API versioning and lifecycle management using MCP server variants. Demonstrates DeprecationInfo, all three variant statuses (stable, experimental, deprecated), and access control patterns (read-only subset).

Capability demonstrated: Variant lifecycle, DeprecationInfo, API migration.

Variants:

  • v2-stable: Production API with order management and portfolio tools
  • v3-preview: Next-gen experimental API with streaming and enhanced orders
  • v1-legacy: Deprecated legacy API scheduled for removal
  • analysis-only: Read-only subset for analytics and monitoring

Run:

go run ./examples/server/trading

Then connect any MCP client to http://localhost:8080.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL