Giter VIP home page Giter VIP logo

Comments (9)

slazarov avatar slazarov commented on August 11, 2024

AUTHENTICATE is called from GET_AUTH_CONTENT that’s why it is not recorded. What version number are you using? Post your snippet and logs.

[EDIT]
Of course don't post you keys :).

from python-bittrex-websocket.

hippokylejan avatar hippokylejan commented on August 11, 2024

1.0.6.2
2018-08-29 11:22:23 - bittrex_websocket.websocket_client - INFO - Challenge retrieved. Sending authentication. Awaiting messages...
2018-08-29 11:22:25 - bittrex_websocket.websocket_client - ERROR -
Unhandled Exception = <class 'IndexError'>, Message = .
Auto-reconnection is disabled for unhandled exceptions.
Report to https://github.com/slazarov/python-bittrex-websocket.

from python-bittrex-websocket.

hippokylejan avatar hippokylejan commented on August 11, 2024

the response of authenticate will have 'R' in kwargs whose value is not bool, then it will throw exception in __is_query_invoke function, you have to deal with this.

from python-bittrex-websocket.

hippokylejan avatar hippokylejan commented on August 11, 2024

besides, after i call authenticate, i cannot receive private message

from python-bittrex-websocket.

slazarov avatar slazarov commented on August 11, 2024

Hi, from the short log you have posted I can see that BittrexMethods.GET_AUTH_CONTENT has been authenticated, meaning that all private messages will be send to the private channels as per the code's logic:

hub.client.on(BittrexParameters.BALANCE_DELTA, self._on_private)
hub.client.on(BittrexParameters.ORDER_DELTA, self._on_private)

Furthermore BittrexMethods.AUTHENTICATE is not requested from _is_query_invoke, it's invoked from it. Only BittrexMethods.GET_AUTH_CONTENT passes through it and as I mentioned above, as evident by your log, it has passed successfully.

Anyways, after placing an order I get an output in the following template in def on_private(self, msg):

{
    AccountUuid : Guid,
    Nonce       : int,
    Type        : int,
    Order: 
    {
        Uuid              : guid,
        Id                : long,
        OrderUuid         : guid,
        Exchange          : string,
        OrderType         : string,
        Quantity          : decimal,
        QuantityRemaining : decimal,
        Limit             : decimal,
        CommissionPaid    : decimal,
        Price             : decimal,
        PricePerUnit      : decimal,
        Opened            : date,
        Closed            : date,
        IsOpen            : bool,
        CancelInitiated   : bool,
        ImmediateOrCancel : bool,
        IsConditional     : bool,
        Condition         : string,
        ConditionTarget   : decimal,
        Updated           : date
    }
}

Furthermore, the time gap between the messages is 2 seconds apart which leads me to think that you are making additional subscriptions. Are you using ws.subscribe_to_orderbook as well? If yes, then this is another story and you have to specify that.

I am unable to replicate your exception, unless you paste your code snippet + mention any modifications you have made.

[EDIT]
I meant ws.query_exchange_state instead of ws.subscribe_to_orderbook

from python-bittrex-websocket.

hippokylejan avatar hippokylejan commented on August 11, 2024

oh i see, is that the balance delta only be received after balance changed?

from python-bittrex-websocket.

slazarov avatar slazarov commented on August 11, 2024

Correct, if you want to request a balance snapshot you have to do it through the REST API.

Are you making additional calls?

P.s: the callback is called BALANCE_DELTA for a reason, i.e BALANCE_CHANGES.

from python-bittrex-websocket.

hippokylejan avatar hippokylejan commented on August 11, 2024

i see, thanks a lot!

from python-bittrex-websocket.

KevinTurnbull avatar KevinTurnbull commented on August 11, 2024

I'm not sure I understand how the solution was found here. I am having the same issue as this.

I've called authenticate with my key and secret; if I don't use authenticate (i.e. don't register for information about orders) then I don't get this crash. It also only sometimes crashes like this since it's only an infrequent crash. Thoughts?

  File "/code/market/sockets.py", line 61, in _connection_handler
    self.connection.conn.start()
  File "/usr/local/lib/python3.6/dist-packages/bittrex_websocket/_signalr.py", line 53, in start
    self.queue_handler()
  File "/usr/local/lib/python3.6/dist-packages/bittrex_websocket/_signalr.py", line 64, in queue_handler
    raise self.exception
  File "/usr/local/lib/python3.6/dist-packages/bittrex_websocket/_signalr.py", line 41, in wrapped_listener
    listener()
  File "/usr/local/lib/python3.6/dist-packages/signalr/transports/_ws_transport.py", line 42, in _receive
    self._handle_notification(notification)
  File "/usr/local/lib/python3.6/dist-packages/bittrex_websocket/_signalr.py", line 105, in _handle_notification
    self._connection.received.fire(**data)
  File "/usr/local/lib/python3.6/dist-packages/signalr/events/_events.py", line 15, in fire
    handler(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/bittrex_websocket/websocket_client.py", line 298, in _on_debug
    self._is_query_invoke(kwargs)
  File "/usr/local/lib/python3.6/dist-packages/bittrex_websocket/websocket_client.py", line 302, in _is_query_invoke
    invoke = self.invokes[int(kwargs['I'])]['invoke']
IndexError: list index out of range

list index out of range

from python-bittrex-websocket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.