/**
 * QM Symbols Operations - Simple symbol fetching
 */

import type { IServiceContainer } from '@stock-bot/handlers';

export async function searchSymbols(services: IServiceContainer): Promise<any[]> {
  // Get symbols from MongoDB
  const symbols = await services.mongodb.collection('qm_symbols').find({}).limit(50).toArray();

  return symbols;
}

export async function fetchSymbolData(services: IServiceContainer, symbol: string): Promise<any> {
  // Fetch data for a specific symbol
  const symbolData = await services.mongodb.collection('qm_symbols').findOne({ symbol });

  return symbolData;
}
