{"id":37205097,"url":"https://github.com/edunuzzi/go-xrate","last_synced_at":"2026-01-14T23:38:06.294Z","repository":{"id":202845487,"uuid":"115799316","full_name":"edunuzzi/go-xrate","owner":"edunuzzi","description":"Cryptocurrency rates from Exchanges around the world. Written in Go","archived":false,"fork":false,"pushed_at":"2021-08-30T13:48:33.000Z","size":63,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-22T14:08:17.683Z","etag":null,"topics":["binance","bitcoin","cryptocurrency","exchange","exchange-rates","foxbit","go","golang-library","mercadobitcoin"],"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/edunuzzi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2017-12-30T13:42:58.000Z","updated_at":"2021-08-30T13:48:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"a94c7d18-135f-4fbe-a64a-991235f13bd9","html_url":"https://github.com/edunuzzi/go-xrate","commit_stats":null,"previous_names":["swipecoin/go-xrate"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/edunuzzi/go-xrate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edunuzzi%2Fgo-xrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edunuzzi%2Fgo-xrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edunuzzi%2Fgo-xrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edunuzzi%2Fgo-xrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edunuzzi","download_url":"https://codeload.github.com/edunuzzi/go-xrate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edunuzzi%2Fgo-xrate/sbom","scorecard":{"id":367399,"data":{"date":"2025-08-11","repo":{"name":"github.com/edunuzzi/go-xrate","commit":"304d6f6eeb8ad981999b38aff5057228e75f2bb8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":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":"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":"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":"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":"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":"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":"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":"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"}},{"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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"}}]},"last_synced_at":"2025-08-18T12:11:15.069Z","repository_id":202845487,"created_at":"2025-08-18T12:11:15.069Z","updated_at":"2025-08-18T12:11:15.069Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28439150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: 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":["binance","bitcoin","cryptocurrency","exchange","exchange-rates","foxbit","go","golang-library","mercadobitcoin"],"created_at":"2026-01-14T23:38:05.474Z","updated_at":"2026-01-14T23:38:06.274Z","avatar_url":"https://github.com/edunuzzi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go-xrate (Unmaintained!!!)\n[![Go Report Card](https://goreportcard.com/badge/github.com/Swipecoin/go-xrate)](https://goreportcard.com/report/github.com/Swipecoin/go-xrate)\n\nSmall Golang implementation for fetching cryptocurrency rates from several Exchanges around the world.\n\nReleased under the terms of the [MIT LICENSE](LICENSE).\n\n## Installation\n\nTo install, just run \n```bash\ngo get github.com/swipecoin/go-xrate\n```\n\n## Usage\n\n### BTC -\u003e USDT (Binance)\n```golang\ncrawler, _ := xrate.NewBTCCrawler(\n    currency.Real(), \n    exchanges.Binance(),\n)\n\t\n// Here we are fetching the rates with a 5 second timeout for each request \nr := crawler.Rates(time.Second * 5)\n\n// r[0] -\u003e response from Binance\nfmt.Println(\n    r[0].Exchange,\n    r[0].CryptoCurrency,\n    r[0].FiatCurrency,\n    r[0].Last,\n    r[0].High24h,\n    r[0].Low24h,\n    r[0].Volume24h,\n    r[0].VolumeFiat24h,\n    r[0].MostRecentBidOrder,\n    r[0].MostRecentAskOrder,\n    r[0].CreatedAt,\n)\n```\n\n### BTC -\u003e BRL (BitcoinTrade + Foxbit + Mercado Bitcoin)\n```golang\ncrawler, _ := xrate.NewBTCCrawler(\n    currency.Real(), \n    exchanges.BitcoinTrade(),\n    exchanges.Foxbit(),\n    exchanges.MercadoBitcoin(),\n)\n\t\n// Here we are fetching the rates with a 5 second timeout for each request \nr := crawler.Rates(time.Second * 5)\n\n// r[0] -\u003e response from BitcoinTrade\nfmt.Println(\n    r[0].Exchange,\n    r[0].CryptoCurrency,\n    r[0].FiatCurrency,\n    r[0].Last,\n    r[0].High24h,\n    r[0].Low24h,\n    r[0].Volume24h,\n    r[0].VolumeFiat24h,\n    r[0].MostRecentBidOrder,\n    r[0].MostRecentAskOrder,\n    r[0].CreatedAt,\n    r[0].Error,\n)\n\n// r[1] -\u003e response from Foxbit\nfmt.Println(\n    r[1].Exchange,\n    r[1].CryptoCurrency,\n    r[1].FiatCurrency,\n    r[1].Last,\n    r[1].High24h,\n    r[1].Low24h,\n    r[1].Volume24h,\n    r[1].VolumeFiat24h,\n    r[1].MostRecentBidOrder,\n    r[1].MostRecentAskOrder,\n    r[1].CreatedAt,\n    r[1].Error,\n)\n\n// r[2] -\u003e response from Mercado Bitcoin\nfmt.Println(\n    r[2].Exchange,\n    r[2].CryptoCurrency,\n    r[2].FiatCurrency,\n    r[2].Last,\n    r[2].High24h,\n    r[2].Low24h,\n    r[2].Volume24h,\n    r[2].VolumeFiat24h,\n    r[2].MostRecentBidOrder,\n    r[2].MostRecentAskOrder,\n    r[2].CreatedAt,\n    r[2].Error,\n)\n```\n\n## API\n\n### `NewBTCCrawler(currency.Currency, ...exchanges.Exchange) (exchanges.Crawler, error)`\nThis is used to create new crypto crawler. It expects a fiatCurrency and the exchanges you want to fetch.\n\nPS: It will return a error if you pass it a exchange that does not support Bitcoin or the given fiat currency.\n\n### `(exchanges.Crawler) Rates(time.Duration) ([]CrawlerResponse)` \nThis is the method used to fetch the rates for the exchanges passed on the previous method. \nIt receives a timeout and returns a list of responses, one for each exchange. \n\nThe library uses goroutines for every api call. So the total duration is equal to the slowest Exchange API response time at that moment.\n\nPS: If a specific exchange does not support some field, it will return -1 instead.\n\n## Supported Exchanges\n\nAs of now, only a few exchanges are supported. But the code is prepared to work with multiple countries, fiat currencies and cryptocurrencies. \n\nHere's the currently supported list:\n\n### [Foxbit](https://foxbit.exchange) - CURRENTLY NOT WORKING (Due to new API)\n\n#### Fiat currencies:\n- Real\n\n#### Cryptocurrencies:\n- BTC\n\n---\n\n### [Mercado Bitcoin](https://mercadobitcoin.com.br)\n\n#### Fiat currencies:\n- Real\n\n#### Cryptocurrencies:\n- BTC\n\n---\n\n### [BitcoinTrade](https://bitcointrade.com.br)\n\n#### Fiat currencies:\n- Real\n\n#### Cryptocurrencies:\n- BTC\n\n---\n\n### [Bitcoin To You](https://bitcointoyou.com)\n\n#### Fiat currencies:\n- Real\n\n#### Cryptocurrencies:\n- BTC\n\n---\n\n### [Binance](https://binance.com)\n\n#### Fiat currencies:\n- Tether\n\n#### Cryptocurrencies:\n- BTC\n\n## TODO\n- [X] Report badge\n- [ ] Implement Foxbit new API\n- [ ] Improve unit tests\n- [ ] Support more Exchanges\n- [ ] Better error handling\n- [ ] Other useful statistics from a specific cryptocurrency and/or exchange\n\n## Contribution\nPlease feel free to contribute with both suggestions and pull requests :D\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedunuzzi%2Fgo-xrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedunuzzi%2Fgo-xrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedunuzzi%2Fgo-xrate/lists"}