Skip to main content

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

  1. Install the package using pip:

    pip install -r requirements.txt
    
  2. 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


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 details)

Uploaded Source

Built Distribution

geckocheck-1.0.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file geckocheck-1.0.0.tar.gz.

File metadata

  • Download URL: geckocheck-1.0.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for geckocheck-1.0.0.tar.gz
Algorithm Hash digest
SHA256 63c27bd092c16674941f4e8106428fdd2ecaee2187085a03da16cf5d4cf32dc3
MD5 47030a45287f58948faac787b02acc9d
BLAKE2b-256 8be7c7d3b0ec2cd0b5faf5530b44fee9ef3efef115cc4b9f92f4e23d8699fb79

See more details on using hashes here.

File details

Details for the file geckocheck-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: geckocheck-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for geckocheck-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ca85ec9cc622a1990dc4688db2a9d3c87d026d3906fe33910b5e996e8becfe1
MD5 c58bd504537fea25b36e5d0cd3da4c2b
BLAKE2b-256 4c537d50abaa0ecf31fa28913e5dd0a813632670af3cfeeb2f18a3d156c37071

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