mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-05 07:26:47 +00:00
Implement config system.
This commit is contained in:
19
itbithttp.go
19
itbithttp.go
@@ -21,6 +21,8 @@ const (
|
||||
)
|
||||
|
||||
type ItBit struct {
|
||||
Name string
|
||||
Enabled bool
|
||||
ClientKey, APISecret, UserID string
|
||||
}
|
||||
|
||||
@@ -44,6 +46,23 @@ type ItBitTicker struct {
|
||||
ServertimeUTC string
|
||||
}
|
||||
|
||||
func (i *ItBit) SetDefaults() {
|
||||
i.Name = "ITBIT"
|
||||
i.Enabled = true
|
||||
}
|
||||
|
||||
func (i *ItBit) GetName() (string) {
|
||||
return i.Name
|
||||
}
|
||||
|
||||
func (i *ItBit) SetEnabled(enabled bool) {
|
||||
i.Enabled = enabled
|
||||
}
|
||||
|
||||
func (i *ItBit) IsEnabled() (bool) {
|
||||
return i.Enabled
|
||||
}
|
||||
|
||||
func (i *ItBit) GetTicker(currency string) (ItBitTicker) {
|
||||
path := ITBIT_API_URL + "/markets/" + currency + "/ticker"
|
||||
var itbitTicker ItBitTicker
|
||||
|
||||
Reference in New Issue
Block a user