For MetaMask, the minimum basic functionality we'd want from a conversion API is as follows:
One endpoint for converting Ether into a fiat currency
GET ethconversion/:symbol
Where :symbol
indicates the abbreviated symbol used to represent the target fiat, such as USD, EUR, JPY, etc.
The JSON output would have to have these fields:
price
numbersuccess
boolean
An option to select a specific exchange, for example:
GET ethconversion/:exchange/:symbol
where :exchange
is a string such as poloniex
or kraken
. This could also be implemented as a parameter.
Expand :symbol
to include other cryptocurrencies and/or tokens, such as BTC, DOGE, ZEC, etc. (get it?)
Including timestamp
in the response: The last time the API updated in UTC time.
In order to reduce request volume, perhaps design a separate 'most popular' endpoint that packages the queries for 10 or so of the most popular exchange requests.
For example, ethconversion/popular
. We can then cache this response and reduce the number of requests switching from say, USD to BTC.