Link up websocket handler to routes after refactor and various improvements

This commit is contained in:
Adrian Gallagher
2017-09-11 09:07:41 +10:00
parent 0682dcec88
commit 6e9bda83a1
9 changed files with 148 additions and 169 deletions

View File

@@ -54,6 +54,16 @@ func Add(exchange string, p pair.CurrencyPair, assetType string, price, volume f
return
}
if p.FirstCurrency == "XBT" {
newPair := pair.NewCurrencyPair("BTC", p.SecondCurrency.String())
Append(exchange, newPair, assetType, price, volume)
}
if p.SecondCurrency == "USDT" {
newPair := pair.NewCurrencyPair(p.FirstCurrency.String(), "USD")
Append(exchange, newPair, assetType, price, volume)
}
Append(exchange, p, assetType, price, volume)
}