mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-04 15:10:54 +00:00
Currency: Add new forex provider exchangerate.host (#682)
* Add new forex provider ExchangeRateHost.io * Fix linter paramTypeComine * Add templates and README files * Convert all times to UTC * Fix cosmetic issue and address nits * Add support for fx exchangerate.host engine override * Address nit plus use remove plural
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
+ Currency Layer support
|
||||
+ Fixer.io support
|
||||
+ Open Exchange Rates support
|
||||
+ ExchangeRate.host support
|
||||
|
||||
### Please click GoDocs chevron above to view current GoDoc information for this package
|
||||
{{template "contributions"}}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
{{define "currency forexprovider exchangerate.host" -}}
|
||||
{{template "header" .}}
|
||||
## Current Features for {{.Name}}
|
||||
|
||||
+ Fetches up to date curency data from [ExchangeRate.host API]("https://exchangerate.host")
|
||||
|
||||
### How to enable
|
||||
|
||||
+ [Enable via configuration](https://github.com/thrasher-corp/gocryptotrader/tree/master/config#enable-currency-via-config-example)
|
||||
|
||||
+ Individual package example below:
|
||||
```go
|
||||
import (
|
||||
"github.com/thrasher-corp/gocryptotrader/currency/forexprovider/base"
|
||||
"github.com/thrasher-corp/gocryptotrader/currency/forexprovider/exchangerate.host"
|
||||
)
|
||||
|
||||
var c exchangeratehost.ExchangeRateHost
|
||||
|
||||
// Define configuration
|
||||
newSettings := base.Settings{
|
||||
Name: "ExchangeRateHost",
|
||||
// ...
|
||||
}
|
||||
|
||||
c.Setup(newSettings)
|
||||
|
||||
rates, err := c.GetRates("USD", "EUR,AUD")
|
||||
// Handle error
|
||||
```
|
||||
|
||||
### Please click GoDocs chevron above to view current GoDoc information for this package
|
||||
{{template "contributions"}}
|
||||
{{template "donations" .}}
|
||||
{{- end}}
|
||||
Reference in New Issue
Block a user