Skip to content
This repository was archived by the owner on May 1, 2018. It is now read-only.
This repository was archived by the owner on May 1, 2018. It is now read-only.

Websockets unusable: 'Error 503 Negotiate Unknown' when using websockets.subscribe #154

@Marvosg

Description

@Marvosg

Using the latest version (1.0.0), when using websockets to subscribe to the orderbook, the Bittrex client prints Error 503. The code which causes this issue for me:

bittrex.websockets.client(function () {
    bittrex.websockets.subscribe(['BTC-ADA'],
        function (data) {
            if (data.M === 'updateExchangeState') {
                data.A.forEach((data_for) => {
                    // Do stuff
                });
            }
        });

The console prints:

Error Message:  Negotiate Unknown
Exception:  undefined
Error Data:  503

The expected result is a working subscription to the orderbook updates. Instead the connection will retry several times, failing every time with Error 503, with no successful result.

The endpoint is at https://bittrex.com/api/v1.1/public/getorderbook?market=BTC-ADA&type=both and I can access it from the same machine with Firefox without a problem. As I understand this issue has to do with Bittrex enabling Cloudflare protection on the public api endpoints, but also that this issue is supposed to be fixed in this repository as per Issue #1 - Websockets and Cloudflare.

It seems to me that the issue is not solved. Or is there an accepted workaround that is not documented in the README? Error 503 has prevented me from using Bittrex websockets for the last two hours, during the main business hours of the exchange, so this issue is critical bug for my use case.

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