Closed FeSens closed 7 years ago
I think post requests are done by using the _send_auth_command(self, channel_name, data)
, I'm i right?
But I'm not entirely sure how to request a wallet update, or any other account information.
Hey @FelipeSBonetto !
Firstly, I want to avoid confusion about what's supposed to be going on:
After connecting to the API, you send a single request for account data (which you do with authenticate()
), afterwards, no more requests are sent - that is the nature of a Websocket
connection - you request a channel, and any updates are sent automatically, as the change happens on the server side.
So, there can be two possible explanations:
btfxwss.log
file:import logging
logging.basicConfig(filename="btfxwss.log", level=logging.DEBUG)
wss = BtfxWss(key, secret, log_level=logging.DEBUG)
...
Thanks for reporting and helping out!
Hellow @nlsdfnbch, again thank you for your kind and fast reply :1st_place_medal: Oh, I'm sorry for the confusion I'm new to this web-socket concept. Here is the log, I could spot on the last lines a 'wu' event, is this a wallet update? Even if it is, the client din't show the update on the screen.
Yup, in the line right after it you can see the problem:
ERROR:btfxwss.queue_processor:Channel ID does not have a data handler! ('data', [0, 'wu', ['exchange', 'BCH', 0, 0, None]], 1504114645.7759268)
Hence, we need to implement that. I'll have a look at it!
If I'm not mistaken, the last commit should take care of it. Could you verify that?
It sure did! Blazing fast fix, wallets are updating now. Thanks a lot! Until next time!
Hello, There is a problem with this code:
Actual Results
First loop iteration: Revice correct wallet balance Every other loop iteration, even after the balance change on BitFinex site: "No wallet update recived"
Expected Results
Well, the wallet should receive an update when it is changed
EDIT So, basically no post request is being done to get the new wallet balance. As @nlsdfnbch explained below there is no need to make a post request as the nature of the web-socket is to send updates automatically