bmino / binance-triangle-arbitrage

Detect in-market cryptocurrency arbitrage
MIT License
1.07k stars 336 forks source link

Bid depth to shallow explenation #109

Closed cryptotester123 closed 4 years ago

cryptotester123 commented 4 years ago

Hi. This is probably not an issue, but more that i need help understanding. Can you please explain what the different bid depth numbers are? Sometimes i get Bid depth (1) to shallow, and other times Bid depth (3) and Bid depth (4) to shallow.

What does these numbers say? I have set DEPTH.SIZE to 50 in config. Should i change that?

From performance.log file: ["8/17/2020, 1:24:43 PM"] WARN : Bid depth (1) too shallow to convert 24.25 SNX to BNB using SNXBNB ["8/17/2020, 1:24:43 PM"] WARN : Completed 164/165 (99.4%) calculations in 11 ms ["8/17/2020, 1:24:53 PM"] DEBUG: Recent calculations completed in 11 ms ["8/17/2020, 1:25:17 PM"] WARN : Bid depth (3) too shallow to convert 942 ERD to BNB using ERDBNB ["8/17/2020, 1:25:17 PM"] WARN : Completed 164/165 (99.4%) calculations in 10 ms ["8/17/2020, 1:25:19 PM"] WARN : Bid depth (4) too shallow to convert 2571 ERD to BNB using ERDBNB ["8/17/2020, 1:25:19 PM"] WARN : Completed 164/165 (99.4%) calculations in 12 ms

bmino commented 4 years ago

DEPTH.SIZE means the expected number of order book bids and asks to keep track of. In your case, SNXBNB and ERDBNB probably weren't trading very actively and only had a few bids in the order book or potentially were just added back online to active trading status?

cryptotester123 commented 4 years ago

1: So it is better to have a high number of DEPTH.SIZE? 2: Or does it depend on which base coin you have? So should maybe be high on e.g. btc and low on eth?

bmino commented 4 years ago

DEPTH.SIZE will really vary with the size of your investment. If you are receiving errors like Depth size (50) is too small, you need to decrease your investment amount or increase your DEPTH.SIZE.

A higher DEPTH.SIZE will lead to more memory usage and slower calculations so you want to use the lowest value possible

cryptotester123 commented 4 years ago

Thanks for great explenation :)