{"id":13983649,"url":"https://github.com/mattevans/dinero","last_synced_at":"2026-01-12T12:58:22.178Z","repository":{"id":14465403,"uuid":"76587320","full_name":"mattevans/dinero","owner":"mattevans","description":"📈 💰 A golang interface for the Open Exchange Rates API","archived":false,"fork":false,"pushed_at":"2022-03-31T12:22:17.000Z","size":56,"stargazers_count":85,"open_issues_count":2,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-21T23:46:57.292Z","etag":null,"topics":["currency","exchange-rates","forex","go","golang","golang-library","open-exchange"],"latest_commit_sha":null,"homepage":"https://docs.openexchangerates.org/docs/","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/mattevans.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["mattevans"],"patreon":"mattevansnz"}},"created_at":"2016-12-15T19:00:35.000Z","updated_at":"2025-06-12T16:07:23.000Z","dependencies_parsed_at":"2022-08-07T08:00:16.924Z","dependency_job_id":null,"html_url":"https://github.com/mattevans/dinero","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/mattevans/dinero","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattevans%2Fdinero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattevans%2Fdinero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattevans%2Fdinero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattevans%2Fdinero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattevans","download_url":"https://codeload.github.com/mattevans/dinero/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattevans%2Fdinero/sbom","scorecard":{"id":626370,"data":{"date":"2025-08-11","repo":{"name":"github.com/mattevans/dinero","commit":"8303156394d6d0f15a09cdc2df7e6c1961bba46c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"Code-Review","score":2,"reason":"Found 3/11 approved changesets -- score normalized to 2","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":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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"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":"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 29 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-21T06:36:02.663Z","repository_id":14465403,"created_at":"2025-08-21T06:36:02.663Z","updated_at":"2025-08-21T06:36:02.663Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338990,"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":["currency","exchange-rates","forex","go","golang","golang-library","open-exchange"],"created_at":"2024-08-09T05:01:50.403Z","updated_at":"2026-01-12T12:58:22.159Z","avatar_url":"https://github.com/mattevans.png","language":"Go","funding_links":["https://github.com/sponsors/mattevans","https://patreon.com/mattevansnz"],"categories":["Go"],"sub_categories":[],"readme":"# dinero\n\n[![GoDoc](https://godoc.org/github.com/mattevans/dinero?status.svg)](https://godoc.org/github.com/mattevans/dinero)\n[![Build Status](https://travis-ci.org/mattevans/dinero.svg?branch=master)](https://travis-ci.org/mattevans/dinero)\n[![Go Report Card](https://goreportcard.com/badge/github.com/mattevans/dinero)](https://goreportcard.com/report/github.com/mattevans/dinero)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/mattevans/dinero/blob/master/LICENSE)\n\ndinero is a [Go](http://golang.org) client library for accessing the Open Exchange Rates API (https://docs.openexchangerates.org/docs/).\n\nAny forex rates requested will be cached (in-memory), keyed by base currency. With a customisable expiry window, subsequent requests will use cached data or fetch fresh data accordingly.\n\nInstallation\n-----------------\n\n`go get -u github.com/mattevans/dinero`\n\nUsage\n-----------------\n\n**Intialize**\n\n```go\n// Init dinero client passing....\n// - your OXR app ID\n// - base currency code for conversions to work from\n// - your preferrerd cache expiry\nclient := NewClient(\n  os.Getenv(\"OPEN_EXCHANGE_APP_ID\"), \n  \"AUD\",\n  20*time.Minute,\n)\n```\n\n---\n\n## Currencies\n\n**List**\n\n```go\n// List all currencies available.\nrsp, err := client.Currencies.List()\nif err != nil {\n  return err\n}\n```\n\n```json\n[\n  {\n    \"code\": \"INR\",\n    \"name\": \"Indian Rupee\"\n  },\n  {\n    \"code\": \"PYG\",\n    \"name\": \"Paraguayan Guarani\"\n  },\n  {\n      \"code\": \"AED\",\n      \"name\": \"United Arab Emirates Dirham\"\n  },\n  ...\n}\n```\n\n---\n\n## Rates\n\n**List**\n\n```go\n// List latest forex rates. This will use AUD (defined when intializing the client) as the base.\nrsp, err := client.Rates.List()\nif err != nil {\n  return err\n}\n```\n\n```json\n{\n   \"rates\":{\n      \"AED\": 2.702388,\n      \"AFN\": 48.893275,\n      \"ALL\": 95.142814,\n      \"AMD\": 356.88691,\n      ...\n   },\n   \"base\": \"AUD\"\n}\n```\n\n---\n\n**Get**\n\n```go\n// Get latest forex rate for NZD. This will use AUD (defined when intializing the client) as the base.\nrsp, err := client.Rates.Get(\"NZD\")\nif err != nil {\n  return err\n}\n```\n\n```\n1.045545\n```\n---\n\n## Historical Rates\n\n**List**\n\n```go\nhistoricalDate := time.Now().AddDate(0, -5, -3)\n\n// List historical forex rates. This will use AUD (defined when intializing the client) as the base.\nrsp, err := client.HistoricalRates.List(historicalDate)\nif err != nil {\n  return err\n}\n```\n\n```json\n{\n   \"rates\":{\n      \"AED\": 2.702388,\n      \"AFN\": 48.893275,\n      \"ALL\": 95.142814,\n      \"AMD\": 356.88691,\n      ...\n   },\n   \"base\": \"AUD\"\n}\n```\n\n---\n\n**Get**\n\n```go\nhistoricalDate := time.Now().AddDate(0, -5, -3)\n\n// Get historical forex rate for NZD. This will use AUD (defined when intializing the client) as the base.\nrsp, err := client.HistoricalRates.Get(\"NZD\", historicalDate)\nif err != nil {\n  return err\n}\n```\n\n```\n1.045545\n```\n\n---\n\n**Change Base Currency**\n\nYou set a base currency when you the intialize dinero client. Should you wish to change this at anytime, you can call...\n\n```go\nclient.Rates.SetBaseCurrency(\"USD\")\n```\n\n\u003e NOTE: Changing the API `base` currency is available for Developer, Enterprise and Unlimited plan clients only.\n\n---\n\nContributing\n-----------------\nIf you've found a bug or would like to contribute, please create an issue here on GitHub, or better yet fork the project and submit a pull request!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattevans%2Fdinero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattevans%2Fdinero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattevans%2Fdinero/lists"}