From 18478d9b3a5462a7c4320d4ff134585f70119e64 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Mon, 7 Aug 2023 09:17:30 -0700 Subject: Initial commit. --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..0bbac08 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +# Market Watch + +A console-based application to watch stock prices and currency exchange rates. + +## Setup + +``` +pip install -r requirements.txt +``` + +### API Endpoints + +The application queries the following APIs. You need to register an account on +Rapid API and subscribe to them. The application is written to try to stay under +the request limit of the free tiers, although that will also depend on how many +stocks and currencies you decide to query. For a small set, the free tier of the +APIs should be sufficient. Otherwise, consider subscribing to the paid tiers. + +- Stock: https://rapidapi.com/amansharma2910/api/realstonks +- Currency: https://rapidapi.com/juhestudio-juhestudio-default/api/exchange-rate-api1 + +Once you have created an account and subscribed, define the environment variable +`RAPIDAPI_KEY` with your API key prior to running the application. The +application queries this variable to determine your API key. + +### Stocks and Currency + +The application state is persisted in the file `state.txt`. To define which +stocks to query, add/remove the necessary lines to this file. + +The syntax of a stock line is: + +``` +sticker price change change% +``` + +The syntax of a currency exchange is: + +``` +from/to rate +``` + +For stocks, you can leave all fields but the sticker to 0. For exchange rates, +you can leave the rate to 0. + +See examples in the provided state file. -- cgit v1.2.3