Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get all data from TradesHistory and Ledgers #37

Closed
uwevil opened this issue Mar 10, 2018 · 2 comments
Closed

Cannot get all data from TradesHistory and Ledgers #37

uwevil opened this issue Mar 10, 2018 · 2 comments

Comments

@uwevil
Copy link
Contributor

uwevil commented Mar 10, 2018

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)
@Glavic
Copy link
Contributor

Glavic commented Mar 11, 2018

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.

@uwevil
Copy link
Contributor Author

uwevil commented Mar 11, 2018

Thanks. It works now.

@uwevil uwevil closed this as completed Mar 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants