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

Use parameters in get_product_trades() #422

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

tbm
Copy link
Contributor

@tbm tbm commented Feb 3, 2021

The parameters had no effect since they were never passed to
self._send_paginated_message()

Fixes #414

The parameters had no effect since they were never passed to
self._send_paginated_message()

Fixes danpaquin#414
@tbm
Copy link
Contributor Author

tbm commented Feb 3, 2021

This isn't quite complete since I don't know what to do about results, but at least parameters like after are working now.

@spnichol
Copy link

spnichol commented Feb 4, 2021

Are you sure these parameters aren't deprecated? I don't see them in the official documentation, and when I tried something like what you pushed here, I got

{'message': 'Invalid positive integer value for parameter - before'}

When parsing the output from the request... were you able to get actual data?

@tbm
Copy link
Contributor Author

tbm commented Feb 5, 2021

after works which is the only thing I tried.

@tbm
Copy link
Contributor Author

tbm commented Feb 5, 2021

It's definitely possible this needs to be rewritten completely.

@ceritium
Copy link

ceritium commented Mar 18, 2021

Hi, what do you think about this approach?

    def get_product_trades(self, product_id, **kwargs):
        return self._send_paginated_message('/products/{}/trades'
                                            .format(product_id), params=kwargs)

It is the same approach that other paginated endpoints on authenticated_client.py

#427

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.

get_product_trades start/end time and limit not working as expected
3 participants