Algorithmic Trading with bloXroute
by bloXroute Labs Co-Founder & COO Eyal Markovich
In Algorithmic Trading, speed is critical for success. Traders must optimize and reduce the latency of both hearing about important transactions and submitting transactions to mining pools. Following the guidelines below, bloXroute users can receive the greatest performance from the BDN and get an advantage over competitors.
Algorithmic Trading is usually a bot responding to a transaction (trigger transaction). In this case, there are two main unknowns:
- Origin of the trigger transaction: The trigger transaction could have been created anywhere in the world.
- Mining pool location: The node mining the block that contains the trigger transaction can be located anywhere in the world. There are many pools, and almost all of them are running several nodes in various geographies.
A trader needs to minimize the duration between the time the trigger transaction was sent and the time mining pools hear about her/his response transaction. Traders can control the location and number of their bots — the more trading bots they own, the faster they can hear about transactions. This, however, adds up in terms of operational costs and becomes an optimization problem of how to minimize the time while keeping costs low.
General Guidelines for Increasing Performance
- Run bots from multiple regions around the world.
- Stay as close as possible to the public BDN infrastructure (US East, London, Beijing, Hangzhou, and Singapore).
- Use the Get Closer to the BDN program to rent a Private Relay located nearby your bots location if your bots are located in regions far from the public BDN infrastructure. This program gives users an advantage when the trigger transaction is first identified in locations such as US West, Japan, Southeastern China, etc.
- Use the bloXroute Enterprise plan to utilize a shared Private Link to mainland China (see BDN Latencies).
How to Speed Up Trigger Transactions Discovery
- Run a Gateway for each of your nodes (requires a Professional or Enterprise plan).
- Use bloXroute’s newTxs Stream and perform applicable validation within your application.
- Use multiple sources for streaming transactions to your bots, i.e., use both the Gateway and the Cloud-API.
How to Speed Up Transaction Delivery to Mining Pools
- Use multiple endpoint targets, i.e., your bots should submit transactions to both the Gateway and the Cloud-API.
- Use a Websocket connection with the Gateway-API and Cloud-API.