pmarket-cli
Version:
CLI tool to trade on Polymarket
16 lines • 670 B
JavaScript
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