fed_finance

package module
v0.0.0-...-120076b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 8 Imported by: 0

README

fed-finance

finance data from Federal Reserve System

Documentation

Index

Constants

View Source
const (
	Australia = "al"
	Austria   = "au"
	Belgium   = "be"
	Brazil    = "bz"
	Canada    = "ca"
	China     = "ch"
	Denmark   = "de"
	// EMU Economic and Monetary Union of the European Union
	EMU = "eu"
	// EU European Union
	EU            = "ec"
	Finland       = "fn"
	France        = "fr"
	Germany       = "ge"
	Greece        = "gr"
	HongKong      = "hk"
	India         = "in"
	Ireland       = "ir"
	Italy         = "it"
	Japan         = "ja"
	Malaysia      = "ma"
	Mexico        = "mx"
	Netherlands   = "ne"
	NewZealand    = "nz"
	Norway        = "no"
	Portugal      = "po"
	Singapore     = "si"
	SouthAfrica   = "sf"
	SouthKorea    = "ko"
	Spain         = "sp"
	SriLanka      = "sl"
	Sweden        = "sd"
	Switzerland   = "sz"
	Thailand      = "th"
	UnitedKingdom = "uk"
	UnitedStates  = "usa"
	Venezuela     = "ve"
)
View Source
const (
	FedDate   = "02-Jan-06"
	ChartDate = "2006-01-02"
)

Variables

View Source
var (
	MonetaryUnit = map[string]string{
		Australia:     "Dollar",
		Austria:       "Schilling",
		Belgium:       "Franc",
		Brazil:        "Real",
		Canada:        "Dollar",
		China:         "Yuan",
		Denmark:       "Krone",
		EU:            "Ecu",
		EMU:           "Euro",
		Finland:       "Markka",
		France:        "Franc",
		Germany:       "Mark",
		Greece:        "Drachma",
		HongKong:      "Dollar",
		India:         "Rupee",
		Ireland:       "Pound",
		Italy:         "Lira",
		Japan:         "Yen",
		Malaysia:      "Ringgit",
		Mexico:        "Peso",
		Netherlands:   "Guilder",
		NewZealand:    "Dollar",
		Norway:        "Krone",
		Portugal:      "Escudo",
		Singapore:     "Dollar",
		SouthAfrica:   "Rand",
		SouthKorea:    "Won",
		Spain:         "Peseta",
		SriLanka:      "Rupee",
		Sweden:        "Krona",
		Switzerland:   "Franc",
		Thailand:      "Baht",
		UnitedKingdom: "Pound",
		Venezuela:     "Bolivar",
	}
)

Functions

func ConvertRateInHistoricalDay

func ConvertRateInHistoricalDay(value float64, from string, to string, historyDay time.Time) (float64, error)

ConvertRateInHistoricalDay covert money by Value in historical day from fromCountry to toCountry

Types

type ExchangeRate

type ExchangeRate struct {
	Country      string
	MonetaryUnit string
	Date         time.Time
	Value        float64
}

func HistoricalExchangeRate

func HistoricalExchangeRate(beginYear, endYear int, country string) ([]ExchangeRate, error)

HistoricalExchangeRate get rates data based on usa dollar from {beginYear} to {end}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL