# 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:
```python
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)
Raw data
{
"_id": null,
"home_page": "https://github.com/ayuk977/geckocheck",
"name": "geckocheck",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "geckocheck",
"author": "ayuk977",
"author_email": "ayuk977@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/8b/e7/c7d3b0ec2cd0b5faf5530b44fee9ef3efef115cc4b9f92f4e23d8699fb79/geckocheck-1.0.0.tar.gz",
"platform": null,
"description": "# Gecko Opsgenie Alert\n\n## Usage\n\nThis application fetches token prices from the Gecko Terminal API and sends alerts to Opsgenie when the price falls below a certain threshold.\n\n### Installation\n\n1. Install the package using pip:\n\n ```\n pip install -r requirements.txt\n ```\n\n2. Run the application with the following command:\n\n ```\n main.py --opsgenie-api-key YOUR_API_KEY --network NETWORK --token TOKEN --threshold THRESHOLD\n ```\n\nReplace `YOUR_API_KEY`, `NETWORK`, `TOKEN`, and `THRESHOLD` with appropriate values.\n\n### Glossary\n\n- `opsgenie-api-key`: The API key provided by Opsgenie. This key is required to authenticate and send alerts to the Opsgenie service.\n- `network`: The network for which you want to fetch token prices. For example, \"ton\" for the TON network.\n- `token`: The token address for which you want to fetch the price.\n- `threshold`: The price threshold below which an alert should be sent to Opsgenie.\n\n### Usage as a Module\n\nIf you wish to use this application as a module, you can import the necessary functions into your Python script:\n\n```python\nfrom geckocheck.main import fetch_token_price, send_alert\n\n# Fetch token price\nprice = fetch_token_price(network, token)\n\n# Send alert if necessary\nsend_alert(opsgenie_api_key, threshold, price, network, token)\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": null,
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/ayuk977/geckocheck",
"Source": "https://github.com/ayuk977/geckocheck"
},
"split_keywords": [
"geckocheck"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4c537d50abaa0ecf31fa28913e5dd0a813632670af3cfeeb2f18a3d156c37071",
"md5": "c58bd504537fea25b36e5d0cd3da4c2b",
"sha256": "3ca85ec9cc622a1990dc4688db2a9d3c87d026d3906fe33910b5e996e8becfe1"
},
"downloads": -1,
"filename": "geckocheck-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c58bd504537fea25b36e5d0cd3da4c2b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4285,
"upload_time": "2024-03-31T18:07:25",
"upload_time_iso_8601": "2024-03-31T18:07:25.658459Z",
"url": "https://files.pythonhosted.org/packages/4c/53/7d50abaa0ecf31fa28913e5dd0a813632670af3cfeeb2f18a3d156c37071/geckocheck-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8be7c7d3b0ec2cd0b5faf5530b44fee9ef3efef115cc4b9f92f4e23d8699fb79",
"md5": "47030a45287f58948faac787b02acc9d",
"sha256": "63c27bd092c16674941f4e8106428fdd2ecaee2187085a03da16cf5d4cf32dc3"
},
"downloads": -1,
"filename": "geckocheck-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "47030a45287f58948faac787b02acc9d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3091,
"upload_time": "2024-03-31T18:07:27",
"upload_time_iso_8601": "2024-03-31T18:07:27.597129Z",
"url": "https://files.pythonhosted.org/packages/8b/e7/c7d3b0ec2cd0b5faf5530b44fee9ef3efef115cc4b9f92f4e23d8699fb79/geckocheck-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-31 18:07:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ayuk977",
"github_project": "geckocheck",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "geckocheck"
}