Skip to content

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.

License

Notifications You must be signed in to change notification settings

pawelkn/gpw-tweets

Repository files navigation

GPW Tweets

Test

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 https://developer.twitter.com/ 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):

{
    "appKey": "<Customer Key>",
    "appSecret": "<Customer Secret>",
    "accessToken": "<OAuth Access Token>",
    "accessSecret": "<OAuth Token Secret>"
}

Location of the file can be configured by using environment variables

Example:

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):

export GPW_TWEETS_MIN_TURNOVER=100_000
export GPW_TWEETS_MIN_PRICE=2.0

Run

Note: Before run, create a valid configuration file: twitter-credentials.json

Install dependencies and build application

npm install
npm run build

Application start

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 file: twitter-credentials.json

To avoid node version conflict and/or dependencies installation issues, run application in docker container

docker-compose up --build

Unit tests

Run tests locally

npm run test

or using docker

docker build -t gpw-tweets-test --target test .
docker run --rm gpw-tweets-test

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published