beldur/kraken-go-api-client

Cannot get all data from TradesHistory and Ledgers

uwevil opened this issue · 2 comments

I can not retrieve all data when calling Query method. I only have 50 items although Kraken return 610 items (or 465 for other request) in count attribute.

params := map[string]string{
	"start": "1483449017",
}
result, err := api.Query("TradesHistory", params)

or

        params := map[string]string{"start": "1489151863"}
	result, err := api.Query("Ledgers", params)

https://www.kraken.com/help/api#get-trades-history has offset parameter ofs . Use it in the loop. Or just fetch new data with time of last item in previous result.

Thanks. It works now.