Repository navigation
Get CryptoExchangeRate
Returns all crypto exchange rates for a specified currency, or a specified exchange rate between two currencies.
Get-CryptoExchangeRate [[-Currency] <String>] [-To <String>] [-CacheSeconds <Object>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Get-CryptoExchangeRate [[-Currency] <String>] [-Rates] [-CacheSeconds <Object>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Uses the Coin Base API (https://api.coinbase.com/v2/exchange-rates) to perform currency conversions. Caches the conversion rates for the specified currency for a number of seconds if -CacheSeconds is specified.
Get-CryptoExchangeRate -Currency BTC
Returns the exchange rates for Bitcoin as a PowerShell object.
Get-CryptoExchangeRate -Currency BTC -Rates
Returns all exchange rates for Bitcoin.
Get-CryptoExchangeRate -From USD -To BTC
Returns the exchange rate from US Dollar to Bitcoin, example result: 0.0000149456903504
'BTC','ETH' | Get-CryptoExchangeRate
Returns the exchange rates for Bitcoin and Ether as PowerShell objects.
Set-CurrencyDefault -From USD -To BTC
Get-CryptoExchangeRate
Saves USD/BTC as the default currencies, then returns the exchange rate from US Dollar to Bitcoin without needing to specify -Currency/-To.
The currency to return exchange rates for. (Alias: From) Defaults to the value saved with Set-CurrencyDefault -From, if any.
Type: String
Parameter Sets: (All)
Aliases: From
Required: False
Position: 1
Default value: (Get-CurrencyDefaultValue -Name 'From')
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: FalseThe currency to return the exchange rate to (from the currency specified as -Currency or -From). Defaults to the value saved with Set-CurrencyDefault -To, if any.
Type: String
Parameter Sets: ToRate
Aliases:
Required: False
Position: Named
Default value: (Get-CurrencyDefaultValue -Name 'To')
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: FalseSwitch: Use to return just the exchange rates for a specified currency.
Type: SwitchParameter
Parameter Sets: Rates
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: FalseNumber of seconds to cache the result. Default: 0.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False{{Fill ProgressAction Description}}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
https://github.com/markwragg/PowerShell-CurrencyConverter/wiki/Get-CryptoExchangeRate