Tasks#
Periodic tasks defined by the shares app. The full schedule,
queue routing, and worker invocation flags are in
Tasks. Most tasks sleep 5s between items when
iterating over the full share list to avoid hammering upstream APIs.
Price history#
Fetches fresh historical data (prices) for the given share. Already existing price records gets updated if price differs (solves splits). If no share was given then fetches data for all shares.
If new data has been found we update caches and regenerate performance chart.
- Parameters:
share (int) – Share PK.
Fetches current market price and caches it under “item-{}-current-price” key for ITEM_CURRENT_PRICE_TIMEOUT. If no share PK instance is given fetches all shares in database. Sleeps 5 seconds between each fetch.
- Parameters:
share (int) – Share PK.
Reference data#
Downloads basic info and saves it to ItemData models.
- Parameters:
share (int) – Share PK.
Fetches financial data for all or the given share. Financial data are: - earnings - revenues - EPS
- Parameters:
share (int) – Share PK.
Dividends#
Downloads dividends and saves it to Dividend models. Sleeps 5 seconds between each fetch.
- Parameters:
share (int) – Share PK.
Ratings#
Fetches analyst ratings and saves it to Asset model. Sleeps 5 seconds between each fetch.
- Parameters:
share (int) – Share PK.
Fetches analyst price ratings and saves it to Asset model. Sleeps 5 seconds between each fetch.
- Parameters:
share (int) – Share PK.