Skip to content
This repository has been archived by the owner on May 6, 2023. It is now read-only.

Chemaclass/stock-ticker

Repository files navigation

Stock Ticker

Build Status Scrutinizer Code Quality Code Coverage MIT Software License Minimum PHP Version

This is an API to get a notification (via email and/or slack) with the latest news related to the Stock Symbol that you are interested in based on a personal lookup that you can define yourself.

Set up the project

Define your env variables

cp .env.dist .env

Install dependencies

composer install
# Or using docker
docker-compose up -d
docker-compose exec stock_ticker composer install

Execute the commands

php bin/console crawl DIS TSLA
# Or using docker
docker exec -ti -u dev stock_ticker php bin/console crawl DIS TSLA

Commands

  • Crawl: It crawls multiple websites and group their info per stock.

    • php bin/console crawl DIS TSLA --maxNews=8
    • Options
      • maxNews: Max number of news to fetch per crawled site
  • Notify: It crawls and notifies via different channels.

    • php bin/console notify DIS TSLA --maxNews=5 --channels=email,slack --sleepingTime=10
    • Options
      • maxNews: Max number of news to fetch per crawled site
      • maxRepetitions: Max number repetitions for the loop
      • channels: Channels to notify separated by a comma. For example email and slack
      • sleepingTime: Sleeping time in seconds