{"id":36894558,"url":"https://github.com/tech-branch/glassnode","last_synced_at":"2026-01-12T15:40:55.652Z","repository":{"id":45386600,"uuid":"347705781","full_name":"tech-branch/glassnode","owner":"tech-branch","description":"API wrapper for Glassnode on-chain market data","archived":false,"fork":false,"pushed_at":"2022-07-13T16:53:21.000Z","size":18,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-19T06:49:54.520Z","etag":null,"topics":["api","api-wrapper","glassnode","golang","on-chain"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tech-branch.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}},"created_at":"2021-03-14T17:31:03.000Z","updated_at":"2023-09-10T08:58:03.000Z","dependencies_parsed_at":"2022-09-17T15:25:49.668Z","dependency_job_id":null,"html_url":"https://github.com/tech-branch/glassnode","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tech-branch/glassnode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-branch%2Fglassnode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-branch%2Fglassnode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-branch%2Fglassnode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-branch%2Fglassnode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tech-branch","download_url":"https://codeload.github.com/tech-branch/glassnode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-branch%2Fglassnode/sbom","scorecard":{"id":871803,"data":{"date":"2025-08-11","repo":{"name":"github.com/tech-branch/glassnode","commit":"20d25d8e05be9bdf95faa53afe2962e3ecbbafbd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml: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":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":1,"reason":"Found 1/8 approved changesets -- score normalized to 1","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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/tech-branch/glassnode/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/tech-branch/glassnode/test.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction 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":"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":"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: MIT License: 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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"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-24T04:28:59.551Z","repository_id":45386600,"created_at":"2025-08-24T04:28:59.551Z","updated_at":"2025-08-24T04:28:59.551Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28341270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["api","api-wrapper","glassnode","golang","on-chain"],"created_at":"2026-01-12T15:40:55.559Z","updated_at":"2026-01-12T15:40:55.636Z","avatar_url":"https://github.com/tech-branch.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![live tests](https://github.com/tech-branch/glassnode/actions/workflows/test.yml/badge.svg)\n\n### What's that?\n\nAPI wrapper for Glassnode on-chain market intelligence data\n\n#### How do I use it?\n\nLet's ask Glassnode for the latest SOPR indicator value. \nA simple request could be built like this:\n\n```golang\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/tech-branch/glassnode\"\n)\n\nfunc main() {\n\tapisample := glassnode.NewClient(\"your_api_key\")\n\n\tyesterday := glassnode.YesterdayTimestamp()\n\n\topts := glassnode.APIOptionsList{\n\t\tAsset:    \"BTC\",        // or \"ETH\"\n\t\tCategory: \"indicators\", // market, derivatives etc\n\t\tMetric:   \"sopr\",       // or \"nupl\"\n\t\tSince:    yesterday,    // UNIX timestamp, 0 means all\n\t\tUntil:    0,            // UNIX timestamp, 0 means all\n\t}\n\n\td, err := glassnode.GetMetricData(context.Background(), *apisample, \u0026opts)\n\tif err != nil {\n\t\tfmt.Errorf(\"couldn't fetch metric data: %s\", err.Error())\n\t}\n\n\t// See \"Why multiple return types\" below for explanation\n\te := d.([]TimeValue)\n\n\tfor i := 0; i \u003c len(e); i++ {\n\t\tfmt.Printf(\"%f\\n\", e[i].Value)\n\t\tfmt.Print(time.Unix(e[i].Time, 0))\n\t}\n}\n\n```\n\nWhich would print something like the below:\n\n```\n1.026512\n2021-03-13 00:00:00 +0000 GMT\n```\n\nIn case you didn't update the API key, you would receive a 401 error:\n\n```\n[GetMetricData] request errored: [sendRequest] HTTP request unsuccessful: 401\n```\n\n### Why multiple return types?\n\nUnfortunately, there's no simple way of telling which type of response we'll get from Glassnode. Therefore the unmarshalling process returns either one of:\n- `[]TimeValue` \n- `[]TimeOptions`\n\nGlassnode has two types of responses: \n- list of single value maps \n- list of multiple values maps \n\nCheck Glassnode API documentation to see specific examples, here are some simplified ones:\n\n- `TimeOptions` type:\n\n```json\n\t[\n\t\t{\n\t\t\t\"t\":1604361600,\n\t\t\t\"o\":{\n\t\t\t\t\"ma128\":7.671518382631376e+22,\n\t\t\t\t...\n\t\t\t\t\"ma90\":7.893158075608794e+22\n\t\t\t}\n\t\t}\n\t]\n```\n\n- `TimeValue` type:\n\n```json\n[\n\t{\n\t\t\"t\": 1586217600,\n\t\t\"v\": 0.04205656140305256\n\t},\n\t...\n\t{\n\t\t\"t\": 1586995200,\n\t\t\"v\": 0.028548190409882022\n\t}\n]\n```\n\n### There's more!\n\nThere's another way of specifying parameters in case you need it. Not every parameter option is implemented by the APIOptionsList but additional parameters can be specified using a map like presented below.\n\n```golang\nopts := APIOptionsList{\n\tAsset:    \"BTC\",               // or \"ETH\"\n\tCategory: \"indicators\",        // either indicators, market, mining etc\n\tMetric:   \"difficulty_ribbon\", // or \"nupl\"\n\tDirectMapping: map[string]string{\n\t\t\"s\": \"1586280246\",  // equivalent of Since\n\t\t\"u\": \"1587144246\",\t// equivalent of Until\n\t},\n}\n```\n\nPlease see the tests file for complete examples.\n\n### Tests\n\nLive tests will skip if there's no API key in the env vars.\n\n```\nexport GLASSNODE_API_KEY=yourapikeygoeshere\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftech-branch%2Fglassnode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftech-branch%2Fglassnode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftech-branch%2Fglassnode/lists"}