Skip to content

Issue 3: Inconsistent Query String Handling in shrimpy_api_client.py #26

@PrinceSajjadHussain

Description

@PrinceSajjadHussain

Body:

The ShrimpyApiClient class uses two different methods for constructing query strings: directly in the get_orderbooks function, and using the helper function _create_query_string elsewhere. This inconsistency can lead to confusion and potential errors. Furthermore, get_orderbooks unnecessarily defines endpoint inline when it could reuse the class's _create_query_string function to centralize query parameter handling.

Recommendation:

  1. Standardize the query string construction process. Use the _create_query_string method consistently across all API calls.
  2. Refactor get_orderbooks to use _create_query_string and extract the endpoint into a variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions