-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emit portfolio
event over WebSocket
#668
Comments
To clarify, the data you send would just be the same data we receive when we manually issue a So something like this: {"queueid":0,"result":{"method":"portfolio","result":"success","kmd_equiv":10,"portfolio":[{"coin":"KMD","address":"<smartaddress>","amount":10,"price":1,"kmd_equiv":10,"perc":100,"goal":0,"goalperc":0,"relvolume":0,"force":0,"balanceA":10,"valuesumA":10,"aliceutil":100,"balanceB":10,"valuesumB":10,"balance":10,"bobutil":100}]}} |
portfolio
event over Websocketportfolio
event over WebSocket
yes. keep in mind portfolio is a very time expensive call. |
I thought |
oh, in that case, nevermind. havent had to fix that part of the code in many months, so forget the details |
i will add a "fast" flag and also whitelist orderbook and portfolio call to achieve a performant solution. you can experiment adding other api calls to the non-queued path by adding a "fast":1 flag and make sure to not have a "queueid" field for anything you want to immediately complete |
pushed a new version to jl777 branch that supports dual command execution paths the rule is if a command has "fast":1 or is orderbook or portfolio, it will run immediately, regardless of what other command is being processed |
Thanks James, will give this a test 👍 |
This appears to be causing stability issues. If we have Are you able to either revert the change that automatically bypasses the queue, or alternatively make sure |
Will try and get a backtrace on my Linux box and get that over to you. |
If I knew why portfolio and orderbook are causing the crash, I might be able to make it safe. I can certainly revert the change, but then we get all the latency issues |
|
this is some memory trashing... not any clues as to why it is crashing. |
Ok, thanks. Do you want me to try and create another backtrace? |
if the latest fix is still crashing, that is bad and could mean something else completely is causing it. certainly a backtrace is always good if it is crashing |
The above issue was caused by the portfolio/orderbook shortcut. Haven't noticed any instability since that has been reverted. |
How difficult would it be for you to emit a
portfolio
event over the WebSocket when the portfolio data changes?I know we discussed previously (#562 (comment)) that for advanced Electrum support we'll need to implement it on our end. However that's a fairly big task and it's not going to be achievable in the timescales we're aiming for for the initial launch of our GUI. At the moment we're just polling mm with the
portfolio
method.I was thinking as a temporary workaround it should fairly simple (I might be wrong here) for you to just emit a
portfolio
event whenever the portfolio values change. You are subscribed to the smart address balances on the mm end so when this changes you should receive an event from the electrum servers.When you receive this event if you could just emit a
portfolio
event over the WebSocket we can listen for this and make sure our GUI balances are always in sync with mm.Would that be something simple for you to implement?
The text was updated successfully, but these errors were encountered: