Files
gocryptotrader/cmd/documentation/currency_templates/fx_currencylayer.tmpl
2019-08-09 15:46:24 +10:00

41 lines
1.0 KiB
Cheetah

{{define "currency forexprovider currencylayer" -}}
{{template "header" .}}
## Current Features for {{.Name}}
+ Fetches up to date curency data from [Currency Layer](https://currencylayer.com/)
### 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/currencylayer"
)
c := currencylayer.CurrencyLayer{}
// Define configuration
newSettings := base.Settings{
Name: "CurrencyLayer",
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}}