Extract Revolut stocks list from the list screenshot(s) (example screenshot - use your mobile app for this).
I made this app since there is no official list of all available Revolut stocks.
Here you can find already extracted list of all available stocks. I will update it from time to time.
- Go
- Docker with compose
- Tesseract OCR
- Make
- Docker >= 19.03 with compose >= 1.25
- Make >= 4.1 (optional)
Note: use appropriate commands (found in Makefiles) without Make
- Clone the repository and navigate to the project root
- Copy
.env.dist
file to.env
and fill missing parameters
Note: HOST_UID is your system user ID
- Build docker image
make build
- Start container
make up
(development purposes only) - Run the script by executing appropriate command inside the container (see below)
- Compile the app by executing
make -f Makefile.native build
inside the container
docker exec {CONTAINER_NAME} go run . extract
or
docker-compose -p {PROJECT_NAME} exec app go run . extract
Binary not supported yet - use Docker environment.
Scroll down. The list is as the bottom of this page.
First of all - check example screenshot. Your screenshot(s) must follow the pattern!
The screenshot should be at least 720px wide in order to preserve OCR accuracy (>99,9%)!
OCR is still not the most accurate solution (about 2-3% misidentified tickers for screenshots smaller than 720px wide). In order to improve it take smaller screenshots (which means better quality per screenshot). For images which are at least 720px wide the accuracy is ~99,9%.
You can specify multiple input files by adding more parameters. By default it's processing 1 file (filepath ./input.jpg
) which can be very long (complete stock list in 1 screenshot (possible on some mobiles)). See example below.
... extract --input ./this/is/input/file_1.jpg --input ./this/is/input/file_2.jpg --input ./this/is/input/file_3.jpg
Script generates 1 output file (including all input files in it). By default it's ./output.csv
- you can change the filepath. See example below.
... extract --output ./this/is/output/file.csv
By default only English is being installed and used by the Tesseract library. In order to use also other languages like Polish or Russian you can add an optional parameters. You need to install appropriate language library (Tesseract) first (eg. tesseract-ocr-data-pol). See example below.
... extract --lang eng --lang pol --lang rus
By default whitelist includes only A-Z characters (upper-case) for tickers and whole alphabet for companies names. It's the best setup but you can change it if you want to experiment a bit. See example below.
... extract --whitelist-tickers abcDEF123 --whitelist-names qwertyQWERTY
As the result you will get a file with all recognized tickers and companies names.
Here you can find already extracted list of all available stocks. I will update it from time to time.