arbbot icon indicating copy to clipboard operation
arbbot copied to clipboard

Cache whether a coin needs a tag to deposit/withdraw

Open andygoossens opened this issue 8 years ago • 0 comments

Since https://github.com/cryptoeax/arbbot/commit/3cef10f50db2e4592305f6800e870eff571940ae 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.

andygoossens avatar Feb 15 '18 19:02 andygoossens