Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pluveto/ahr999-dc
https://github.com/pluveto/ahr999-dc
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/pluveto/ahr999-dc
- Owner: pluveto
- Created: 2024-04-29T15:01:46.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-04-30T00:42:29.000Z (7 months ago)
- Last Synced: 2024-10-08T05:21:30.089Z (about 1 month ago)
- Language: Go
- Size: 82 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
# AHR999 Indicator Collector
A program to fetch and store AHR999 indicators from the Coinank API into InfluxDB.
## Environment Variables
- `INFLUXDB_URL`: Optional, defaults to "http://localhost:8086"
- `INFLUXDB_TOKEN`: Required, used for authentication with InfluxDB
- `INFLUXDB_ORG`: Optional, defaults to "MyOrg"
- `INFLUXDB_BUCKET`: Optional, defaults to "MyBucket"
- `INTERVAL`: Optional, defaults to 8 (hours), setting to 0 means run once and exit## Data Collection
The program fetches the following data points from the Coinank API:
- `ahr999`: The AHR999 indicator value
- `avg`: The average value
- `value`: The value field## Schema
The data is stored in InfluxDB using the following schema:
- Measurement: `ahr999`
- Tags:
- None
- Fields:
- `ahr999` (float, the AHR999 indicator value)
- `avg` (float, the 200 day investment cost average value)
- `value` (float, the value field)
- Timestamp: Uses the `date` field from the API response, converted from milliseconds to a proper timestamp.## Acknowledgements
- API: