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

Fix get_product_trades pagination #427

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cbpro/public_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def get_product_ticker(self, product_id):
return self._send_message('get',
'/products/{}/ticker'.format(product_id))

def get_product_trades(self, product_id, before='', after='', limit=None, result=None):
def get_product_trades(self, product_id, **kwargs):
"""List the latest trades for a product.

This method returns a generator which may make multiple HTTP requests
Expand Down Expand Up @@ -144,7 +144,7 @@ def get_product_trades(self, product_id, before='', after='', limit=None, result
}]
"""
return self._send_paginated_message('/products/{}/trades'
.format(product_id))
.format(product_id), params=kwargs)

def get_product_historic_rates(self, product_id, start=None, end=None,
granularity=None):
Expand Down