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

Calculate min/max usd btc values with btb database #230

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ullasbharadwaj
Copy link
Contributor

I would suggest to calculate min/max USD/BTC from Coin Value table. This allows fair and true calculation irrespective of number of bots running on a single binance account.

@titulebolide
Copy link
Collaborator

I didn't knew such table did exited. At what frequency the table is updated?

@MasaiasuOse
Copy link
Contributor

MasaiasuOse commented Jan 13, 2022

We could run in a issue with that table. The values are set as hourly, daily and weekly entries. The hourly entry is keeps for 24 hours, daily for 28 days and weekly forever.
Oh and I forgot to mention that the tntwist fork doesn't store that long. Only for an hour

@titulebolide
Copy link
Collaborator

Ho so it's not ideal you mean ?
So we have to chose whether we stick with reports or wheter we go for tables.
IMO cases like @ullasbharadwaj where two bots share the same coin is highly improbable

@titulebolide titulebolide changed the title fix min/max usd btc values Calculate min/max usd btc values with btb database Jan 13, 2022
@MasaiasuOse
Copy link
Contributor

I think nothing is really ideal, but we can test can test it via paper trading. We have basically 3 kinds of conditions. The report are more or less the same in each fork. edeng/idkravitz/masa forks behaves the same with the tables. The only fork that is different is the tntwist

@ullasbharadwaj
Copy link
Contributor Author

And also I have a suggestion, depending on how often reports are updated, you can add the minUSD and maxUSD calculation from the DB to the report itself alongside total_usdt. That would negate the purge of DB hourly and weekly. Wouldn't this be ideal solution?

@titulebolide
Copy link
Collaborator

That's not a bad idea at all

@ullasbharadwaj
Copy link
Contributor Author

And how easy/difficult is it to do so? Too much overhead in calculation times? Right now, how often you generate reports? (I will go through the report code when I get time, so I can avoid above questions next time :-p)

@titulebolide
Copy link
Collaborator

the reports are generated every hour. it takes the balance of every coin in the coin list , and the price of every coin in the list + BTC
The usdt_total value is calculated with

@MasaiasuOse
Copy link
Contributor

I think it's enough to calculate the min/max USD every hour

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants