kernel

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler implements the curated MCP tool surface. Write-path tools remain fail-closed stubs until their execution adapters are connected; the three read-only market-data tools are wired to public REST endpoints.

func New

func New(config config.Config) *Handler

func NewWithMarketData added in v0.1.2

func NewWithMarketData(config config.Config, client *marketdata.Client) *Handler

NewWithMarketData allows tests to inject a fixture-backed market-data client. Production callers should use New.

func (*Handler) AmendOrder

func (*Handler) ArmLiveTrading added in v0.1.2

func (handler *Handler) ArmLiveTrading(
	ctx context.Context,
	req *mcp.CallToolRequest,
	input mcptools.ArmLiveTradingInput,
) (*mcp.CallToolResult, mcptools.Response, error)

ArmLiveTrading arms or disarms live order placement for this process. Arming requires repeating the exact startup acknowledgement as a deliberate second act; config alone is never authority to trade.

func (*Handler) CancelOrder

func (*Handler) GetCandles added in v0.1.2

func (*Handler) GetLast added in v0.1.2

func (*Handler) GetMarket

func (*Handler) GetOrderbook

func (handler *Handler) GetOrderbook(
	ctx context.Context,
	req *mcp.CallToolRequest,
	input mcptools.GetOrderbookInput,
) (*mcp.CallToolResult, mcptools.Response, error)

func (*Handler) GetPortfolio

func (handler *Handler) GetPortfolio(
	ctx context.Context,
	req *mcp.CallToolRequest,
	input mcptools.GetPortfolioInput,
) (*mcp.CallToolResult, mcptools.Response, error)

func (*Handler) GetTrades added in v0.1.2

func (*Handler) GetWeatherIndex added in v0.1.2

func (handler *Handler) GetWeatherIndex(
	ctx context.Context,
	req *mcp.CallToolRequest,
	input mcptools.GetWeatherIndexInput,
) (*mcp.CallToolResult, mcptools.Response, error)

GetWeatherIndex reads the Kalshi-computed city temperature index. Input validation (window exclusivity) is local-first via the marketdata client.

func (*Handler) PlaceOrder

func (*Handler) SearchMarkets

func (handler *Handler) SearchMarkets(
	ctx context.Context,
	req *mcp.CallToolRequest,
	input mcptools.SearchMarketsInput,
) (*mcp.CallToolResult, mcptools.Response, error)

Directories

Path Synopsis
Package ledger implements the paper-trading simulated book: an in-memory cash balance, position map, fill journal with client_order_id idempotency, and exact fixed-point fee accounting.
Package ledger implements the paper-trading simulated book: an in-memory cash balance, position map, fill journal with client_order_id idempotency, and exact fixed-point fee accounting.
Package live provides a signed, read-only Kalshi account client for live mode.
Package live provides a signed, read-only Kalshi account client for live mode.
Package marketdata provides a read-only HTTP adapter for Kalshi public market-data endpoints.
Package marketdata provides a read-only HTTP adapter for Kalshi public market-data endpoints.

Jump to

Keyboard shortcuts

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