{"id":22572751,"url":"https://github.com/dmfed/cbrapi","last_synced_at":"2025-10-24T01:45:55.571Z","repository":{"id":144227440,"uuid":"315735948","full_name":"dmfed/cbrapi","owner":"dmfed","description":"package implementing access to API of Central Bank of Russia","archived":false,"fork":false,"pushed_at":"2021-03-11T22:40:45.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T15:13:59.704Z","etag":null,"topics":[],"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/dmfed.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}},"created_at":"2020-11-24T19:43:41.000Z","updated_at":"2022-03-28T18:31:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"c75076f5-b07f-4229-b0cb-6a838df91bf0","html_url":"https://github.com/dmfed/cbrapi","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmfed%2Fcbrapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmfed%2Fcbrapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmfed%2Fcbrapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmfed%2Fcbrapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmfed","download_url":"https://codeload.github.com/dmfed/cbrapi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246049618,"owners_count":20715510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-08T02:11:42.746Z","updated_at":"2025-10-24T01:45:50.528Z","avatar_url":"https://github.com/dmfed.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Central Bank of Russia API implementation\n\nPackage **cbrapi** partially implements API of Central Bank of Russia. Implemented functions allow to quote currency rates at specified date or range of dates.\nSee [website of Central Bank of Russia](https://www.cbr.ru/development/) for details.\n\nUsage is quite simple (see below sample code). The only two points that need to be mentioned are as follows. \n\n1. Methods which accept dates have signatures with **interface{}** type. These require either time.Time object or date in form of string formatted strictly as\n\"DD/MM/YYYY\". Supplying string formatted in a different way would result in a error.\n\n2. ExchangeRate object implements Stringer, so if you care to only receive the float (the rate itself), use relevant field and do not Print/Sprint etc.\n\nSee [package documentation at pkg.go.dev](https://pkg.go.dev/github.com/dmfed/cbrapi) for details.\n\nTo use the library: **go get github.com/dmfed/cbrapi**\n\nAnd here comes a working example: \n\n```go\nimport \"https://github.com/dmfed/cbrapi/\"\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/dmfed/cbrapi\"\n)\n\nfunc main() {\n\tusd, err := cbrapi.New(\"USD\")\n\tif err != nil {\n\t\tfmt.Println(err)\n\t\treturn\n\t}\n\tusdrate, err := usd.RateAtDate(time.Now()) // returns current exchange rate USD/RUB\n\tfmt.Println(usdrate, err)\n\teurrate, _ := cbrapi.QuoteAtDate(\"EUR\", \"01/09/2020\") // returns exchange rate of EUR at September 1st 2020\n\tfmt.Println(eurrate)\n\tusdrange, _ := usd.RateAtRangeDates(\"01/09/2020\", \"04/09/2020\")\n\tfor _, item := range usdrange {\n\t\tfmt.Println(item)\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmfed%2Fcbrapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmfed%2Fcbrapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmfed%2Fcbrapi/lists"}