Skip to content

get_exchange_info does not work in websocket API - easy fix included #346

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

Closed
1 task done
fpaincha opened this issue Jun 28, 2023 · 2 comments
Closed
1 task done
Assignees
Labels
bug Something isn't working

Comments

@fpaincha
Copy link

fpaincha commented Jun 28, 2023

Version of this library.

1.46.1

Solution to Issue cannot be found in the documentation or other Issues and also occurs in the latest version of this library.

  • I checked the documentation and other Issues. I am using the latest version of this library.

Hardware?

Local server/workstation

Operating System?

Windows

Python version?

Python3.10

Installed packages

Not relevant here.

Logging output

Not relevant here.

Processing method?

stream_buffer

Used endpoint?

concerns all

Issue

Congrats - this library is just marvellous!

The source code for method get_exchange_info in the websocket API reads as:

[snip]

    if symbol is None:
        params = {"symbol": symbol}
    if symbols is None:
        symbols = [symbol.upper() for symbol in symbols]
        params = {"symbols": symbols}
    if permissions is None:
        params = {"permissions": permissions}

[snip]

All of those three method parameters are None by default. Of course, what was meant was this instead:

    params = {}
    if symbol is not None:
        params = {"symbol": symbol}
    elif symbols is not None:
        symbols = [symbol.upper() for symbol in symbols]
        params = {"symbols": symbols}
    elif permissions is not None:
        params = {"permissions": permissions}

This fixes method get_exchange_info...

Cheers.

@fpaincha fpaincha added the bug Something isn't working label Jun 28, 2023
@oliver-zehentleitner
Copy link
Member

thank you! is fixed now!

oliver-zehentleitner added a commit that referenced this issue Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants