Updated Bitfinex REST API

This commit is contained in:
Adrian Gallagher
2015-10-16 13:58:06 +11:00
parent 23df51f0ca
commit 16b89324a0
3 changed files with 723 additions and 415 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -36,8 +36,8 @@
"AuthenticatedAPISupport": false,
"APIKey": "Key",
"APISecret": "Secret",
"AvailablePairs": "BTCUSD,LTCUSD,DRKUSD",
"EnabledPairs": "BTCUSD,LTCUSD,DRKUSD",
"AvailablePairs": "BTCUSD,LTCUSD,LTCBTC",
"EnabledPairs": "BTCUSD,LTCUSD,LTCBTC",
"BaseCurrencies": "USD"
},
{

View File

@@ -116,7 +116,12 @@ func (e *Event) CheckCondition() bool {
/* to-do: add event handling for all currencies and fiat currencies */
if bot.exchange.bitfinex.GetName() == e.Exchange {
lastPrice = bot.exchange.bitfinex.GetTicker("btcusd").Last
result, err := bot.exchange.bitfinex.GetTicker("btcusd", nil)
if err != nil {
lastPrice = 0
} else {
lastPrice = result.Last
}
} else if bot.exchange.bitstamp.GetName() == e.Exchange {
lastPrice = bot.exchange.bitstamp.GetTicker().Last
} else if bot.exchange.coinbase.GetName() == e.Exchange {