0

Using the Bittrex websockets API I am able to get the summary updates for all markets and also the exchange updates for specific markets.

However, I am not able to receive the order history (as opposed to updates).

The market exchange updates are regularly received after invoking the hub method: "SubscribeToExchangeDeltas".

I am trying to get the order history via invoking the hub method: "QueryExchangeState".

But this does not seem to work and I don't get an error either ... ?

Does anyone have experience with this or has the same problem or knows a nifty trick, please let me know!

The code I am using is like so:

import pprint
from requests import Session  # pip install requests
from signalr import Connection  # pip install signalr-client


def handle_received(*args, **kwargs):

    print('\nreceived')
    print('\nargs:')
    pprint.pprint(args)
    print('\nkwargs:')
    pprint.pprint(kwargs)


def print_error(error):
    print('error: ', error)


def main():
    with Session() as session:
        connection = Connection("https://www.bittrex.com/signalR/", session)
        chat = connection.register_hub('corehub')
        connection.start()

        connection.received += handle_received
        connection.error += print_error

        for market in ["BTC-MEME"]:
            chat.server.invoke('SubscribeToExchangeDeltas', market)
            chat.server.invoke('QueryExchangeState', market)
            pass

        while True:
            connection.wait(1)

if __name__ == "__main__":
    main()
0

So ...it turns out from correspondence with a Bittrex developer that it is currently not possible to get the order history via websockets.

One has to revert to the "normal" public API for this: https://bittrex.com/home/api

  • How far back can you retrieve it via API? – Gaia Jan 15 '18 at 19:18
  • 1
    Using /account/getorderhistory you get the latest 200. For /public/getmarkethistory I don't know, I don't use it. – Ytsen de Boer Jan 16 '18 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.