Giter VIP home page Giter VIP logo

Comments (4)

youngkylejan avatar youngkylejan commented on August 11, 2024

no, i do not want a different nounce. i just want although i subscribe these two things, i can still receive update from one thread and the other one will be filtered automatically.

the reason why i want to subscribe_to_orderbook_update and subscribe_to_orderbook at the same time is that:

after i read your souce code on processing the updateExchangeState message. Because you use json structure to store the previous orderbook, when you receive a Type 2 update, you have to use a loop to find the correct index of specific quantity and modify it.

however, in my design, i have another data structure to store the orderbook. i do not need to use a loop to find the correct position to modify the quantity. i can use a price as a key in my data structure, and modify the value directly. in this case, the code efficiency will be improved a lot. Therefore, i want to get the first synced orderbook, and use next orderbook_update message to do the orderbook update process by myself

from python-bittrex-websocket.

slazarov avatar slazarov commented on August 11, 2024

Thanks, I will look into it. I deleted the previous comment because I realized I might have got the wrong idea. Will post back later.

from python-bittrex-websocket.

youngkylejan avatar youngkylejan commented on August 11, 2024

thanks bro! looking forward to your update, keep in touch

from python-bittrex-websocket.

slazarov avatar slazarov commented on August 11, 2024

Let's see if I am understanding you correctly.
With subscribe_to_orderbook you only want to get a synced snapshot, then apply your design logic through subscribe_to_orderbook_update. Since you don't need subscribe_to_orderbook to maintain the order book, you want to discard it?

If that's your line of thought, then the following can be done:

  • call unsubscribe_to_orderbook() which will stop the sync, disable on_orderbook and leave only on_orderbook_update
  • create a new public method to expose the raw queryExchangeState invoke
  • discuss your design logic and implement it if it's more efficient

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.