Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Free foreign exchange rates API (exchangerate.host)
249 points by arzzen 68 days ago | hide | past | web | favorite | 61 comments



Very well. I have two questions.

Why should one use this service, instead of using directly ecb(https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xm...)?

How do you keep this service free since there is a server cost?


Bank of Canada has a similar free API

https://www.bankofcanada.ca/valet/docs


Based on how I understand the service, I’d posit you could run such a thing on Heroku for free forever, maybe spending a few dollars (7 usd) a month eventually if you needed some scale.


Yeah. It's one rate a day x 33 currencies x 19 years, so a total of 250,000 numbers. You could compress the whole thing (500 KB?) and serve it to a million customers a month for free.


Wouldn’t it be more reliable to ask the ECB to support JSON alongside xml? Or require them to provide JSON by law? Shims are fine, but technical debt. Fix the problem at the source.


This doesn't make any sense to me. Whether you have to use xmlParse() or jsonParse() is completely inconsequential. It's like writing laws that require languages to have a built-in XML parser. Or a fetchAndParseXml() function.

If these kinds of laws infected tech, we'd still be maintaining government mandated SOAP/WSDL services and other overly complicated tech that someone somewhere thought was the global maximum.


You'd enshrine in law a particular technical format? What is the cost of making such a law vs the cost of a different - but still very much usable - format?


I would, with lifecycle and sunsetting requirements. Laws are requirements docs with more ceremony and stakeholder participation, but also with much more authority.


That all seems well-intentioned and plausible in terms of how things should have been originally. However,

1) I can't help but think of all the problems that apply in general to specifying requirements (too vague, too constraining, too expensive to hammer out to sufficient precision).

2) That's different from changing it retroactively. Would you change it again when JSON goes out of fashion? Or mandate HTTPS? I've not read the OP in detail, but the impression I have is that the existing service is very much functional. Even ignoring the cost of changing the law, do we really want our public institutions to be in breach of law whenever fashions change? I'd rather let them set their own priorities to a large extent - for example, specify a very general, minimal set of requirements and do better when they have capacity to do so. I'm fine with people building on top of that where convenient. It seems like a good thing, in fact.


I think your points are important, but it's likely we won't reach an agreement on this issue. Appreciate you raising the points though!


What is the issue with XML ?


there's some hip environment that handles xml quite badly compared to json and people with little cross experience think the problem is xml


I don't see the problem with XML, especially today, when you can get a package/libray to parse any format the API might be in.


Off-topic, and regularly repeated, but people up/downvoting based on (dis)agreement is the second biggest annoyance of web forums (right after Android keyboard autocompletion).


That ECB link gives the latest rates. They also have one that give the last 90 days of rates [1].

There is a more general system for accessing ECB data that includes a vast amount beyond exchange rates, described here [2]. I think that lets you get anything they have in their statistical data warehouse. (If you don't need to get it programmatically, they have a web GUI [3]).

The general system is also vastly more complex to use. I was quite happy when I found that 90 day link and did not have to deal with figuring out how to get what I wanted out of the general system.

[1] https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist-90d...

[2] https://sdw-wsrest.ecb.europa.eu/help/

[3] https://sdw.ecb.europa.eu/


hi @aaronedam, thanks for your question,

- default api response is json format, this format is easy to parse then xml (eg directly usage in js/nodejs app..) - server cost is not too hight , api response is only static json data (data are sync. on midnight), so price is only for bandwige

- i plan added crypto and comodities (like gold,silver etc)


Please reply directly to the question rather than posting a top-level comment. (I've moved this one.)


Thank you for posting this! I had no idea this existed.

It looks like all the rates are published with EUR as a base currency, so if you wanted to get the USD <> KRW exchange rate, you would have to use EUR at an intermediate. This is probably good enough for most applications.

For anyone else that was wondering, this XML feed is linked off of this page (as well as CSV, RSS, and PDF): https://www.ecb.europa.eu/stats/policy_and_exchange_rates/eu...


If you're interested in offering a paid version of this API with no extra work, let me know. I think it'd be interesting to consider what additional features your users might pay for.

I'm the founder of https://saasify.sh btw which auto-generates full SaaS products from this type of core API functionality.


I just discovered your service not too long ago and was my first thought as I read your first paragraph. I've looked into other products and frameworks many times but yours was the first I found that was to my satisfaction.

Would it be crass to ask for an invite to the beta? I requested access before and again just now but I've been wanting to take a look for awhile.


Hey yeah, please send me an email directly travis@saasify.sh


I posted a comment[1] on here recently wishing more API gateways offer monetization features but Saasify looks like a nice way to get this, just signed up!

[1] https://news.ycombinator.com/item?id=22885263


Awesome - we've received a lot of inbound interest lately. Please email me directly travis at saasify.sh or DM me on the Saasify slack.


That is one of those “I wish I’d thought of this” products. Well done. Great landing page. Now to think of a product :)


Huge fan of the design of your landing page, what did you build and design it with?


Hey, it's all built and designed by lil old me with React & CSS.

It's also all open source: https://github.com/saasify-sh/saasify/tree/master/website


Thank for you reply.

Do you have any suggestions on design or building sites with that aesthetic?

Great work!


Cool product. Which SaaS companies use you?


Smart abstraction!


Thanks :)


