diff --git a/service_market.go b/service_market.go index ee7e1a5..c22b610 100644 --- a/service_market.go +++ b/service_market.go @@ -32,12 +32,12 @@ func (as *apiService) Time() (time.Time, error) { } defer res.Body.Close() var rawTime struct { - ServerTime string `json:"serverTime"` + ServerTime float64 `json:"serverTime"` } if err := json.Unmarshal(textRes, &rawTime); err != nil { return time.Time{}, errors.Wrap(err, "timeResponse unmarshal failed") } - t, err := timeFromUnixTimestampFloat(rawTime) + t, err := timeFromUnixTimestampFloat(rawTime.ServerTime) if err != nil { return time.Time{}, err }