Posted on Leave a comment

Does crypto arbitrage with bots work?

crypto arbitrage haasbot

Crypto arbitrage as a automated trading strategy?

If you’re at all familiar with the stock market as you are with cryptocurrency, then you’ve more than likely heard of crypto arbitrage trading. You might even know that it can be a lucrative part of savvy crypto investor’s strategies, or may have even used it yourself in the past and been burned.

Financial markets are fast-paced, global, and constantly pushing creative traders to find any advantage they can when it comes to turning a profit on their investments. One way to do that is by applying the concept of arbitrage to the world of cryptocurrency trading.

In this primer, we’ll go over what exactly arbitrage is, why it can be a successful strategy in the cryptocurrency market, and how you can utilize it yourself with a HaasBot.

See the bot in action

What is Cryptocurrency Arbitrage?

As we covered in a previous post, arbitrage is the strategic practice of using price discrepancies in the market to one’s advantage by simultaneously buying and selling an asset in two different exchange locations. If a trader buys stock in a widget company going for $45.48 USD on the New York Stock Exchange (NYSE), and sees the same stock being sold on the Japan stock exchange for the equivalent of $46.00 USD, they can sell off those assets and make a profit of .52 per stock.

The same thing can be done with cryptocurrencies.

The cryptocurrency markets are much more volatile and abundant than the fiat markets, meaning there are more possibilities for wide discrepancies in value between cryptocurrency exchanges and thus creating opportunities to generate profitable trades.

A particular crypto coin might have a value of .45 Bitcoin (BTC) on Bittrex and .5 BTC on Binance; whoever bought and sold that coin could make a profit and keep making it until the market equalized or they ran out of their holdings of that particular coin.

The global nature of cryptocurrency trading, the current lack of regulation in the market, and the volatility in the value of certain coins make cryptocurrency trading a perfect opportunity for traders looking for cryptocurrency arbitrage opportunities.

There are five basic steps to determining an arbitrage path opportunity in the market:

  1. Collect order book data on each exchange for certain assets you would like to evaluate for arbitrage.
  2. Examine the buy and ask prices on each exchange for the asset or assets in question to see if you can find an overlap.
  3. Sell that asset or assets on the exchange where the price is higher and buy where the price is lower, as close to simultaneously as possible.
  4. Continue to buy where the asset is low and sell where it’s high until you consume the order book.
  5. Once the entire opportunity has been used up, stop buying and selling that asset.

There are 20 major fiat stock exchanges around the world. As of this writing, there are over 200 cryptocurrency exchanges and HaasOnline supports 25 of the biggest exchanges. Different countries have different regulatory environments and restrictions, which can affect price enormously, leaving them wide open to arbitrage strategies, including inter-exchange arbitrage.

Triangular Arbitrage

What we just described above is known as simple arbitrage: you buy one asset for lower and sell it for higher on a different exchange. But there’s another, more complicated kind of strategy called triangular arbitrage. This variation is commonly used in foreign exchange (forex) trading in fiat currency markets, and in some cases can be applied to cryptocurrency.

This strategy can happen either on a single exchange or across multiple exchanges when a price discrepancy between three different cryptocurrencies creates an opportunity. Moving through those three assets in a cycle can turn a profit when executed under ideal circumstances.

Say for example that the ETH to BTC exchange rate is favorable, and a trader has BTC to sell. They could trade their BTC for an intermediary cryptocurrency like Litecoin (LTC), then trade the LTC for ETH, then trade the ETH back to BTC for a net profit.

There are four steps to this strategy:

  1. Start with a single asset you want to increase in value. This will be the one you return to at the end of the cycle. We’ll use BTC as an example here.
  2. Trade that asset for one connected to both your original asset (BTC) and the next asset in the cycle, say BTC for Litecoin (LTC).
  3. Next, trade that asset for a third asset with connections to the first (BTC) and the one you’re currently trading (LTC). We’ll trade our LTC for ETH in this example.
  4. Convert the third currency (ETH) back to the original asset (BTC) at a favorable exchange rate.

We used LTC here because BTC could be traded for it, and it could be traded in turn for ETH. Once we traded the LTC for ETH, the ETH could be traded again for our original asset, BTC. All three trading pairs existed on that exchange, so we could take advantage of those trades. Because of the differences in buy/ask prices between those assets, we end up making a net profit and increasing BTC holdings.

Because the trader ultimately ends up increasing their original asset holdings, this is considered a low-risk strategy. In the forex world, these opportunities don’t last very long, but in the cryptocurrency market, exchange rates can vary widely and aren’t always updated as quickly as they are on traditional platforms. That means more opportunities that can also last longer. However, it should also be noted that settlement and trade execution times vary widely from exchange to exchange so you need to do due diligence in order to prevent opening yourself up to unforeseen risk.

How HaasOnline’s Technology Can Help

With hundreds of exchanges operating worldwide, constantly monitoring the cryptocurrency market for opportunities can be taxing. You could end up spending most of your time just looking for a path of opportunities and end up missing out on short-lived opportunities instead of turning a profit. That’s why some people choose to use crypto arbitrage bots.

Trading bots are faster at scanning the market for discrepancies and executing your strategy on the identified path than is humanly possible, and speed is key when it comes to this trading strategy. Our software never needs to rest or take breaks the way we all do, so your bots can be scanning the market, executing trades, and generating profitable trades while you sleep or manage other daily chores.

The Takeaway

Arbitrage could be a useful trading strategy for experienced traders when executed on a single exchange or across multiple exchanges, in a wide-array of market conditions. It’s a relatively low-risk strategy for the experienced trader, but not entirely riskless; if you’re trading manually and don’t sell your assets quickly enough, you could be stuck holding bags with undervalued or toxic assets you didn’t want to long.

A couple ways to improve your results are to make sure you have the best connection to your desired exchange(s) on a high-performance machine with a stable broadband connection (or better). Make sure to calculate the average settlement time between exchanges to ensure you know how long it will take to manually settle your balances.

If you do it right, especially with the use of our trade automation either through our custom trade bots or by developing your own HaasScript, you do stand to make profitable trades.

Posted on

How to set up your crypto arbitrage bot with HaasOnline TradeServer

how to setup crypto arbitrage bot

What is a crypto arbitrage bot?

A crypto arbitrage bot is a tool you will use that executes a series of predefined instructions based on your user-defined settings. Our custom and trade bots can vary widely in performance and complexity, but the basic premise is the same — the bots will try to take advantage of price spread discrepancies between crypto pairs on select exchanges where the opportunity has been identified.

We’ve previously written about crypto arbitrage in a prior published article, which will give you a much greater detail into the background of this proven trading strategy.

What are the different types of crypto arbitrage bots?

Inter-exchange arbitrage

Our crypto arbitrage bots typically take advantage of market discrepancies between crypto pairs on different exchanges. An oversimplified example of this strategy would be buying Bitcoin ($BTC) from Bittrex and selling it for profit on Binance. The basic arbitrage strategy generates profits from price differences between the exchanges that have been identified to have profitable arbitrage paths. Historically, these inefficiencies have proven to be significant when identified and executed on quickly.

Intra-exchange or triangular arbitrage

There’s another variation of crypto arbitraging, which is it’s riskier cousin commonly known as triangular arbitraging. With this strategy you would buy three different digital assets on the same exchange. For example you might buy 0.5 BTC, exchange that for 50 ETH, and then finally exchange that for USDT and net a profit. There’s quite a lot more moving parts, however when designed, tested, and executed properly has the potential to generate profitable trades.

Configuring your bots to execute crypto arbitrage

Using our legacy crypto arbitrage bots

legacy crypto arbitrage bot

Our legacy trading bot framework is a great choice if you’re looking for the simplicity of having a pre-defined configurable setting. This is a great way to start to familizare yourself with our crypto arbitrage bot as you can backtest with historical data or deploy it with all your selected exchanges in real-time with simulated trading.

  1. Login into your HaasOnline Trade Server instance
  2. Navigate to “Custom Bots” from the left-hand menu
  3. Click on the “+” icon to add a new trade bot
    1. Select “Inter-Exchange Arbitrage Bot” from the drop menu
    2. Give it a unique name
    3. Select the simulated or live exchange to use with this arbitrage bot
    4. Click “Add Bot”
    5. Select your desired order type
    6. Configure your primary market first
    7. Configure your secondary market
    8. Define your arbitrage options and trade setting
    9. Click “Save”
  4. You’ve created your very own crypto arbitrage bot. Now use the options section to backtest and run simulated trades and fully test with your current settings.

Using our next generation crypto arbitrage bots running on HaasScript

haasscript crypto arbitrage bot

Since our updated trading scripts are built with HaasScript you can not only view the code for the bot, but also modify everything within it. This means you can add extra validation, triggers, delay, alerts, and much more.

  1. Login into your HaasOnline Trade Server instance
  2. Navigate to “Haas Bots” from the left-hand menu
  3. Click on the “Add bot” button to add a new trade bot
  4. Give your trading bot a unique name
  5. Search “Arbitrage” in the script library
  6. Select the “Original HaasOnline Arbitrage Bot”
  7. Similar to our legacy arbitrage bot, you will need to configure your primary market and desired crypto pair
    1. You will need to define your interval, which is the time in-between chart price checks the script will use
    2. Enter the amount you want to use with this trade bot
    3. Select your specific order type
    4. Define a fee percentage to use with backtests and simulation
    5. Set the max position you want your arbitrage bot to use
    6. Specify whether this bot should only execute one way
  8. As always backtest and test your arbitrage bot with simulated trading to iron out any bugs
  9. If you want to modify the script head over to the “Script Editor” in the left-hand menu, make your changes, and retest.

Risk to consider and avoid when possible

Settlement times

It is important to know the average settlement time for each of the selected exchanges you are using with your arbitrage strategy. This will help with execution of your identified opportunities, rebalance your exchange wallets, and help buffer for when markets have higher than normal traffic.

Fees

Fees can quickly eat up your profit margins and should be one of the first things taken into account while developing a successful crypto arbitrage strategy. These fees should include withdrawal, network, maker, taker, and any other fees the exchange may impose. If your active strategy does not take into account fees, you will quickly degrade the performance of your arbitrage bot.

Market liquidity

If you’ve identified an opportunity and the crypto pair is on an exchange with low liquidity, you won’t be able to enter or exit positions fast enough to take advantage of the spread. It’s important to thoroughly vet your active exchanges. Use could also create a HaasScript powered arbitrage bot and add in extra checks for exchange volume or other insurances.

Broadband connectivity issues

More often than not your residential broadband connections will experience intermittent outages or spikes in latency. This is why we recommend using a virtual private server that is geolocated as close as possible to the known locations of your exchanges.

Hardware or software issues

Using hardware that’s not meant to be put through constant stress and combined with poor conditions like heating or running several high-intensity applications in parallel will drastically degrade our automated trading engines ability to perform at peak performance.

Final thoughts on using arbitraging strategies

While this trading strategy has been popular and reliable with traditional markets like Forex, it’s still extremely risky with cryptocurrency due to a combination of the risks mentioned above. Make sure you’ve done your due diligence and understand how this strategy works as well as understand the intricacies of how HaasOnline Trade Server will execute your crypto arbitrage strategy.

Posted on

Everything You Need to Know About Cryptocurrency Arbitrage

Guide to Cryptocurrency Arbitrage

All traders — whether in equities or cryptocurrencies — want any edge they can get in their quest for profits. Skillful use of arbitrage is a more advanced skill, but is one of the most tried and true techniques for making money in bull, bear and sideways markets.

To help you better understand how it works, let’s take a closer look at the concept of crypto arbitrage, and some possible strategies to pursue when applying it.

Read More →