Skip to content

💱 A neat Golang wrapper for the Frankfurter open-source API for current and historical foreign exchange rates published by the European Central Bank

License

Notifications You must be signed in to change notification settings

masl/frankfurtergo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Report Card Go Reference

frankfurtergo

A neat Go wrapper for the frankfurter.app API

Installation

go get -u github.com/masl/frankfurtergo

Usage

Initialize

client := frankfurtergo.New()

Latest Data

latest, err := client.FetchLatest()
if err != nil {
    return err
}

Historical Data

t := time.Date(
    2010, 8, 18, 16, 0, 0, 0, time.UTC)

hist, err := client.FetchHistorical(t)
if err != nil {
    return err
}

Time Series Data

f := time.Date(
    2010, 8, 18, 16, 0, 0, 0, time.UTC)

t := time.Date(
    2012, 4, 20, 16, 0, 0, 0, time.UTC)

series, err := client.FetchSeries(f, t)
if err != nil {
    return err
}

Contribution

Feel free to help me out as I'm learning Go with this project and would appreciate any kind of help

About

💱 A neat Golang wrapper for the Frankfurter open-source API for current and historical foreign exchange rates published by the European Central Bank

Topics

Resources

License

Stars

Watchers

Forks

Languages