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

Performance problem it takes 525448.93998 ms to finish #37

Open
engAhmad opened this issue Feb 19, 2021 · 4 comments
Open

Performance problem it takes 525448.93998 ms to finish #37

engAhmad opened this issue Feb 19, 2021 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@engAhmad
Copy link
Contributor

engAhmad commented Feb 19, 2021

Performance:
This comes due to the limitation of the bittrex api. It only allows ~60requests per minute. So we have some manual wait time between requests to not get blocked.
Sadly this results in the long total amount. We could see which requests we can omit to speed things up. But for now I don't know which.

Stopping buying new coins:
Maybe there isn't any viable option for buying currently? Adding those shouldn't general break the evaluation of other options.
I'll improve the logging to reflect this behavior. Would you mind opening an issue for that?

Originally posted by @saschb2b in #33 (reply in thread)

Call Limits
The Bittrex API employs call limits on all REST endpoints to ensure the efficiency and availability of the platform for all customers. Limits are set such that they should not interfere with legitimate usage patterns. Frequent polling for updates on market data, order status, history, etc. is discouraged and will likely result in your requests failing with a 429 status code. If you need frequent updates, subscribe to the websocket instead of polling. Frivolous order placement and cancellation in a tight loop with low fill rates is also discouraged.

https://bittrex.github.io/api/v3

@engAhmad engAhmad changed the title Performance: Performance problem it takes 525448.93998 ms to finish Feb 19, 2021
@saschb2b
Copy link
Member

Switching to sockets is a great idea! Will see what their api offers on that connection.
Additionally I noticied we currently iterate over several "dust" balances in our portfolio.
We can (let's see how) detect and skip them to get an additonal boost

@saschb2b saschb2b added this to the 2021.2.0 milestone Feb 20, 2021
@saschb2b saschb2b linked a pull request Feb 20, 2021 that will close this issue
@engAhmad
Copy link
Contributor Author

engAhmad commented Feb 21, 2021

Additionally I noticied we currently iterate over several "dust" balances in our portfolio.
We can (let's see how) detect and skip them to get an additonal boost .

What do you mean "dust” ,

the trade remaining ? Or unprofitable coins ?

Btw i created slack channel and invited you if you wish for better communication , brainstorming, etc
welcome to join

@saschb2b
Copy link
Member

Thanks for the invite, joined!

Dust are all assets that are in your portfolio but only worth a few bucks. Like 0.24$ of Digibyte.
Currently the bot sees it and thinks "Well we still got some, so I don't need to buy more" or it tries to sell it due to bad EMA but can't due to minimum trading rate being greater of what you hold.
I had like 4-5 dust assets that "blocked" further transactions. But corrected them manually now.
I think with the current implementation we shouldn't get any more dust coins as we use fill_or_kill for selling. So there is no "partially sold" assets
Tldr: Fixed it manually and we shouldn't care about it anyway I think

@engAhmad
Copy link
Contributor Author

Regrading to Dust Coins issue ,
i think simply sell them if they under certain amount specified by the user e.g. under 0.5 USDT if this value not reach minimum trading rate so the bot should buy some to reach the trading rate then sell them

@saschb2b saschb2b modified the milestones: 2021.2.0, 2021.2.1 Feb 23, 2021
@saschb2b saschb2b added the help wanted Extra attention is needed label Mar 6, 2021
@saschb2b saschb2b removed a link to a pull request Mar 23, 2021
@saschb2b saschb2b removed this from the 2021.3.0 milestone Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants