Add Ticker24h support: hourly market snapshots with USD-normalized volume filtering
This commit is contained in:
@@ -4,8 +4,10 @@ import type { MCPClientConnector } from '../harness/mcp-client.js';
|
||||
import type { OHLCService } from '../services/ohlc-service.js';
|
||||
import type { SymbolIndexService } from '../services/symbol-index-service.js';
|
||||
import type { WorkspaceManager } from '../workspace/workspace-manager.js';
|
||||
import type { Ticker24hSnapshot } from '../clients/zmq-relay-client.js';
|
||||
import { createSymbolLookupTool } from './platform/symbol-lookup.tool.js';
|
||||
import { createGetChartDataTool } from './platform/get-chart-data.tool.js';
|
||||
import { createGetTicker24hTool } from './platform/get-ticker24h.tool.js';
|
||||
import { createWebSearchTool } from './platform/web-search.tool.js';
|
||||
import { createFetchPageTool } from './platform/fetch-page.tool.js';
|
||||
import { createArxivSearchTool } from './platform/arxiv-search.tool.js';
|
||||
@@ -34,6 +36,7 @@ export interface PlatformServices {
|
||||
ohlcService?: OHLCService | (() => OHLCService | undefined);
|
||||
symbolIndexService?: SymbolIndexService | (() => SymbolIndexService | undefined);
|
||||
workspaceManager?: WorkspaceManager | (() => WorkspaceManager | undefined);
|
||||
ticker24hGetter?: (exchange: string) => Ticker24hSnapshot | undefined;
|
||||
tavilyApiKey?: string;
|
||||
}
|
||||
|
||||
@@ -185,6 +188,18 @@ export class ToolRegistry {
|
||||
break;
|
||||
}
|
||||
|
||||
case 'GetTicker24h': {
|
||||
if (this.platformServices.ticker24hGetter) {
|
||||
tool = createGetTicker24hTool({
|
||||
getTicker24h: this.platformServices.ticker24hGetter,
|
||||
logger: this.logger,
|
||||
});
|
||||
} else {
|
||||
this.logger.warn('ticker24hGetter not configured — GetTicker24h tool unavailable');
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 'WebSearch': {
|
||||
if (this.platformServices.tavilyApiKey) {
|
||||
tool = createWebSearchTool({ apiKey: this.platformServices.tavilyApiKey, logger: this.logger });
|
||||
|
||||
Reference in New Issue
Block a user