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

Refactor spot api list_orders method #167

Open
lorenzourera opened this issue Oct 15, 2024 · 0 comments
Open

Refactor spot api list_orders method #167

lorenzourera opened this issue Oct 15, 2024 · 0 comments

Comments

@lorenzourera
Copy link

There is a need to refactor the list_orders method under the spot api.

Based on the API documentation, we should be allowed to make a request wherein currency_pair is None or not specified as long as the status=finished as seen in the screenshot below

image

Solution here is to replace lines 1794 - 1799

image

With this

if self.api_client.client_side_validation and (
            'currency_pair' not in local_var_params or local_var_params['currency_pair'] is None
        ) and local_var_params['status'] == 'open':
            raise ApiValueError(
                "Missing the required parameter `currency_pair` when calling `list_orders` with status 'open'"
            )
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

1 participant