ivelsantos / cryptor

MIT License
1 stars 0 forks source link

Make trading algos loop concurrently #14

Closed ivelsantos closed 3 weeks ago

ivelsantos commented 3 weeks ago

The trading loop fetch all the algos from the database and then loop over them parsing their code each one at the time:

https://github.com/ivelsantos/cryptor/blob/fdccf3798b4b889fb46519f46d0dbd433845f676/services/trading/trading.go#L23-L38

As with each algo parsing we have multiples network calls, adding more algos should increase the time taken to complete the loop in a linear manner.

Proposed

The loop over the algos should be handle concurrently, decreasing the time taken to complete the loop.