How is it different from frankfurter.app ? (from the original creator of fixer.io)

Side note: I always wonder about those stories like uBlock Origin and fixer.io where the original author sold or lost control of the product and then restarted a fork of their own work :) there’s something slightly weird and fun about it somehow


I use fixer in a client project (started back when it was free, now i think it's a couple bucks a month)... Never heard of Frankfurter, but if it's the same guy that's super interesting and I too would like to know the backstory


One other API I've found that includes foreign exchange (as well as a bunch of other different asset classes) is http://iexcloud.io -- they have a free tier that is pretty generous.


We’ve used this API in our https://mintdata.com/docs examples, but the limits run out fairly quickly.

Would be curious to ask here — are there any alternative APIs you’d recommend for showing financial application examples? (Ideally something that fetches the delayed price of a stock (CUSIP) and related news for it)


We use https://openexchangerates.org/ and they also have a free plan. I’d love to know how you compare. They do commodities (silver, gold, etc) and some crypto. What is your USP?


One thing to be careful of when using 3rd party exchange rate services: make sure they are using the right rate source for your needs.

For example, if you need the exchange rate on order to convert a quarter's sales from some non-EUR currency to EUR for quarterly VAT MOSS reporting, you are supposed to use the rate reported by the European Central Bank on the last reporting day of the VAT MOSS quarter.

The submitted service is using ECB, so should be fine for that specific use case.


Do you monetize the query stream to inform fourex investment decisions? What if they are adversarial to my intent? You profit from asymmetric knowledge.

If you detected you could leverage an advantage by lying about the rates, what constraints are there and how do we know?

Banks are highly regulated. What's your regulatory oversight.

Profitable information is hedged by conditions. Therefore beset by utility limits.


This is a bit unrelated, but how do folks make those nice shiny landing pages like this one, which all seem to have almost the exact same layout and format (e.g. the animation with the little people at the top and the link to learn more, along with the tiles in the middle with different features). I'm interested in launching products like this while doing as little frontend work as humanly possible.


Search for templates. HTML templates, react templates, Gatsby, Hugo, wordpress, insert anything else etc templates with whatever you want them for.

You can also check out market places like envato.

There are free open source illustrations - https://news.ycombinator.com/item?id=21858822


thanks!


This is a great service and I’d like to thank the developer regardless of whether there are other services out there that provide similar services.

Why do I say this? I’ve just spent the last year and a couple of solid corona weeks doing some development on a personal project which requires historical access (-1 day mostly) to high / low / open / close data on all LSE companies.

I’ve hunted round for companies that offer this as an api even as a paid service and I’ve found it ridiculously difficult to get data. Most of the product offerings mean I have to login each time, download a file and parse the cvs or pay for access to incrementally tiered historical data.

In the end I’ve had to scrape data which costs a lot in processing time.

My point is here that this will be useful to someone somewhere. And I’m willing to bet they are also willing to pay for it.


I would love something like this with commodities (gold, silver) and crypto included...


Check fcsapi.com Not sure how the business is run but fiat and crypto are covered and it is free...

Edit: typo


json with no login or other constraints:

http://cryptomarketplot.com/api.json


Last updated: 2020-02-13T12:14:19Z :(


I usually don't care much about such things but how are you financing this project? I did not see any evidence of a paid plan.

If I were going to depend on this I'd like some assurance that you'd be able to keep it going. That you've run it for 12+ months (I think) is helpful.


Related discussion for a different product:

https://news.ycombinator.com/item?id=22087612


Thanks for sharing.

What are some ways people buy foreign currencies as an investment?


I'm really interested in using this, I just can't seem to easily find the 33 currencies that are supported. Any chance you could clarify which ones?


Note: This website only supports 33/180 currencies.


I host a service too.

https://exchange-rate.bai.uno/

- free

- based on Eu Bank, update daily

- host on a EC2 instance


This is cool thanks. What you do with days that the ECB doesn't publish rates (weekends and bank holidays)?


Did not find the information on the website: this is the fixing spot rate only right?


offtopic - I wonder if it's possible to make arbitrage only by switching currencies setting aside commissions. ie - Exchanging USD > EUR > RUB > ILS > HKD > back to USD --> Profit!!!1


should put something on the website that while the API follows fixer.io it doesn't support all the currencies that fixer.io does


also I would like to pay for this so that it stays online


Nice work! What sort of rate limits do you impose on the API?


How often are these rates updated? Daily? Hourly?


From the FAQ's:

  The API delivers EOD / End of Day historical exchange rates, which become available at 00:05am GMT for the previous day and are time stamped at one second before midnight.


Great work. Love the landing page!


How frequent are intraday updates?




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: