Skip to content
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

Key rate not updated sometimes #1505

Open
joekiller opened this issue Feb 28, 2023 · 2 comments
Open

Key rate not updated sometimes #1505

joekiller opened this issue Feb 28, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@joekiller
Copy link
Collaborator

Describe the bug
key/metal ratio is set only at startup if you don't use autokeys or sell keys.

To Reproduce

Steps to reproduce the behavior:

  1. run the bot for a while
  2. key/metal prices update
  3. profit for someone else?

Expected behavior
As a user, I expect the key/metal ratio to be current with announced key/metal prices.

Version:
v5.6.0

@joekiller joekiller added the bug Something isn't working label Feb 28, 2023
@idinium96
Copy link
Member

idinium96 commented Feb 28, 2023

The statement "only at startup" and "don't use autokeys or sell keys" doesn't make sense with the current codes:

if (match === null || match.autoprice || isEnableScrapAdjustmentWithAutoprice) {
// Only update global key rate if key is not in pricelist
// OR if exist, it's autoprice enabled (true)
// OR if Autokeys and Scrap Adjustment enabled, then check whether
// current global key rate are the same as current prices.tf key rate.
// if same, means autopriced and need to update to the latest price
// (and autokeys/scrap adjustment will update key prices after new trade).
// else entirely, key was manually priced and ignore updating global key rate.
this.globalKeyPrices = {
buy: newPrices.buy,
sell: newPrices.sell,
src: this.isUseCustomPricer ? 'customPricer' : 'ptf',
time: data.time
};
}

I am pretty much sure it's something with websocket doesn't have a proper connection and missed the updated price.

@joekiller
Copy link
Collaborator Author

Okay I'll examine the Websocket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants