Building a Small Rust Tool for Arbitrage

Over the last few weeks I’ve been working on a small Rust application for one purpose: figuring out whether an arbitrage trade is actually worth taking.

A price difference between two exchanges doesn’t mean much by itself.

Once you account for the order book, bid/ask spread, trading fees and slippage, a lot of those “opportunities” disappear.

The tool connects to multiple exchanges, keeps their order books updated in real time, and calculates the expected execution cost for both legs of the trade.

  • Live order book monitoring
  • Bid/ask spread calculation
  • Trading fee estimation
  • Execution cost analysis
  • Net spread after costs

I’m using Rust, Axum, and WebSockets because I want something lightweight that can process updates with very little overhead.

It doesn’t place orders.

It doesn’t try to predict the market.

It simply tells me whether the numbers still make sense after all execution costs are included.

Next step is connecting it to my funding rate arbitrage engine so I can ignore trades that look profitable on paper but disappear once real execution costs are considered.

Leave a Reply

Your email address will not be published. Required fields are marked *