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.4.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: price-alert-rhsm-0.0.4.tar.gz
  • Upload date:
  • Size: 4.5 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.4.tar.gz
Algorithm Hash digest
SHA256 99a3b6fd60359b790e24fe8e411cf342feb5ba49288db2b0df2df878cb588b52
MD5 9b8f6d46de61ccca4999a674037f646c
BLAKE2b-256 47539abb23bd8b198628c655ef9516de9eb04196dc5c1d9a1903618b1bf0a644

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for price_alert_rhsm-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 85f8c173b2210ae1f5e83cbf0bd02d966c89f89b62a949a601b9aff1bcbb0927
MD5 1bb0217735983099a3ca711cb3917d7b
BLAKE2b-256 437743c0d1cfde7ac8426e735e17484b56a68ca8a5e5d27774c2cdd32f7e66c7

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