/exchangerate

This library is a pure Go interface for the ExchangeRate-API.

Primary LanguageGoMIT LicenseMIT

exchangerate

This library is a pure Go interface for the ExchangeRate-API.

Requirements

You will need an API key from ExchangeRate-API. Place the API key in the environment variable EXCHANGERATE_API_KEY.

Sample Usage

package main

import (
    "fmt"
    "github.com/sorucoder/exchangerate"
)

func main() {
    fmt.Printf("$5.50 USD = £%0.2f GBP\n", exchangerate.Convert(exchangerate.CurrencyFromCode("USD"), exchangerate.CurrencyFromCode("GBP"), 5.5))
}