Exchange rate

From SubSurfWiki
Exchange rateExchange rate/AUD
Jump to navigation Jump to search

Web API for exchange rate

We can use Yahoo APIs. Codes are ISO 4217. Here is an example query, asking for USD to CAD, GBP, EUR, AUD, and INR:

Example query for exchange rates

This is the result:

<query xmlns:yahoo="" yahoo:count="5" yahoo:created="2013-04-19T02:04:14Z" yahoo:lang="en-US">
<Name>USD to CAD</Name>
<Name>USD to GBP</Name>
<Name>USD to EUR</Name>
<Name>USD to AUD</Name>
<Name>USD to INR</Name>
<!--  total: 107  -->
<!--  -->


The rates the script fetches are stored on the /Currencies/ subpage.

The rates are fetched by Pricebot.

The script places the rates on a subpage of this one:

Bugs and enhancements

  • Update the list above from the actual currencies being fetched.
  • Remove the subpages for currencies which are no longer being fetched.
  • Do some error checking on the list to only work for real currencies.
  • Add a switch or code to turn the bot off and on, and a note on the bot's page.

See also