Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Run][New Plugin] Currency converter #3248

Closed
aarish21 opened this issue May 20, 2020 · 44 comments
Closed

[Run][New Plugin] Currency converter #3248

aarish21 opened this issue May 20, 2020 · 44 comments
Labels
Idea-Enhancement New feature or request on an existing product Product-PowerToys Run Improved app launch PT Run (Win+R) Window Run-Plugin Things that relate with PowerToys Run's plugin interface

Comments

@aarish21
Copy link

image
this would be very useful feature for everyone I hope you guys can implement it

@byeze
Copy link

byeze commented May 20, 2020

Up!

@crutkas crutkas added Idea-Enhancement New feature or request on an existing product Product-PowerToys Run Improved app launch PT Run (Win+R) Window labels May 20, 2020
@crutkas crutkas added this to the Suggested Enhancements milestone May 20, 2020
@crutkas
Copy link
Member

crutkas commented May 20, 2020

good idea

@aarish21
Copy link
Author

good idea

why not add everything that calculator can convert

@PhilTb7
Copy link

PhilTb7 commented May 20, 2020

good idea

why not add everything that calculator can convert

exactly! that's even better than integrating the wox plugin "currency converter"

also consider other functions which exist as wox plugin already (websearch, google translate) -> #3226

as well as existing features in the UELI launcher -> #3228

@aarish21
Copy link
Author

good idea

why not add everything that calculator can convert

exactly! that's even better than integrating the wox plugin "currency converter"

also consider other functions which exist as wox plugin already (websearch, google translate) -> #3226

as well as existing features in the UELI launcher -> #3228

yeah fully web integration would be great

This was referenced Jun 3, 2020
@crutkas crutkas added the Run-Plugin Things that relate with PowerToys Run's plugin interface label Aug 12, 2020
@enricogior enricogior changed the title suggestion: to add currency converter in the powertoys run [Run][Plugin] Add currency converter Jan 7, 2021
@enricogior enricogior changed the title [Run][Plugin] Add currency converter [Run][New Plugin] Currency converter Jan 7, 2021
@Firestone91
Copy link

Can anyone tell me how is the progress in this task? I can't wait because the currency converter will be very useful for me.
The unit/currency converter doesn't work for me that's why i am waiting for new update.

@ThiefZero
Copy link
Contributor

Can anyone tell me how is the progress in this task? I can't wait because the currency converter will be very useful for me.
The unit/currency converter doesn't work for me that's why i am waiting for new update.

There's no spec and nobody writing code as far as I know. It might take a while.

@Firestone91
Copy link

Can anyone tell me how is the progress in this task? I can't wait because the currency converter will be very useful for me.
The unit/currency converter doesn't work for me that's why i am waiting for new update.

There's no spec and nobody writing code as far as I know. It might take a while.

Do you think PowerToys Run is slowly dying? Do you know what awaits her now?
To be honest, this module is very useful for me and I use it on a daily basis, and the additional functionalities only improve the convenience of using it.

@andorep
Copy link

andorep commented Jun 24, 2021

Is there anyone working on this?
Because I would like to work on this option

@crutkas
Copy link
Member

crutkas commented Jun 24, 2021

@andreperegrina best of my knowledge no but ultimately where does the data come from for the query?

@andorep
Copy link

andorep commented Jun 24, 2021

@andreperegrina best of my knowledge no but ultimately where does the data come from for the query?

I don't not yet. I haven't done the research or code. I just download this tool and I think it's amazing. I usually use spotlight to convert dollars to pesos in my Mac and I was wondering if I can do the same here.

This is why I want it to contribute.

@dougwl
Copy link

dougwl commented Jun 25, 2021

Does MSN Money have some sort of API? Because it has a currency converter using its own data.

https://www.msn.com/en-us/money/tools/currencyconverter

Edit: Ok, they seem to use https://www.refinitiv.com as source.

@ThiefZero
Copy link
Contributor

Hell of a lot of options here: https://stackoverflow.com/questions/3139879/how-do-i-get-currency-exchange-rates-via-an-api-such-as-google-finance

To overcome the limits on all these free ones you could simply have a service that caches results from any of these sources and data is read from the cache/CDN.

With only 250 to 1000 requests per month you won't be able to make use of a free service. Remember that's 1000 request per API key that every user of this feature would share.

Caching the results seems counter productive as you then are using possible outdated trading values (in addition of having no way of knowing when they need to be updated).

Data source is indeed the issue and without Microsoft or any currency API service supplying the community with a plan and API key I don't see a way of this feature being implemented.

@asheroto
Copy link

Could we make it where the user could sign up and insert their own API key?

@TomLewis
Copy link

TomLewis commented Dec 13, 2021

using possible outdated trading values

Even if its only updated once a day, that's better than nothing. I only use it on spotlight for rough conversion, so I have an estimate what a conversion would be. I don't think anyone's going to be using it for anything extreme.

The cache would just be a mirror of what's possible with whatever service is used, hell multiple services could be used to create this cache server, maybe cache is the wrong word? I'm wondering if we could use something like vercel query these APIs to their max requests to host a public version that isn't rate limited.

1000 requests a month, that's 33 updates per day, that's plenty!

edit: I looked up Vercels free server-less function tier, and it says "Serverless Function Execution | Up to 100 GB-Hrs"
https://vercel.com/docs/concepts/limits/fair-use-policy

