{"id":20680280,"url":"https://github.com/markwragg/powershell-currencyconverter","last_synced_at":"2025-10-14T11:36:23.427Z","repository":{"id":221179356,"uuid":"753657869","full_name":"markwragg/PowerShell-CurrencyConverter","owner":"markwragg","description":"A PowerShell wrapper for the currency conversion APIs provided by ExchangeRate-API.","archived":false,"fork":false,"pushed_at":"2025-04-18T17:38:56.000Z","size":172,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T00:51:18.020Z","etag":null,"topics":["currency-converter","powershell-module"],"latest_commit_sha":null,"homepage":"https://www.exchangerate-api.com","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markwragg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-02-06T14:55:28.000Z","updated_at":"2025-04-18T17:39:00.000Z","dependencies_parsed_at":"2024-02-06T16:30:32.382Z","dependency_job_id":"cb001af5-0f1d-42e5-8ed0-167ce52e3926","html_url":"https://github.com/markwragg/PowerShell-CurrencyConverter","commit_stats":null,"previous_names":["markwragg/powershell-currencyconverter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/markwragg/PowerShell-CurrencyConverter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwragg%2FPowerShell-CurrencyConverter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwragg%2FPowerShell-CurrencyConverter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwragg%2FPowerShell-CurrencyConverter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwragg%2FPowerShell-CurrencyConverter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markwragg","download_url":"https://codeload.github.com/markwragg/PowerShell-CurrencyConverter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwragg%2FPowerShell-CurrencyConverter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019052,"owners_count":26086516,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-converter","powershell-module"],"created_at":"2024-11-16T21:30:46.022Z","updated_at":"2025-10-14T11:36:23.400Z","avatar_url":"https://github.com/markwragg.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PowerShell Currency Converter\n\n[![Build Status](https://dev.azure.com/markwragg/GitHub/_apis/build/status/markwragg.PowerShell-CurrencyConverter?branchName=main)](https://dev.azure.com/markwragg/GitHub/_build/latest?definitionId=12\u0026branchName=main) ![coverage](https://img.shields.io/badge/coverage-99%25-brightgreen.svg)\n\nA PowerShell wrapper for the open currency conversion APIs provided by [ExchangeRate-API](https://www.exchangerate-api.com/) and (for Crypto currencies) [CoinBase](https://api.coinbase.com/v2).\n\n\u003e [!IMPORTANT]\n\u003e No registration / API keys are required to use these APIs, but the currency rates from ExchangeRate-API are refreshed once a day and rate limiting may occur if you make too many requests.\n\u003e The module caches the results for a currency via ExchangeRate-API to disk, so that the API only needs to be queried once a day for a specified currency. You can also cache crypto currency requests\n\u003e to disk by providing the `-CacheSeconds` parameter. Note that the CoinBase API refreshes exchange rates frequently (appears to be every 15 seconds).\n\u003e\n\u003e If you have registered at ExchangeRate-API, you can provide your API key via the `-APIKey` parameter of the `Convert-Currency` and `Get-ExchangeRate` cmdlets and this will invoke the v6 API.\n\n## Installation\n\nThe module is published in the PowerShell Gallery, so if you have PowerShell 5 or newer can be installed by running:\n\n```powershell\nInstall-Module CurrencyConverter\n```\n\n## Usage\n\nThis module provides the following cmdlets:\n\nCmdlet                 | Description\n---------------------- | ---------------------------------------------------------------------------------------------------------------------------------\nConvert-Currency       | Converts a decimal value between two specified currencies using ExchangeRate-API.\nConvert-CryptoCurrency | Converts a decimal value between two specified crypto/non-crypto currencies using CoinBase API.\nFormat-Currency        | Formats a value as a string with the currency symbol for a specified country or crypto currency (where supported).\nGet-Currency           | Returns the list of supported currency codes along with their currency name and country code.\nGet-CryptoCurrency     | Returns the list of supported crypto currency codes along with their currency name and type (crypto or fiat).\nGet-ExchangeRate       | Returns all exchange rates for a specified currency, or a specified exchange rate between two currencies.\nGet-CryptoExchangeRate | Returns all exchange rates for a specified crypto currency, or a specified exchange rate between two crypto/non-crypto currencies.\n\nTo perform a simple currency conversion, execute:\n\n```powershell\nConvert-Currency -Value 100 -From USD -To GBP\n```\n\nOr for a crypto currency:\n\n```powershell\nConvert-CryptoCurrency -Value 100 -From BTC -To GBP\n```\n\nTo use the ExhangeRate-API registered API, provide your key via the `-APIKey` parameter:\n\n```powershell\nConvert-Currency -Value 100 -From USD -To GBP -ApiKey yourapikeystringhere\n```\n\n\u003e [!TIP]\n\u003e See here for a list of supported currencies: https://www.exchangerate-api.com/docs/supported-currencies. Alternatively you can use the `Get-Currency` cmdlet.\n\nThe value can alternatively be provided via the pipeline:\n\n```powershell\n100 | Convert-Currency -From EUR -To CAD\n100 | Convert-CryptoCurrency -From BTC -To GBP\n```\n\nThis means that you can pipe multiple values in to perform a series of conversions:\n\n```powershell\n100,200,250 | Convert-Currency -From USD -To JPY\n100,200,250 | Convert-CryptoCurrency -From BTC -To GBP\n```\n\nIf you would like to return the result as a formatted string including the currency symbol and rounded to a number of decimal places, execute:\n\n```powershell\n100 | Format-Currency -Currency USD\n```\n```plaintext\n$100.00\n```\n\n```powershell\n100 | Format-Currency -Currency ETH\n```\n```plaintext\nΞ100.00\n```\n\nThis cmdlet rounds to two decimal places by default. To specify a different number of decimal places, use the `-Decimals` parameter:\n\n```powershell\nFormat-Currency -Value 123.4567890 -Currency GBP -Decimals 4\n```\n```plaintext\n£123.4568\n```\n\nYou can also perform a currency conversion at the same time as performing the format:\n\n```powershell\nFormat-Currency -Value 100 -Currency GBP -ConvertTo USD\n```\n```plaintext\n$125.85\n```\n\nIf you would prefer the currency symbol to appear after the value, use the `-SymbolAtEnd` switch parameter:\n\n```powershell\nFormat-Currency -Value 100 -Currency GBP -SymbolAtEnd\n```\n```plaintext\n125.85£\n```\n\nYou can also pipe the result of `Convert-Currency` to `Format-Currency`:\n\n```powershell\nConvert-Currency -Value 100 -From USD -To EUR | Format-Currency -Currency EUR\n```\n```plaintext\n€93.04\n```\n\nTo see a full list of currency codes supported by this tool, along with their name and country, execute:\n\n```powershell\nGet-Currency\n```\n\nTo see a full list of crypto currency codes supported by this tool, along with their name and type, execute:\n\n```powershell\nGet-CryptoCurrency\n```\n\nYou can also specify a specific code (this requires an exact match):\n\n```powershell\nGet-Currency -Currency GBP\nGet-CryptoCurrency -Currency BTC\n```\n\nOr you can filter by currency or country name (this will return partial matches):\n\n```powershell\nGet-Currency -Name 'Pound'\n```\n```plaintext\nCode Name                   Country\n---- ----                   -------\nEGP  Egyptian Pound         Egypt\nFKP  Falkland Islands Pound Falkland Islands\nGBP  Pound Sterling         United Kingdom\nGGP  Guernsey Pound         Guernsey\nGIP  Gibraltar Pound        Gibraltar\nIMP  Manx Pound             Isle of Man\nJEP  Jersey Pound           Jersey\nLBP  Lebanese Pound         Lebanon\nSDG  Sudanese Pound         Sudan\nSHP  Saint Helena Pound     Saint Helena\nSSP  South Sudanese Pound   South Sudan\nSYP  Syrian Pound           Syria\n```\n\n```powershell\nGet-Currency -Country 'United'\n```\n```plaintext\nCode Name                 Country\n---- ----                 -------\nAED  UAE Dirham           United Arab Emirates\nGBP  Pound Sterling       United Kingdom\nUSD  United States Dollar United States\n```\n\n\nTo return the full result from the API as a PowerShell object, use the `Get-ExchangeRate` cmdlet:\n\n```powershell\nGet-ExchangeRate -Currency USD\n```\n\nOr for crypto currencies:\n\n```powershell\nGet-CryptoExchangeRate -Currency BTC\n```\n\nTo use the registered API, provide your key via the `-APIKey` parameter:\n\n```powershell\nGet-ExchangeRate -Currency GBP -ApiKey yourapikeystringhere\n```\n\n\u003e [!NOTE]\n\u003e When an API key is provided, the v6 API is invoked. This returns the rates as a property called 'conversion_rates'. The Open API returns the property as 'rates'.\n\n```plaintext\nresult                : success\nprovider              : https://www.exchangerate-api.com\ndocumentation         : https://www.exchangerate-api.com/docs/free\nterms_of_use          : https://www.exchangerate-api.com/terms\ntime_last_update_unix : 1707350551\ntime_last_update_utc  : Thu, 08 Feb 2024 00:02:31 +0000\ntime_next_update_unix : 1707437661\ntime_next_update_utc  : Fri, 09 Feb 2024 00:14:21 +0000\ntime_eol_unix         : 0\nbase_code             : USD\nrates                 : @{USD=1; AED=3.6725; AFN=73.755496; ALL=96.818553; AMD=405.868756; ANG=1.79; AOA=839.476403; ARS=830.15;\n                        AUD=1.533245; AWG=1.79; AZN=1.699659; BAM=1.81591; BBD=2; BDT=109.768633; BGN=1.81581; BHD=0.376;\n                        BIF=2850.388516; BMD=1; BND=1.343391; BOB=6.934197; BRL=4.962119; BSD=1; BTN=83.001945; BWP=13.679849;\n                        BYN=3.245101; BZD=2; CAD=1.346345; CDF=2728.475301; CHF=0.873457; CLP=947.575519; CNY=7.19952;\n                        COP=3954.758146; CRC=517.23293; CUP=24; CVE=102.376655; CZK=23.176359; DJF=177.721; DKK=6.92457;\n                        DOP=58.566572; DZD=134.658699; EGP=30.904297; ERN=15; ETB=56.700184; EUR=0.928449; FJD=2.247047;\n                        FKP=0.792018; FOK=6.92461; GBP=0.792011; GEL=2.659816; GGP=0.792018; GHS=12.422748; GIP=0.792018;\n                        GMD=66.562902; GNF=8588.188018; GTQ=7.814905; GYD=209.536717; HKD=7.820255; HNL=24.66876; HRK=6.995483;\n                        HTG=131.989675; HUF=360.172059; IDR=15650.579046; ILS=3.652044; IMP=0.792018; INR=83.001968;\n                        IQD=1310.842088; IRR=42080.433475; ISK=137.663905; JEP=0.792018; JMD=156.245808; JOD=0.709;\n                        JPY=148.053154; KES=160.352692; KGS=89.414602; KHR=4091.328437; KID=1.533294; KMF=456.772434;\n                        KRW=1326.84486; KWD=0.307938; KYD=0.833333; KZT=452.274884; LAK=20736.087575; LBP=15000; LKR=312.628935;\n                        LRD=192.145847; LSL=18.897808; LYD=4.844127; MAD=10.061229; MDL=17.827961; MGA=4536.616958;\n                        MKD=57.312368; MMK=2099.744651; MNT=3412.288092; MOP=8.054862; MRU=39.584855; MUR=45.384067;\n                        MVR=15.453447; MWK=1689.264206; MXN=17.05608; MYR=4.761416; MZN=63.917225; NAD=18.897808;\n                        NGN=1407.528785; NIO=36.672231; NOK=10.577722; NPR=132.803112; NZD=1.636807; OMR=0.384497; PAB=1;\n                        PEN=3.861833; PGK=3.749532; PHP=56.01365; PKR=279.042023; PLN=4.033029; PYG=7296.21721; QAR=3.64;\n                        RON=4.620779; RSD=108.801814; RUB=91.346239; RWF=1284.744312; SAR=3.75; SBD=8.488406; SCR=13.291546;\n                        SDG=544.79719; SEK=10.475851; SGD=1.343391; SHP=0.792018; SLE=22.587694; SLL=22587.694431;\n                        SOS=571.785619; SRD=36.611265; SSP=1102.449099; STN=22.747273; SYP=12950.775091; SZL=18.897808;\n                        THB=35.595367; TJS=10.947348; TMT=3.500938; TND=3.129049; TOP=2.371485; TRY=30.62091; TTD=6.777386;\n                        TVD=1.533294; TWD=31.341578; TZS=2541.212285; UAH=37.600041; UGX=3817.518963; UYU=39.148736;\n                        UZS=12479.514661; VES=36.2375; VND=24413.241561; VUV=120.508933; WST=2.745778; XAF=609.029912; XCD=2.7;\n                        XDR=0.754059; XOF=609.029912; XPF=110.795003; YER=250.331823; ZAR=18.897825; ZMW=27.029301;\n                        ZWL=10811.587531}\n```\n\nIf you want to return just the exchange rates, you can execute `Get-ExchangeRate` or `Get-CryptoExchangeRate` and specify `-Rates`:\n\n```powershell\nGet-ExchangeRate -Currency GBP -Rates\n```\n```plaintext\nGBP : 1\nAED : 4.636888\nAFN : 92.99538\nALL : 122.070196\nAMD : 510.608906\nANG : 2.260049\nAOA : 1067.044213\nARS : 1048.144979\nAUD : 1.935836\nAWG : 2.260049\nAZN : 2.145246\nBAM : 2.292681\nBBD : 2.525194\nBDT : 138.549806\n...\n```\n\nIf you just want to return a specific exchange rate, you can execute `Get-ExchangeRate` or `Get-CryptoExchangeRate` and specify `-From` and `-To`:\n\n```powershell\nGet-ExchangeRate -From GBP -To USD\n```\n```plaintext\n1.262609\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkwragg%2Fpowershell-currencyconverter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkwragg%2Fpowershell-currencyconverter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkwragg%2Fpowershell-currencyconverter/lists"}