marketsnapshot.get_market_snapshot()
- Get list of all available coins ( /coins/list)
- add a timestamp for us to track dates
- output as json line delimited data to s3/gcp
- return success or failure
compareyesterday.compare_yesterday_and_today()
This job will check the bucket path associated with the time of execution (UTC)
eg. if execution at midnight UTC on November 11, 2021, the path will look for:
<bucket>/marketlist/2021-11-11-coinlist.json
- today
<bucket>/marketlist/2021-11-10-coinlist.json
- yesterday
TODO:
- Fallback to prior day if path does not exist x3 days
- graceful exit if no comparison date exists
- Loads today's market list snapshop based on execution date
- Loads yesterday's market list snapshop based on execution date
- Compares the 2 sets of data, looking for new coins which were not in Yesterday's list
- Adds today's timestamp into the payload
- Writes the output of entries into a 'watch' list bucket
<bucket>/watchlist/2021-11-11-newcoins.json
- return success or failure
This job will pull the market price and other details like volume etc for a specific coin and for each
run pip install -r requirements.txt --target ./package
to install all required packages listed in the requirements.txt to a local directory. This helps us deploy a zip
here's the env file you should make (.env in your root)
BUCKET = "coin-analysis-data-ar-staging"
SNAPSHOT_PATH = "snapshots"
SNAPSHOT_FILENAME = "snapshot.json"
WATCHLIST_PATH = "watchlist"
WATCHLIST_FILENAME = "watchlist.json"
COINS_PATH = "coins"
COINS_FILENAME = "watchlist.json"
QUERY_LOGIC_VOLUME = 1300000
QUERY_LOGIC_PRICE = 0.003
ATHENA_DATABASE = "coin_analysis"
ATHENA_WATCHLIST_TABLE = "watchlist"
ATHENA_MARKETDETAILS_TABLE = "marketdetails"
DISCORD_BOT_WEBHOOK = "<hook here>