mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-01 15:10:44 +00:00
Added static/dynamic fee values/methods for all exchanges.
This commit is contained in:
11
itbithttp.go
11
itbithttp.go
@@ -24,6 +24,7 @@ type ItBit struct {
|
||||
Name string
|
||||
Enabled bool
|
||||
ClientKey, APISecret, UserID string
|
||||
MakerFee, TakerFee float64
|
||||
}
|
||||
|
||||
type ItBitTicker struct {
|
||||
@@ -49,6 +50,8 @@ type ItBitTicker struct {
|
||||
func (i *ItBit) SetDefaults() {
|
||||
i.Name = "ITBIT"
|
||||
i.Enabled = true
|
||||
i.MakerFee = -0.10
|
||||
i.TakerFee = 0.50
|
||||
}
|
||||
|
||||
func (i *ItBit) GetName() (string) {
|
||||
@@ -68,6 +71,14 @@ func (i *ItBit) SetAPIKeys(apiKey, apiSecret string) {
|
||||
i.APISecret = apiSecret
|
||||
}
|
||||
|
||||
func (i *ItBit) GetFee(maker bool) (float64) {
|
||||
if maker {
|
||||
return i.MakerFee
|
||||
} else {
|
||||
return i.TakerFee
|
||||
}
|
||||
}
|
||||
|
||||
func (i *ItBit) GetTicker(currency string) (ItBitTicker) {
|
||||
path := ITBIT_API_URL + "/markets/" + currency + "/ticker"
|
||||
var itbitTicker ItBitTicker
|
||||
|
||||
Reference in New Issue
Block a user