HuobiRDCenter/huobi_Golang

GetHistoricalTrade id overflows int64

Closed this issue · 0 comments

GET /market/history/trade
golang sdk

type TradeTick struct {
Id int64 json:"id"
Ts int64 json:"ts"
Data []struct {
Amount decimal.Decimal json:"amount"
TradeId int64 json:"trade-id"
Ts int64 json:"ts"
Id int64 json:"id" //type of Id is int64
Price decimal.Decimal json:"price"
Direction string json:"direction"
}
}

func (client *MarketClient) GetHistoricalTrade(symbol string, optionalRequest getrequest.GetHistoricalTradeOptionalRequest) ([]market.TradeTick, error) {
...
url := client.publicUrlBuilder.Build("/market/history/trade", request)
getResp, getErr := internal.HttpGet(url)
if getErr != nil {
return nil, getErr
}

result := market.GetHistoricalTradeResponse{}

*jsonErr := json.Unmarshal([]byte(getResp), &result)
...

}

getResp : {"ch":"market.eoseth.trade.detail","status":"ok","ts":1594745613073,"data":[{"id":101110131882,"ts":1594745594604,"data":[{"id":10111013188257230009901629,......
*line error: 10111013188257230009901629 overflows int64