Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pawelkn/gpw-tweets
GPW Tweets is a scanner of GPW (Warsaw Stock Exchange) securities. Every day checks each company quotations, searching for candlestick pattern matches. Scan results are published on X.
https://github.com/pawelkn/gpw-tweets
gpw stock tweets twitter
Last synced: 23 days ago
JSON representation
GPW Tweets is a scanner of GPW (Warsaw Stock Exchange) securities. Every day checks each company quotations, searching for candlestick pattern matches. Scan results are published on X.
- Host: GitHub
- URL: https://github.com/pawelkn/gpw-tweets
- Owner: pawelkn
- License: mit
- Created: 2022-06-02T09:12:08.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-04T10:39:13.000Z (8 months ago)
- Last Synced: 2024-05-04T11:32:52.184Z (8 months ago)
- Topics: gpw, stock, tweets, twitter
- Language: TypeScript
- Homepage:
- Size: 354 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# GPW Tweets
[![Test](https://github.com/pawelkn/gpw-tweets/actions/workflows/test.yml/badge.svg)](https://github.com/pawelkn/gpw-tweets/actions/workflows/test.yml)
GPW Tweets scans securities listed on the Warsaw Stock Exchange (GPW) on a daily and weekly basis, in search of matching candlestick patterns. The scan results are then posted on X for public access.
## Configuration
X account configuration. To publish a tweet, you must create a X developer account on and obtain a *Customer Key and Secret*. Then create a X application and obtain an *OAuth Access Token and Secret*.
Finally create a configuration file *twitter-credentials.json* and enter your sender account settings.
Example (**twitter-credentials.json**):
```json
{
"appKey": "",
"appSecret": "",
"accessToken": "",
"accessSecret": ""
}
```Location of the file can be configured by using environment variables
Example:
```sh
export GPW_TWEETS_TWITTER_CREDENTIALS_FILE=/run/secrets/twitter-credentials
```Minimum price and minimum daily turnover of scanned securities can be adjusted by using environment variables
Example (and default values):
```sh
export GPW_TWEETS_MIN_TURNOVER=100_000
export GPW_TWEETS_MIN_PRICE=2.0
```## Run
> ***Note:*** Before run, create a valid [configuration](#Configuration) file: *twitter-credentials.json*
Install dependencies and build application
```sh
npm install
npm run build
```Application start
```sh
npm start
```Optional command line options:
* *--weekly* - use a week interval
* *--dry-run* - do not post anything on X, just dummy application run
* *--no-date-check* - do not verify securities last quotation date## Docker
> ***Note:*** Before run, create a valid [configuration](#Configuration) file: *twitter-credentials.json*
To avoid node version conflict and/or dependencies installation issues, run application in docker container
```sh
docker-compose up --build
```## Unit tests
Run tests locally
```sh
npm run test
```or using docker
```sh
docker build -t gpw-tweets-test --target test .
docker run --rm gpw-tweets-test
```