Skip to content

How it work

世外桃源 KPT-D edited this page Mar 24, 2018 · 3 revisions
  1. Every seconds, profitlocks stream quotes from exchanges.
  2. Filters out quotes that are not usable for arbitrage. For example, if maxShortPosition config is 0 and the current position is 0 for a broker, the ask quotes for the broker will be filtered out.
  3. Calculates the best ask and the best bid from the filtered quotes and checks if the expected profit is larger than the configured minimum value, PROFIT_SUM . If there is no arbitrage opportunity, profitlocks waits for the next iteration.
  4. profitlocks concurrently sends a buy leg and a sell leg to each broker that offered the best bid or the best ask.
  5. profitlocks checks whether the legs are filled or not for the configured period, say 30 seconds.
  6. If the both legs are filled, shows the profit.
Clone this wiki locally