UKLooneyJr / kc-discord-bot

KC Discord Bot
MIT License
3 stars 1 forks source link

fix: don't fetch stock history every time #24

Closed cyosam closed 3 years ago

cyosam commented 3 years ago

By maintaining a HashMap for start date prices, we don't need to waste time re-fetching the history each request. This way, we should only need to query Yahoo once every 6 months, or whenever the bot is restarted. (Also removed the hardcoded MSI reference for the hyperlink, for constistency)