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

Do not allow too often orders checking in staggered orders #177

Merged
merged 1 commit into from Jun 4, 2018

Conversation

bitphage
Copy link
Collaborator

@bitphage bitphage commented Jun 3, 2018

On every market update we're getting an event in on_market() callback
inside worker.py which leads to calling
self.workers[worker_name].onMarketUpdate(data) which then calls
Strategy.check_orders() while using staggered oders. This leads to
querying bitshares for each placed order every time market update comes
which may take 3-4 seconds!!!

On active market there are lots of market changes constantly, so the bot
parses new notifications too slow! He just always stays beyond the
actual market. In the active markets like BTS/USD there are lots of
orders happening, but the bot is able to parse only one in 3-4 seconds
(depending on number of orders and lag to the node).

As a quick solution, just limit orders checking rate to once per 5
seconds.

Closes: #169

On every market update we're getting an event in on_market() callback
inside worker.py which leads to calling
self.workers[worker_name].onMarketUpdate(data) which then calls
Strategy.check_orders() while using staggered oders. This leads to
querying bitshares for each placed order every time market update comes
which may take 3-4 seconds!!!

On active market there are lots of market changes constantly, so the bot
parses new notifications too slow! He just always stays beyond the
actual market. In the active markets like BTS/USD there are lots of
orders happening, but the bot is able to parse only one in 3-4 seconds
(depending on number of orders and lag to the node).

As a quick solution, just limit orders checking rate to once per 5
seconds.

Closes: Codaone#169
@MarkoPaasila
Copy link
Collaborator

There is no hurry to check the state, so even reducing it to 1440 minutes would be no problem. That's just an extreme, but signifies that this strategy doesn't depend on speed at all.

@mikakoi mikakoi merged commit 837c477 into Codaone:master Jun 4, 2018
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