Gecko Opsgenie Alert
Usage
This application fetches token prices from the Gecko Terminal API and sends alerts to Opsgenie when the price falls below a certain threshold.
Installation
-
Install the package using pip:
pip install -r requirements.txt -
Run the application with the following command:
main.py --opsgenie-api-key YOUR_API_KEY --network NETWORK --token TOKEN --threshold THRESHOLD
Replace YOUR_API_KEY, NETWORK, TOKEN, and THRESHOLD with appropriate values.
Glossary
opsgenie-api-key: The API key provided by Opsgenie. This key is required to authenticate and send alerts to the Opsgenie service.network: The network for which you want to fetch token prices. For example, "ton" for the TON network.token: The token address for which you want to fetch the price.threshold: The price threshold below which an alert should be sent to Opsgenie.
Usage as a Module
If you wish to use this application as a module, you can import the necessary functions into your Python script:
from geckocheck.main import fetch_token_price, send_alert
# Fetch token price
price = fetch_token_price(network, token)
# Send alert if necessary
send_alert(opsgenie_api_key, threshold, price, network, token)
Release files for geckocheck 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| geckocheck-1.0.0.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| geckocheck-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.4 kB
Release files / geckocheck-1.0.0.tar.gz
| Download URL | geckocheck-1.0.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63c27bd092c16674941f4e8106428fdd2ecaee2187085a03da16cf5d4cf32dc3
|
|
BLAKE2b-256 checksum How to use checksums |
8be7c7d3b0ec2cd0b5faf5530b44fee9ef3efef115cc4b9f92f4e23d8699fb79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
|
Release files / geckocheck-1.0.0-py3-none-any.whl
| Download URL | geckocheck-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ca85ec9cc622a1990dc4688db2a9d3c87d026d3906fe33910b5e996e8becfe1
|
|
BLAKE2b-256 checksum How to use checksums |
4c537d50abaa0ecf31fa28913e5dd0a813632670af3cfeeb2f18a3d156c37071
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
|