Bittrex websockets: How to get the order history?

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()

Ytsen de Boer

Posted 2017-11-04T12:44:49.437

Reputation: 101

Answers

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

Ytsen de Boer

Posted 2017-11-04T12:44:49.437

Reputation: 101

How far back can you retrieve it via API?Gaia 2018-01-15T19:18:01.277

1Using /account/getorderhistory you get the latest 200. For /public/getmarkethistory I don't know, I don't use it.Ytsen de Boer 2018-01-16T09:32:59.390