mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
BTSE: Fix endpoint issues after API update (#341)
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
package btse
|
||||
|
||||
import "time"
|
||||
|
||||
// Market stores market data
|
||||
type Market struct {
|
||||
ID string `json:"id"`
|
||||
Symbol string `json:"symbol"`
|
||||
BaseCurrency string `json:"base_currency"`
|
||||
QuoteCurrency string `json:"quote_currency"`
|
||||
BaseMinSize float64 `json:"base_min_size"`
|
||||
@@ -51,8 +53,8 @@ type MarketStatistics struct {
|
||||
|
||||
// ServerTime stores the server time data
|
||||
type ServerTime struct {
|
||||
ISO string `json:"iso"`
|
||||
Epoch float64 `json:"epoch"`
|
||||
ISO time.Time `json:"iso"`
|
||||
Epoch string `json:"epoch"`
|
||||
}
|
||||
|
||||
// CurrencyBalance stores the account info data
|
||||
|
||||
@@ -62,7 +62,7 @@ func (b *BTSE) WsHandleData() {
|
||||
ProductID string `json:"product_id"`
|
||||
}
|
||||
|
||||
if strings.Contains(string(resp.Raw), "connect success") {
|
||||
if strings.Contains(string(resp.Raw), "Connected. Welcome to BTSE!") {
|
||||
if b.Verbose {
|
||||
log.Debugf("%s websocket client successfully connected to %s",
|
||||
b.Name, b.Websocket.GetWebsocketURL())
|
||||
|
||||
@@ -39,16 +39,19 @@ func (b *BTSE) Run() {
|
||||
} else {
|
||||
var currencies []string
|
||||
for _, m := range *markets {
|
||||
currencies = append(currencies, m.ID)
|
||||
if m.Status != "active" {
|
||||
continue
|
||||
}
|
||||
currencies = append(currencies, m.Symbol)
|
||||
}
|
||||
err = b.UpdateCurrencies(currency.NewPairsFromStrings(currencies),
|
||||
false,
|
||||
false)
|
||||
if err != nil {
|
||||
log.Errorf("%s Failed to update available currencies.\n", b.Name)
|
||||
log.Errorf("%s Failed to update available currencies. Error: %s\n",
|
||||
b.Name, err)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// UpdateTicker updates and returns the ticker for a currency pair
|
||||
|
||||
Reference in New Issue
Block a user