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

Allow get_product_trades() to be paginated #279

Merged
merged 3 commits into from
Mar 28, 2018

Conversation

tamersaadeh
Copy link
Contributor

This implements the pagination of trades, as per the api docs (https://docs.gdax.com/#get-trades).

This implements the pagination of trades, as per the docs (https://docs.gdax.com/#get-trades).
@tamersaadeh tamersaadeh changed the title Allow get_product_trades to be paginated Allow get_product_trades() to be paginated Mar 23, 2018
@danpaquin
Copy link
Owner

This is needed, but I have a couple concerns:

  1. r.raise_for_status() is really bad at handling issues within a wrapper. I would rather have error handling similar to the one implemented in Add error handling, fix broken unit tests #260 or not at all.

  2. rate-limiting should be handled outside of each method call. This is a bigger project so we should not worry about it here, but please do not use time.sleep() within any method.

@tamersaadeh
Copy link
Contributor Author

tamersaadeh commented Mar 24, 2018

r.raise_for_status() is really bad at handling issues within a wrapper. I would rather have error handling similar to the one implemented in #260 or not at all.

I only used it for debugging, and I've removed it. (I used the authenticated_client as a template)

rate-limiting should be handled outside of each method call. This is a bigger project so we should not worry about it here, but please do not use time.sleep() within any method.

But since this will perform recursion it will always be rate limited. I have commented it out but I think we need a way to handle it properly.

PS if #260 gets merged I could adapt the code to use it

@danpaquin danpaquin merged commit 6e23554 into danpaquin:master Mar 28, 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

Successfully merging this pull request may close these issues.

2 participants