{"id":16328074,"url":"https://github.com/terminaldweller/hived","last_synced_at":"2026-02-06T17:03:14.459Z","repository":{"id":45425380,"uuid":"340803777","full_name":"terminaldweller/hived","owner":"terminaldweller","description":"A  cryptocurrency api server","archived":false,"fork":false,"pushed_at":"2025-10-07T17:28:55.000Z","size":4178,"stargazers_count":0,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-07T19:34:16.393Z","etag":null,"topics":["coincap","coinmarketcap","docker","go","golang","keydb","pocketbase","polygon","telegram"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/terminaldweller.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-02-21T02:53:42.000Z","updated_at":"2025-10-07T17:28:59.000Z","dependencies_parsed_at":"2024-02-29T01:37:15.826Z","dependency_job_id":"14c43373-07e1-44c3-88ff-96841a634399","html_url":"https://github.com/terminaldweller/hived","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/terminaldweller/hived","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminaldweller%2Fhived","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminaldweller%2Fhived/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminaldweller%2Fhived/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminaldweller%2Fhived/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terminaldweller","download_url":"https://codeload.github.com/terminaldweller/hived/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminaldweller%2Fhived/sbom","scorecard":{"id":874452,"data":{"date":"2025-08-11","repo":{"name":"github.com/terminaldweller/hived","commit":"bcabab78a132f958cb66cf8b6ac20a328b1549ea"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/docker.yaml:13","Warn: no topLevel permission defined: .github/workflows/docker.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":3,"reason":"4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/docker.yaml:8"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docker.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/terminaldweller/hived/docker.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yaml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/terminaldweller/hived/docker.yaml/main?enable=pin","Warn: containerImage not pinned by hash: helios/Dockerfile:1","Warn: containerImage not pinned by hash: helios/Dockerfile:7: pin your Docker image by updating debian:bookworm-slim to debian:bookworm-slim@sha256:b1a741487078b369e78119849663d7f1a5341ef2768798f7b7406c4240f86aef","Warn: containerImage not pinned by hash: hived/Dockerfile:1","Warn: containerImage not pinned by hash: hived/Dockerfile:7: pin your Docker image by updating alpine:3.22 to alpine:3.22@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Warn: containerImage not pinned by hash: hived/Dockerfile_distroless:1","Warn: containerImage not pinned by hash: hived/Dockerfile_distroless:7: pin your Docker image by updating gcr.io/distroless/static-debian12 to gcr.io/distroless/static-debian12@sha256:2e114d20aa6371fd271f854aa3d6b2b7d2e70e797bb3ea44fb677afec60db22c","Warn: containerImage not pinned by hash: hived/Dockerfile_distroless_vendored:1","Warn: containerImage not pinned by hash: hived/Dockerfile_distroless_vendored:8: pin your Docker image by updating gcr.io/distroless/static-debian12 to gcr.io/distroless/static-debian12@sha256:2e114d20aa6371fd271f854aa3d6b2b7d2e70e797bb3ea44fb677afec60db22c","Warn: downloadThenRun not pinned by hash: helios/Dockerfile:2-5","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   3 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   8 containerImage dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-q7pp-wcgr-pffx","Warn: Project is vulnerable to: GO-2024-3250 / GHSA-29wx-vh33-7x7r","Warn: Project is vulnerable to: GO-2025-3553 / GHSA-mh63-6h87-95cp","Warn: Project is vulnerable to: GO-2024-2936 / GHSA-m93w-4fxv-r35v","Warn: Project is vulnerable to: GO-2024-2937 / GHSA-9phm-fm57-rhg8"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T05:26:32.393Z","repository_id":45425380,"created_at":"2025-08-24T05:26:32.393Z","updated_at":"2025-08-24T05:26:32.393Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29169384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T16:33:35.550Z","status":"ssl_error","status_checked_at":"2026-02-06T16:33:30.716Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coincap","coinmarketcap","docker","go","golang","keydb","pocketbase","polygon","telegram"],"created_at":"2024-10-10T23:13:40.441Z","updated_at":"2026-02-06T17:03:14.428Z","avatar_url":"https://github.com/terminaldweller.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/terminaldweller/hived)](https://goreportcard.com/report/github.com/terminaldweller/hived)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/1e67ac7026904cddb55ede7097995ad8)](https://www.codacy.com/gh/terminaldweller/hived/dashboard?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=terminaldweller/hived\u0026utm_campaign=Badge_Grade)\n\n# hived\n\n`hived` is a cryptocurrency api server:\u003cbr/\u003e\n\nendpoints:\n\n- `/api/crypto/v1/price`: get the price of a cryptocurrency\n- `/api/crypto/v1/pair`:\n- `/_/`: the pocketbase admin panel\n- `/api/crypto/v1/alert`: set a condition to be alerted on when true\n\nYou can use arithmatical expressions in the alert endpoint. Hived is using [govaluate](https://github.com/Knetic/govaluate).\nHere are some examples:\n\n```txt\nbitcoin\u003eethereum\n```\n\n```txt\nethereum*10\u003e(bitcoin+dodge)\n```\n\n- `/api/crypto/v1/ticker`: get the latest price of a cryptocurrency\n\n## Options\n\nHived extends pocketbase so all the pocketbase options are available:\n\n```txt\n$ hived -help\nPocketBase CLI\n\nUsage:\n  hived [command]\n\nAvailable Commands:\n  admin       Manages admin accounts\n  migrate     Executes app DB migration scripts\n  serve       Starts the web server (default to 127.0.0.1:8090 if no domain is specified)\n  update      Automatically updates the current app executable with the latest available version\n\nFlags:\n      --automigrate            enable/disable auto migrations (default true)\n      --dev                    enable dev mode, aka. printing logs and sql statements to the console\n      --dir string             the PocketBase data directory (default \"hived/pb_data\")\n      --encryptionEnv string   the env variable whose value of 32 characters will be used\n                               as encryption key for the app settings (default none)\n  -h, --help                   help for hived\n      --hooksDir string        the directory with the JS app hooks\n      --hooksPool int          the total prewarm goja.Runtime instances for the JS app hooks execution (default 25)\n      --hooksWatch             auto restart the app on pb_hooks file change (default true)\n      --indexFallback          fallback the request to index.html on missing static path (eg. when pretty urls are used with SPA) (default true)\n      --migrationsDir string   the directory with the user defined migrations\n      --publicDir string       the directory to serve static files (default \"hived/pb_public\")\n      --queryTimeout int       the default SELECT queries timeout in seconds (default 30)\n  -v, --version                version for hived\n\nUse \"hived [command] --help\" for more information about a command.\n```\n\n## Supported Sources\n\n## Config File\n\n```toml\nkeydbAddress = \"keydb:6379\"\nkeydbPassword = \"\"\nkeydbDB = 0\nalertsCheckInterval = 600\ntickerCheckInterval = 600\ncacheDuration = 600\ntelegramChannelID = 1234567\ntelegramBotToken = \"1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n```\n\n## Admin Panel\n\nHived is using [pocketbase](https://github.com/pocketbase/pocketbase). The admin panel provided is available at `/_/`.\n\n## Curl Examples\n\n```bash\n# price\ncurl -u \"user:password\" -X GET https://hived.mydomain.com/api/crypto/v1/price?name=PEPE\u0026unit=USD\n\n# pair\ncurl -u \"user:password\" -X GET https://hived.mydomain.com/api/crypto/v1/pair?one=ETH\u0026two=CAKE\u0026multiplier=4.0\n\n# alert\ncurl -u \"user:password\" -X POST -H \"Content-Type: application/json\" -d '{\"name\":\"alert1\", \"expr\":\"ETH\u003eCAKE\"}' https://hived.mydomain.com/api/crypto/v1/alert\ncurl -u \"user:password\" -X GET -H \"Content-Type: application/json\" https://hived.mydomain.com/api/crypto/v1/alert?key=alert1\ncurl -u \"user:password\" -X DELETE -H \"Content-Type: application/json\" https://hived.mydomain.com/api/crypto/v1/alert?key=alert1\n\n# ticker\ncurl -u \"user:password\" -X POST -H \"Content-Type: application/json\" -d '{\"name\":\"ethereum\"}' https://hived.mydomain.com/api/crypto/v1/ticker\ncurl -u \"user:password\" -X GET -H \"Content-Type: application/json\" https://hived.mydomain.com/api/crypto/v1/ticker?key=ethereum\ncurl -u \"user:password\" -X DELETE -H \"Content-Type: application/json\" https://hived.mydomain.com/api/crypto/v1/ticker?key=ethereum\n```\n\n## Deployment\n\nThere are a couple of Dockerfiles provided by default in the repo:\u003cbr/\u003e\n\n```yaml\nservices:\n  nginx:\n    image: nginx:stable\n    deploy:\n      resources:\n        limits:\n          memory: 128M\n    logging:\n      driver: \"json-file\"\n      options:\n        max-size: \"100m\"\n    ports:\n      - \"443:443/tcp\"\n    networks:\n      - apinet\n    restart: unless-stopped\n    cap_drop:\n      - ALL\n    cap_add:\n      - CHOWN\n      - DAC_OVERRIDE\n      - SETGID\n      - SETUID\n      - NET_BIND_SERVICE\n    volumes:\n      - ./nginx.conf:/etc/nginx/nginx.conf:ro\n      - /etc/letsencrypt/live/hived.mydomain.com/fullchain.pem:/etc/letsencrypt/live/hived.mydomain.com/fullchain.pem:ro\n      - /etc/letsencrypt/live/hived.mydomain.com/privkey.pem:/etc/letsencrypt/live/hived.mydomain.com/privkey.pem:ro\n      - pb-vault:/pb/pd-data/\n    depends_on:\n      - hived\n  hived:\n    image: hived\n    build:\n      context: ./hived\n      dockerfile: ./Dockerfile_distroless_vendored\n    deploy:\n      resources:\n        limits:\n          memory: 256M\n    logging:\n      driver: \"json-file\"\n      options:\n        max-size: \"100m\"\n    networks:\n      - apinet\n      - dbnet\n    ports:\n      - \"127.0.0.1:10009:8090\"\n    entrypoint: [\"hived\"]\n    command: [\"serve\", \"--http=0.0.0.0:8090\"]\n    depends_on:\n      - keydb\n    cap_drop:\n      - ALL\n    environment:\n      - SERVER_DEPLOYMENT_TYPE=test\n      - HIVED_PRICE_SOURCE=cmc\n      - CMC_API_KEY=\n      - POLYGON_API_KEY=\n      - CRYPTOCOMPARE_API_KEY=\n    volumes:\n      - ./hived/hived.toml:/hived/hived.toml\n    dns:\n      - 1.1.1.1\n  keydb:\n    image: eqalpha/keydb:alpine_x86_64_v6.3.4\n    deploy:\n      resources:\n        limits:\n          memory: 256M\n    logging:\n      driver: \"json-file\"\n      options:\n        max-size: \"100m\"\n    networks:\n      - dbnet\n    ports:\n      - \"127.0.0.1:6380:6379\"\n    environment:\n      - ALLOW_EMPTY_PASSWORD=yes\n    volumes:\n      - keydb-data:/data/\nnetworks:\n  dbnet:\n  apinet:\nvolumes:\n  keydb-data:\n  pb-vault:\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterminaldweller%2Fhived","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterminaldweller%2Fhived","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterminaldweller%2Fhived/lists"}