Comments (5)
Hey @FelipeSBonetto and thanks for reporting this issue!
I need a few more details to help you out:
- Can you confirm that authentication works? Are there any errors raised or logged?
- 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.
- 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.
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.
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.
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.
** 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.
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)
- Timeout settings? HOT 1
- Websocket configuration is not restored during reconnect HOT 1
- pip install not newest version HOT 1
- after running for hours the timeout become much HOT 1
- Connection Issue HOT 2
- A proper handling of a Bitfinex-initiated connection closing
- how to reconnect properly HOT 3
- ORDER RELATED API HOT 1
- SUBSCRIPTION TO DATA HOT 1
- authenticated channels HOT 4
- New websocket-client release breaking code HOT 1
- client_tests don't work HOT 8
- problems with reconection HOT 3
- Pypi version 1.2.2 breaks `raise_exception` HOT 3
- websockets reconnecting constantly? HOT 2
- the auth_nonce problem
- fail to run client.py ,help HOT 2
- not responding sometimes
- Upcoming Bitfinex API Update June 2019
- Account channel not updated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from btfxwss.