chemaclass / stock-ticker
An API to gather the latest info from your stocks
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 1
Open Issues: 0
Type:project
Requires
- php: >=8.0
- ext-dom: *
- ext-json: *
- ext-mbstring: *
- ext-zip: *
- gacela-project/gacela: ^1.0
- gacela-project/gacela-env-config-reader: ^0.1
- symfony/console: ^5.4
- symfony/css-selector: ^5.4
- symfony/dom-crawler: ^5.4
- symfony/http-client: ^5.4
- symfony/mailer: ^5.4
- twig/twig: ^3.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.13
- phpunit/phpunit: ^9.5
- roave/security-advisories: dev-latest
- symfony/google-mailer: ^5.4
- symfony/var-dumper: ^5.4
- vimeo/psalm: ^4.3
- vlucas/phpdotenv: ^5.2
This package is auto-updated.
Last update: 2023-05-06 18:29:41 UTC
README
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 sitemaxRepetitions
: Max number repetitions for the loopchannels
: Channels to notify separated by a comma. For exampleemail
andslack
sleepingTime
: Sleeping time in seconds