Invertee / CoinbasePro-Powershell

Powershell module for the CoinbasePro API.
MIT License
11 stars 6 forks source link

Get-CoinbaseProducts could use a -Filter #2

Closed jasonpearce closed 4 years ago

jasonpearce commented 5 years ago

Get-CoinbaseProdcuts returns all products. To filter, I have to pipe to a Where-Object. I'd like to do more just within the commadlet.

This Works: Get a list of USD trading pairs (but exclude USDC trading pairs)

Get-CoinbaseProducts | Where {$.ID -like "*-USD" -and $.ID -notlike "*-USDC"} | Sort ID | FT -AutoSize

Wish list: But these options would be nice to have

Get-CoinbaseProducts -Filter {ID -like "-USD" -and ID -notlike "-USDC"} Get-CoinbaseProdcuts -ID BTC-USD,ETH-USD,LTC-USD

Invertee commented 4 years ago

I added that in after all, just a simple filter param that accepts a script block like so: Get-CoinbaseProProducts -Filter {$_.id -like "*LTC"}