Files
gocryptotrader/cmd/documentation/currency_templates/fx_exchangeratesapi.tmpl
Ryan O'Hara-Reid ecf0a5bcb3 spellcheck: fix and update (#1359)
* spellcheck: fix and update

* spellcheck: add exclude line for gateio_types
2023-10-03 16:07:03 +11:00

40 lines
1.1 KiB
Cheetah

{{define "currency forexprovider exchangeratesapi.io" -}}
{{template "header" .}}
## Current Features for {{.Name}}
+ Fetches up to date currency data from [Exchange rates API]("http://exchangeratesapi.io")
### 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/exchangerates"
)
c := exchangerates.ExchangeRates{}
// Define configuration
newSettings := base.Settings{
Name: "ExchangeRates",
Enabled: true,
Verbose: false,
RESTPollingDelay: time.Duration,
APIKey: "key",
APIKeyLvl: "keylvl",
PrimaryProvider: true,
}
c.Setup(newSettings)
mapstringfloat, err := c.GetRates("USD", "EUR,CHY")
// Handle error
```
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations" .}}
{{- end}}