mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 15:09:42 +00:00
35 lines
955 B
Cheetah
35 lines
955 B
Cheetah
{{define "currency forexprovider exchangerate.host" -}}
|
|
{{template "header" .}}
|
|
## Current Features for {{.Name}}
|
|
|
|
+ Fetches up to date currency 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}} |