Skip to main content

Script to monitoring price.

Project description

Price Alert

Description

The purpose of the algorithm is to monitor the price of an asset and when it goes >= or <= to the prices we set, a pop up appears on the screen.

The script works as follows.

  1. We get the asset price from the "STOCK" market (Microsoft = MSFT, Tesla=TSLA, Ambev=ABEV) using the yFinance library.
  2. We monitor the target until the price we set. We have to enter a price above the current price and a price below the current price.

Installation

Use the package manager pip to install Price_alert.

pip install price-alert-rhsm

Guide

from price_alert.price_monitoring import PriceAlert

pa = PriceAlert(asset='TSLA', waiting_time=5)
pa.price_alert_request()

Output expected:

Consult at: 2022-10-07 12:01:09.266432
Ticker TSLA - Current price = $ 228.4
Type a price bigger than 228.4:
Type a price less than 228.4:

Example:

Note: I ran this test on a Saturday, obviously the market was closed, to run the rule I set an equal price current price to pop up the message box if the price is equal to or higher/lower than the current price.

After entering the values to monitor, just wait for the price movement to hit the target. When this occurs, the notification will appear in your window.

Suggestion to new implementation

  1. Monitor multiple assets. Consequently, we need alert for several assets.
  2. Option to conversion result to others currency: BRL, EURO, BTC etc
  3. Implement options to calculate the price to monitoring as percentual or value

Author

Rafael Meireles LinkedIn

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

price-alert-rhsm-0.0.3.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

price_alert_rhsm-0.0.3-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file price-alert-rhsm-0.0.3.tar.gz.

File metadata

  • Download URL: price-alert-rhsm-0.0.3.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for price-alert-rhsm-0.0.3.tar.gz
Algorithm Hash digest
SHA256 1f8ab5a473b73b76483ce706139593cc44eaa8a527c199c226c63ced92ec8c36
MD5 e743a2e2336ced7930178c09e40db607
BLAKE2b-256 b398c3a01e594c8ff2566c982c4b42a4a7837b8fc261d384ebc18ae27818d32f

See more details on using hashes here.

File details

Details for the file price_alert_rhsm-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for price_alert_rhsm-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ec263ecc1b3ff97efd87b0e4bfadb7a078839f7945a68a10a60513da75f5ae44
MD5 de388bd7848d9360723875bb119aa01e
BLAKE2b-256 f8c2c0803db8c4a259cf20aea5e62f9acfd23c53827a5eba6b80081becb59c65

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page