No project description provided
Project description
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
geckocheck-1.0.0.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for geckocheck-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ca85ec9cc622a1990dc4688db2a9d3c87d026d3906fe33910b5e996e8becfe1 |
|
MD5 | c58bd504537fea25b36e5d0cd3da4c2b |
|
BLAKE2b-256 | 4c537d50abaa0ecf31fa28913e5dd0a813632670af3cfeeb2f18a3d156c37071 |