{"id":13806239,"url":"https://github.com/mehtaarn000/vcurrency","last_synced_at":"2026-01-25T01:01:55.823Z","repository":{"id":143771394,"uuid":"343559350","full_name":"mehtaarn000/vcurrency","owner":"mehtaarn000","description":"API wrapper (written in V) for https://api.exchangeratesapi.io/","archived":false,"fork":false,"pushed_at":"2021-07-05T18:49:35.000Z","size":16,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-13T14:51:05.361Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"V","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/mehtaarn000.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}},"created_at":"2021-03-01T21:15:30.000Z","updated_at":"2024-11-22T17:37:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"86bea7a4-178c-4e89-bdb2-2d1f55bc7d04","html_url":"https://github.com/mehtaarn000/vcurrency","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mehtaarn000/vcurrency","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehtaarn000%2Fvcurrency","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehtaarn000%2Fvcurrency/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehtaarn000%2Fvcurrency/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehtaarn000%2Fvcurrency/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mehtaarn000","download_url":"https://codeload.github.com/mehtaarn000/vcurrency/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehtaarn000%2Fvcurrency/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28740393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T22:12:27.248Z","status":"ssl_error","status_checked_at":"2026-01-24T22:12:10.529Z","response_time":89,"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":[],"created_at":"2024-08-04T01:01:09.315Z","updated_at":"2026-01-25T01:01:55.802Z","avatar_url":"https://github.com/mehtaarn000.png","language":"V","funding_links":[],"categories":["Libraries"],"sub_categories":["Web"],"readme":"# vcurrency\n\nAPI wrapper (written in V) for https://api.exchangeratesapi.io/\n\n## Installation\nUse:\n\n`v install mehtaarn000.vcurrency`\n\n## Functions\n\nThe `get_data` function takes two arguments: `options (type map)` and `symbols (type array of strings)`.\n\n`get_data` takes arguments: `start_date`, `end_date` (which can both be an empty string to get latest data), and `base` (default \"EUR\"). \n\nThe `symbols` array should have all the symbols that you would like to get from the API. For example, \"USD\", \"INR\", \"NZD\" (default is all symbols).\n\n## Example usage\n\nGet raw JSON from the API (not reccommended):\n\n```v\nmodule main\n\nimport mehtaarn000.vcurrency\n\nfn main() {\n    data := vcurrency.get_data(map{\"start_date\" : \"2021-02-25\", \"end_date\" : \"2021-02-26\", \"base\" : \"INR\"}, [\"USD\", \"CNY\"])\n    \n    // To get the response\n    println(data.json)\n\n    // To parse the json data\n    println(data.json[\"rates\"])\n\n    // To get the generated url\n    println(data.url)\n\n}\n```\n\nUse the `convert` function:\n`convert` takes three arguments. `base` (type string), `amount` (type f64), and `symbols` (type []string). It returns a `map[string]f64`.\n```v\nmodule main\n\nimport mehtaarn000.vcurrency\n\nfn main() {\n    data := vcurrency.convert(\"USD\", 100, [\"EUR\", \"INR\"])\n    println(data)\n}\n```\n\nOr, Use the `convert_on_date` function to convert a value based on the given date:\n`convert_on_date` takes four arguments `base` (type string), `date` (type string in YYYY-MM-DD), `amount` (type f64), and `symbols` (type []string). It returns a `map[string]f64`.\n```v\nmodule main\n\nimport mehtaarn000.vcurrency\n\nfn main() {\n    data := vcurrency.convert_on_date(\"USD\", \"2020-01-05\", 100, [\"EUR\", \"INR\", \"CZK\"])\n    println(data)\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehtaarn000%2Fvcurrency","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmehtaarn000%2Fvcurrency","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehtaarn000%2Fvcurrency/lists"}