HuobiRDCenter / huobi_Golang

Go SDK for Huobi Spot API
https://www.htx.com/zh-cn/opend/newApiPages/
Apache License 2.0
176 stars 86 forks source link

GetHistoricalTrade id overflows int64 #13

Closed rosswj closed 4 years ago

rosswj commented 4 years ago

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