UNPKG

pmarket-cli

Version:
16 lines 670 B
export class RefreshStrategy { polymarketService; cacheService; constructor(polymarketService, cacheService) { this.polymarketService = polymarketService; this.cacheService = cacheService; } async execute() { console.log('Fetching market data from Polymarket...'); const allMarkets = await this.polymarketService.fetchAllMarkets(); this.cacheService.cacheMarkets(allMarkets); const activeCount = allMarkets.filter(m => m.active && !m.closed).length; console.log(`Cache refreshed: ${allMarkets.length} total markets, ${activeCount} active.`); } } //# sourceMappingURL=refresh-strategy.js.map