mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-25 07:26:48 +00:00
Moved ticker fetching from main into the relative exchange.
This commit is contained in:
@@ -179,6 +179,24 @@ func (b *Bitfinex) SetAPIKeys(apiKey, apiSecret string) {
|
||||
b.APISecret = apiSecret
|
||||
}
|
||||
|
||||
func (b *Bitfinex) Run() {
|
||||
b.GetAccountFeeInfo()
|
||||
b.GetAccountBalance()
|
||||
|
||||
for b.Enabled {
|
||||
go func() {
|
||||
BitfinexLTC := b.GetTicker("ltcusd")
|
||||
log.Printf("Bitfinex LTC: Last %f High %f Low %f Volume %f\n", BitfinexLTC.Last, BitfinexLTC.High, BitfinexLTC.Low, BitfinexLTC.Volume)
|
||||
}()
|
||||
|
||||
go func() {
|
||||
BitfinexBTC := b.GetTicker("btcusd")
|
||||
log.Printf("Bitfinex BTC: Last %f High %f Low %f Volume %f\n", BitfinexBTC.Last, BitfinexBTC.High, BitfinexBTC.Low, BitfinexBTC.Volume)
|
||||
}()
|
||||
time.Sleep(time.Second * 10)
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Bitfinex) GetFee(maker bool, symbol string) (float64, error) {
|
||||
for _, i := range b.Fees {
|
||||
if symbol == i.Currency {
|
||||
|
||||
Reference in New Issue
Block a user