Files
gocryptotrader/tools/documentation/currency_templates/fx_currencylayer.tmpl
Ryan O'Hara-Reid 3b8591bcc8 Updated documentation tool (#155)
* Updated documentation tool
Added templates
Updated documentation using tool

* Fixed incorrect version in web README

* Added new templates to tool.
Updated documents in templates across the code base.
Used tool to regenerate documentation.
2018-07-19 16:02: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-/gocryptotrader/tree/master/config#enable-currency-via-config-example)
+ Individual package example below:
```go
import (
"github.com/thrasher-/gocryptotrader/currency/forexprovider/base"
"github.com/thrasher-/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}}