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

Cache whether a coin needs a tag to deposit/withdraw #162

Open
andygoossens opened this issue Feb 15, 2018 · 0 comments
Open

Cache whether a coin needs a tag to deposit/withdraw #162

andygoossens opened this issue Feb 15, 2018 · 0 comments

Comments

@andygoossens
Copy link
Contributor

Since 3cef10f got committed, the bot requests the deposit address of a coin before comparing the coin's order books. This creates an additional HTTP request and this slows down the bot to some degree.

We can probably cache the information whether a coin needs a tag to deposit/withdraw. We could retrieve this information at startup or during some management phase. This information could even be stored in the database.

I don't know whether each coin+exchange combination needs this "requires a tag" flag, or whether this is something coin specific (if exchange A needs it, then assume all exchanges need it)?

FYI: Move the tag check in checkAndTrade() to just below if ( $targetBid->getPrice() <= $sourceAsk->getPrice() ) for an quick optimisation. Comparing both prices is easy and fast, so do that before we do a costly getDepositAddress() call.

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

No branches or pull requests

1 participant