Skip to content

everapihq/fxapi-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fxapi-go: Golang Currency Converter

This package is a Golang wrapper for fxapi.com that aims to make the usage of the API as easy as possible in your project.

Usage

Initialize the API with your API Key (get one for free at fxapi.com):

fxapi.Init("YOUR-API-KEY")

Afterwards you can make calls to the API like this:

Status Endpoint

fxapi.Status()

Currencies Endpoint

fxapi.Currencies()

Latest Endpoint

fxapi.Latest({
    "base_currency": "USD",
    "currencies": "EUR"
})

Historical Endpoint

fxapi.Historical({
    "base_currency": "USD",
    "currencies": "EUR",
	"date": "2022-09-04"
})

Conversion Endpoint *

fxapi.Convert({
    "base_currency": "USD",
    "currencies": "EUR",
	"date": "2022-09-04",
	"value": "1"
})

Range Endpoint *

fxapi.Range({
    "base_currency": "USD",
    "currencies": "EUR",
	"datetime_start": "2022-09-01T23:59:59Z",
	"datetime_end": "2022-09-03T23:59:59Z",
	"accuracy": "day"
})

(*) Requires paid subscription

Find out more about our endpoints, parameters and response data structure in the docs

License

The MIT License (MIT). Please see License File for more information.

About

A go wrapper for fxapi.com

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages