bloXroute Solana Trader API performance benchmark
The bloXroute Solana Trader API is a comprehensive RESTful API system that aggregates multiple Solana DEX projects, offering traders a competitive advantage in terms of speed. Using the SDK from Jupiter, Solana’s top AMM aggregator, our Trader API provides high-frequency and algorithmic traders with unparalleled performance. The idea behind the joint offering with the Jupiter team was to provide a solution for professional traders that require faster and more accurate solutions vs. the general API provided by Jupiter. Through this benchmark, we demonstrate that the bloXroute Trader API outperforms the general API by delivering market data faster and with greater accuracy.
When deploying trading bots, API system performance is of utmost importance. In this highly competitive environment, even a millisecond-level delay can result in failed trade executions. At bloXroute, we prioritize delivering the highest level of performance in the industry.
In this article, we present a benchmark comparing the latency and performance of the bloXroute Solana Trader API and the general retail API, with a focus on accuracy and speed as key metrics.
See links to each API’s technical document below.
To evaluate the performance of the two APIs, we sought to measure their accuracy and speed.
- Accuracy is crucial for making informed trading decisions, as even the most advanced trading bots rely on precise market data.
- Speed allows traders to stay ahead of the competition, securing better prices and more favorable trading conditions in the highly competitive DeFi market.
To ensure a fair and reliable comparison, we installed both the general API SDK and the bloXroute Trader API SDK on the same local instance. The benchmark was conducted in the eastern United States, utilizing a high-speed internet connection to minimize external factors.
The test script is available for anyone to use. Find the open-source code here.
Conducting the Benchmark
For this benchmark, we selected an inactive trading pair, GOSU — USDC, with a limited liquidity pool. This choice enabled us to manipulate the price during the test. While we made frequent GET PRICE calls to the Jupiter API as per their rate limit (every 500ms), we also subscribed to the bloXroute Trader API to receive live price data, expecting comparable or identical prices from both API endpoints.
The first part of the benchmark focuses on comparing the speed difference between the two APIs. We accomplished this by analyzing the events received from each API endpoint, which included a “slot” field representing the current Solana slot number. By comparing the timestamps of these events, we could calculate the average time difference and determine which API was faster.
In the second part of the benchmark, we initiated a purchase transaction, swapping 25 USDC for GOSU tokens. Given the low liquidity, we expected a noticeable price increase for the GOSU token. We compared the events from both API endpoints to identify which API responded to the price change first.
We ran the tests on multiple different days during different hours and accumulated over five hours of data. The results were collected and analyzed below.
Based on the collected data:
- The bloXroute Trader API delivered 88.2% of the events before the Jupiter API.
- On average, the bloXroute Trader API received events 1621.46ms sooner than the Jupiter API.
These results exclude certain edge cases, which we will discuss in the next section.
A positive value means the event was received first from bloXroute trader API
During some of the comparisons, we observed consistent latency on the part of the Jupiter API, with it lagging behind the bloXroute Trader API by approximately 100 slots (equivalent to 40–60 seconds). These periods of increased latency lasted for about one to five minutes and recurred across multiple tests.
Considering these instances, the bloXroute Trader API could potentially offer a speed advantage of several hundred seconds.
In the accuracy test, we triggered a transaction (marked green in the example below) and recorded the first events from both API endpoints that indicated a price increase for the GOSU token (marked light orange).
Our results show that:
- Both endpoints eventually picked up the transaction and updated the correct price.
- The Jupiter API took an average of 7,706.13ms (ranging from 1,870.91ms to 25,021.11ms) to update to the correct price quote
- The bloXroute Trader API took an average of 3,802.27ms (ranging from 1,004.76ms to 6,575.02ms) to update to the correct price quote.
The data presented above reveals an intriguing situation. It appears that the Jupiter API returned events from multiple instances, some of which were lagging behind others. In the highlighted case, one instance fell approximately 67 slots behind (198486555–198486622). The slow instance provided an incorrect price quote because the trigger transaction occurred in slot 198486610.
We have contacted the Jupiter team and confirmed that they were providing API data using multiple instances to avoid any downtime or loss of synchronization. While this approach may address downtime in synchronization, it could also potentially cause market data accuracy risks for high-frequency traders.
Situations like this commonly won’t affect retail users since Jupiter instances commonly pick up in a few or tens of seconds. This does remind us again of the importance of setting a reasonable slippage when doing a swap transaction.
In conclusion, both Jupiter’s native API and bloXroute’s Solana Trader API offer convenient access to Jupiter’s AMM aggregator DEX project with reliable system stability. Jupiter native API is meant more for retail traders with access to wallets etc. Trader API is intended for professional traders running their own bot and offers accuracy and speed that outperformed Jupiter’s native API.
Both APIs demonstrated the ability to provide the most up-to-date prices without any observed downtime during our tests. On average, the bloXroute Solana Trader API updated prices 3,903.86ms faster than the native Jupiter API and delivered events with the same slot number 1,621.46ms faster. The dedicated Solana node infrastructure of the bloXroute Trader API contributes to its superior performance and stability, as shown by the reduced occurrence of edge cases in comparison to the Jupiter API.
While a few seconds of latency may not impact the success of a retail trading strategy, bloXroute’s Trader API offers a significant performance advantage to traders deploying high-frequency algorithmic trading bots.
We encourage traders to conduct their own benchmarks using the bloXroute Solana Trader API.