Giter VIP home page Giter VIP logo

Comments (5)

deepbrook avatar deepbrook commented on August 27, 2024

Hey @FelipeSBonetto and thanks for reporting this issue!
I need a few more details to help you out:

  1. Can you confirm that authentication works? Are there any errors raised or logged?
  2. Confirm that you are receiving data on the other authenticated channels (as a reference, check this file, starting at line 58, to see what private channels you can try polling). If all are empty, there may be something wrong with the authentication.
  3. Could you run the above code with debugging enabled and attach the log file? You just have to add the following lines and it should work:
import logging
logging.basicConfig(filename="btfxwss.log", level=logging.DEBUG)

wss=BtfxWss(key, secret, log_level=logging.DEBUG)
...

from btfxwss.

FeSens avatar FeSens commented on August 27, 2024

I have a sense that I'm doing something fundamentaly wrong, because I can actually see my balance in the log file. Probably I just don't know how to use the functions.

I'll be happy to help you write a documentation for this code.

btfxwss.txt

PS.: I saw in other forks a function to see Bids and Offers out of the Order Book. Have this function become discontinued in recent commits? Why?

Thanks!

from btfxwss.

deepbrook avatar deepbrook commented on August 27, 2024

Hey @FelipeSBonetto ,
So it turns out that I hadn't implemented the _handle_account() method in the main routine of QueueProcessor (#28), which is what you can see in the logs (it logs errors for all messages from channel id 0). I fixed this in my last commit, so give it another try and let me know if this works now - im on vacation atm, and can't verify it myself.

As for the bids and offers:
The client, as it is currently implemented, is just meant to abstract away the process of connecting to the api and receiving the data. That's why all data is provided as it is received via Queue objects. These are accessed via properties or methods of BtfxWss instances.

So, to answer your question: You CAN access this data, but it is raw - meaning that you will have to build an order book yourself if you want to see the current bids and asks, for example.

You can get this data by calling these:

wss = BtfxWss()
wss.books('BTCUSD')  # Returns order book data for BTCUSD

Now that I'm looking at it, it would perhaps be better to make them all available as a property, instead of part method, part property.

As far as documentation goes, sure! Have a look at the code, get familiar with how it works and write away. I'll be happy to answer questions you have.

from btfxwss.

FeSens avatar FeSens commented on August 27, 2024

** EDIT **
wss.wallets.get()
Is returning the correct wallet balance in pull request #30 dev by @alexeykarnachev

Hello @nlsdfnbch, thanks for your reply!

I tried to run this code:
wss.wallets.get()
but got:
_handle_account() missing 1 required positional argument: 'ts'

Not shure if it's a bug or if it's me. Tried to look for some clues on the code but couldn't figure it out

from btfxwss.

deepbrook avatar deepbrook commented on August 27, 2024

That issue should be handled now - PR #30 is now merged into dev, so if you use the dev branch it should now work for you!
I'll update the pypi release once i'm back from vacation.
Thanks for your help!

from btfxwss.

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.