That seems like it could handle an API request 33 times a day and hosting an API.

@crutkas
Copy link
Member

crutkas commented Dec 13, 2021

I don't like the idea of someone having to put in their own API key. I'm also willing to bet that model is against the services TOS. I don't think a Microsoft product should piggy back off someone's service / compute / bandwidth like that. If i was that company, i'd be irked.

TLDR: We can't stop a community plugin from adopting such a model but that model is not one I want inside PowerToys.

@sibber5
Copy link
Contributor

sibber5 commented Dec 13, 2021

can't we query to bing's currency converter and parse the result?

@ThiefZero
Copy link
Contributor

Is there any way that Microsoft could supply an API key or service for the community to use for this feature?

@crutkas
Copy link
Member

crutkas commented Dec 13, 2021

@cyberrex5 / @ThiefZero I don't think the API is open for 3rd parties (which PT would be treated like that)

@TomLewis
Copy link

Why cant this be used? This is a microsoft product with microsoft developers right?
https://docs.microsoft.com/en-us/partner/develop/get-foreign-exchange-rates

@crutkas
Copy link
Member

crutkas commented Dec 22, 2021

@TomLewis that api is for azure pricing sheets.

Currently used with get price sheet API to calculate expected charges for Azure plan CSP local currencies.

@TomLewis
Copy link

Oops!

@RinMinase
Copy link

Hell of a lot of options here: https://stackoverflow.com/questions/3139879/how-do-i-get-currency-exchange-rates-via-an-api-such-as-google-finance

To overcome the limits on all these free ones you could simply have a service that caches results from any of these sources and data is read from the cache/CDN.

What about this one? This also came from that link, but no one seems to be talking about it.

Free & Blazing Fast response using CDN
No Rate limits
150+ Currencies, Including Common Cryptocurrencies
Daily Updated

https://github.com/fawazahmed0/currency-api

Sample Request:
https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@1/latest/currencies/usd.json

Are there any pitfalls to using this data source?

@crutkas
Copy link
Member

crutkas commented Feb 15, 2022

@RinMinase, where does that data come from. Can you confirm the data's legitimacy and validity? If PowerToys has a plugin that sources data, we need to validate and be sure it stays valid. They do not say where that data is sourced from. To me, that is a big red flag.

@RinMinase
Copy link

RinMinase commented Feb 15, 2022

@crutkas, it fetches from CoinMarketCap basing on this commit. The data-source URL seems to be placed in the ENV.

This seems to be another issue I found:
I validated it, but sadly by eye only, that it fetches on the 12AM on the value of each currency. It does not fetch the data again whenever it changes within the day. So its currency data-source would not be "valid" during the rest of the day as exchange rates would change (possibly by the decimals) throughout the day.

@lokize
Copy link

lokize commented Apr 2, 2022

+1 for this, because is very useful resource.

@crutkas
Copy link
Member

crutkas commented May 16, 2022

I don't see PowerToys itself creating this. While it is a popular request, it requires a service backend and honestly would be best suited against 3rd party plugin support which is #3200

@asheroto
Copy link

For some crazy reason I remembered this exact issue from awhile ago. I stumbled across this website that is free exchange rate information. A user could be easily guided to utilize the API key. Free plan is 1k requests/month.

https://openexchangerates.org/

@AlexHunterCodes
Copy link

Can people please stop adding to this thread with random 3rd party exchange rate APIs that can't scale or meet legal/security/accuracy/reliability requirements? Realistically, if this ever gets the green light as a 1st party plugin, it will be with one of Microsoft's own APIs or not at all.

That said, calc.exe on Windows 10 and later already has a built-in currency converter which hits api.msn.com (which means that valid API keys technically ship with every install of Windows 10-11 🤷).

Their readme explicitly says that API is not licenced for other use, but if Microsoft can licence Microsoft's data feed from Microsoft to Microsoft for use in Microsoft's open source calculator app which already ships with every copy of Microsoft's operating system, then it seems mad to me that Microsoft's PowerToys can't access a similar / the same licence too, or piggyback off of Calculator's existing functionality.

So here's a new idea. There's an open feature request microsoft/calculator#1524 to add some kind of command line argument or protocol handler support. If that goes anywhere, perhaps this issue could be revisited to parse a currency conversion search query and then simply open Calculator with the right arguments (just like opening a search query in a web browser). That way, PowerToys wouldn't need to directly licence or consume any APIs at all.

@janeoa
Copy link

janeoa commented Apr 12, 2023

Does it work now? Why is this issue closed?

@Jay-o-Way
Copy link
Collaborator

@janeoa see #3248 (comment)

@janeoa
Copy link

janeoa commented Apr 12, 2023

@janeoa see #3248 (comment)

Oof. Sorry, but I dont really get it. The issue is open, and most of the people are talking about some wox. Is it a full version of powertoys? Is there a way to mae your own plugins for powertoys?

@Advaith3600
Copy link
Contributor

I created a custom plugin for this https://github.com/Advaith3600/powertoys-run-currency-converter
Let me know if this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Idea-Enhancement New feature or request on an existing product Product-PowerToys Run Improved app launch PT Run (Win+R) Window Run-Plugin Things that relate with PowerToys Run's plugin interface
Projects
None yet
Development

No branches or pull requests