what is your suggestion for a crypto arbitrage system that connects with several crypto exchangers?

Yashar Seyyedin  

Hello everyone.

Do you think python is good enough for this purpose?

Lorentzos Roussos  
Will it use exchanges APIs or will it go into DEXs too with a wallet? (eth evm etc)
Yashar Seyyedin  
Lorentzos Roussos #:
Will it use exchanges APIs or will it go into DEXs too with a wallet? (eth evm etc)
Exchange API logical. Isn't it?
I would like to hear your idea in case we go into dex option.

Lorentzos Roussos  
Yashar Seyyedin #:
Exchange API logical. Isn't it?
I would like to hear your idea in case we go into dex option.

Ow , well you could use mql5 too for APIs , plus , built in chart stuff .

Node.js for the Dex option unless someone ports a web3 library on mql5 

You probably have seen this dude :

you can also test stuff with a js script in notepad , and run it as a website .(for the Binance Smart Chain)

Here is a simple example from 2 years ago thought that reads dogecoin on bsc (bep-20 token)

<!DOCTYPE>
<html>
<head>
<style>
input.address,input.address_valid,input.address_invalid
{
background-color:rgb(200,200,230);
border-color:rgb(140,140,200);
border-radius:5px 5px 5px 5px;
border-style:solid;
width:80%;
height:2em;
}
input.address_valid
{
border-color:rgb(50,150,50);
background-color:rgb(100,255,100);
}
input.address_invalid
{
border-color:rgb(150,50,50);
background-color:rgb(255,100,100);
}
input.navegante_button
{
border-style:solid;
border-color:rgb(150,150,50);
background-color:rgb(190,190,90);
border-radius:5px 5px 5px 5px;
width:10%;
height:2em;
}
input.navegante_button:hover{background-color:rgb(210,210,110);border-color:rgb(160,160,60);}
textarea.navegante_results
{
background-color:rgb(160,210,100);
border-color:rgb(100,160,50);
width:90%;
resize:none;

}
</style>
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>
<script type="text/javascript">
var bsc="https://bsc-dataseed.binance.org";
var baseABI=[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}];
var web3=null,working_contract=null,working_token_address=null;
var resultRows=0;
//check the validity of an address ,return t/f , and style accordingly
function CheckAddressValidity(element){
if(element.value.length==42){
element.classList.remove("address");
element.classList.remove("address_invalid");
element.classList.add("address_valid");
return(true);
}
console.log("Invalid");
element.classList.remove("address");
element.classList.remove("address_valid");
element.classList.add("address_invalid");
return(false);
}
//check textarea height
function reHeight(element,rows){
if(element!=null){
rows++;
element.style.height=(rows*2).toString()+"em";
return(rows);
}}
function updateResultsTextarea(element,results_text,rows){
element.innerHTML=results_text;rows=reHeight(element,rows);
return(rows);
}
//get BEP20 Token Basics
async function getTokenBasics(id_of_response_textarea,id_of_token_address_input){
//if token address input valid 
  var inpElement=document.getElementById(id_of_token_address_input);
  var resElement=document.getElementById(id_of_response_textarea);
  //normal operation
  if(inpElement!=null&&resElement!=null){
  //check if the address is valid - for now the draft version is if its 42 characters long (string)
  //there should be a more robust way -will investigate
    //valid token address length wise
          if(CheckAddressValidity(inpElement))
          {
          //check basics (web3)
            if(web3==null)
                {
                web3=new Web3(bsc);
                if(web3==null){alert("Web3 Null");}
                }
      //using standard erc20/bep20 abi for getting info
            if(web3!=null){
            working_token_address=inpElement.value;
                working_contract=new web3.eth.Contract(baseABI,working_token_address);
                if(working_contract==null){alert("Null Contract");}
                else{
                                
                var okay=false;
                var transport=null,transport_error=null;
                resultRows=0;
            var results="Contract : "+working_token_address+"\n";
                //NAME
                try{okay=true;transport=await working_contract.methods.name().call();}catch(e){console.log("E=>"+e);okay=false;}
        if(okay){results+="Name : "+transport;resElement.innerHTML=results;resultRows=reHeight(resElement,resultRows);}
        //SYMBOL
        try{okay=true;transport=await working_contract.methods.symbol().call();}catch(e){console.log("E=>"+e);okay=false;}
        if(okay){results+="\nSymbol : "+transport;resElement.innerHTML=results;resultRows=reHeight(resElement,resultRows);}     
                //DECIMALS
                try{okay=true;transport=await working_contract.methods.decimals().call();}catch(e){console.log("E=>"+e);okay=false;}
                if(okay){results+="\nDecimals : "+transport;resElement.innerHTML=results;resultRows=reHeight(resElement,resultRows);}
                //TOTAL SUPPLY
                try{okay=true;transport=await working_contract.methods.totalSupply().call();}catch(e){console.log("E=>"+e);okay=false;}
                if(okay){results+="\nTotal Supply : "+transport;resElement.innerHTML=results;resultRows=reHeight(resElement,resultRows);}
                //OWNER
                var haveOwner=false;
                try{okay=true;haveOwner=true;transport=await working_contract.methods.owner().call();}catch(e){console.log("E=>"+e);okay=false;haveOwner=false;}
                if(okay){results+="\nOwner : "+transport;resElement.innerHTML=results;resultRows=reHeight(resElement,resultRows);}
                //GET OWNER
                if(!haveOwner){
                try{okay=true;haveOwner=true;transport=await working_contract.methods.getOwner().call();}catch(e){console.log("E=>"+e);okay=false;haveOwner=false;}
                if(okay){results+="\nOwner : "+transport;resElement.innerHTML=results;resultRows=reHeight(resElement,resultRows);}}
                //_OWNER
                if(!haveOwner){
                try{okay=true;haveOwner=true;transport=await working_contract.methods._owner().call();}catch(e){console.log("E=>"+e);okay=false;haveOwner=false;}
                if(okay){results+="\nOwner : "+transport;resElement.innerHTML=results;resultRows=reHeight(resElement,resultRows);}}

                }}
          }else {alert("Invalid Address Length");}//invalid token address length wise 
        
  }
  //errors in ids of elements 
  else{
  var errmsg="error : ";
  if(inpElement==null){errmsg+=" Invalid Input Element ID //";}
  if(resElement==null){errmsg+=" Invalid Result Element ID //";}
  alert(errmsg);
  }
return(false);  
}
</script>
</head>
<body>
<h1>navegante:token_basics</h1><hr>
<span>
Enter Token Address : <br>
<input class="address" type="input" id="tokenAddress" value="0xba2ae424d960c26247dd6c32edc70b295c744c43" onchange="CheckAddressValidity(this)"/>
<input class="navegante_button" type="button" id="tokenRead" value="read" onclick="getTokenBasics('resultsLog','tokenAddress')"/>
</span><br><hr>
<span>
Response: <br>
<textarea readonly="true" wrap="off" class="navegante_results" id="resultsLog"></textarea>
</span><br><hr>
</body>
</html>

and the token bscscan page : https://bscscan.com/token/0xba2ae424d960c26247dd6c32edc70b295c744c43

Yashar Seyyedin  
Lorentzos Roussos #:

Ow , well you could use mql5 too for APIs , plus , built in chart stuff .

Node.js for the Dex option unless someone ports a web3 library on mql5 

You probably have seen this dude :

you can also test stuff with a js script in notepad , and run it as a website .(for the Binance Smart Chain)

Here is a simple example from 2 years ago thought that reads dogecoin on bsc (bep-20 token)

and the token bscscan page : https://bscscan.com/token/0xba2ae424d960c26247dd6c32edc70b295c744c43

Thanks. Appreciate your help. Will check them out.

Dominik Christian Egert  
From some experience:

It is not as easy as you think.

For my system to work, a few prerequisites are needed.

All exchange accounts need funding.

Fund transfer between exchanges must be as cheap as possible.

These two criteria defined my base-currency to use for all calculations.

Execution on all exchanges need to take place as timely as possible.

You need rebalancing cycles for your accounts.

When selecting a pair, you need to have balance in both currencies to work with.

Example (with only two exchanges)

Ex A BTC-XRB is in favour to BTC, you sell BTC on A.

On Ex B you buy back the same amount of BTC with XRP.

So in this case you need both exchanges with both BTC and XRP. As soon as Ex A favors XRP, you go the other way around.

If that doesn't happen, you might enter the rebalance cycle, so you transfer XRP, or whatever your base currency might be, between the exchanges.

This means, you need to take into account the volatility of your chosen Base Currency.

You will quickly understand why your base currency is the root if your success.

While you might be able to have an asynchronous rebalance cycle, you will notice a lot of cash is needed to be profitable. The margins / gains are small (nowadays) and most of your profits will go to fees.

I was able to pull about 3 to 5% per month in times before 2017...

Today, you will need more cash and most exchanges arbitrage triangles are small.

Another issue is the execution on these exchanges. Although they might be better today, compared to back then, you have a fee on every order. The spread between your exchanges meeds to be significant enough to compensate for 2x fee and 2x withdrawal, plus 2x fee to your base currency, plus fee on the block chain, plus eventual price moves while rebalancing your accounts.

This narrows down your choice on which symbols you would trade quite a lot.

My honest opinion, it's not worth it.

Try it with a Google calc sheet. Pull current quotes and let the sheet show you how it works out.

Not only will it be a ton of work to make it happen, but the outcome is not as exciting as anticipated.

Not to mention all the technical risk and error sources on the way.

But if you want to go for it anyways, monitor more exchanges, have more accounts. You will see it happens often, but only for very short moments. If you will get filled at the price you want is another question. But here you could use the order book maybe, to get an advantage.

I shut down my system in 2018, its risk/reward was way to high for my understanding.

To put this into perspective with some numbers. I had 5 exchanges, each with about 10k$ fed. And I was able to pull on average 3.4% of a third of the capital at play per month.

The outcome were about 530$ monthly for staking 50k.

One third was in transit and the other third was held for taking opportunities. The third that made money was waiting for the transfered cycle.

Not pretty, as I had to pay hosting and my work time from these 500 bucks... In the end it was a self containing system, leaving me with an apple a week for eating, and working all weekend and evenings in weekdays.

That's my experience with arbitrage on crypto exchanges.

And, no, my system is not working anymore, exchanges have changed since then, it would require a complete redo. Easy a year of work.
Yashar Seyyedin  
Try it with a Google calc sheet. Pull current quotes and let the sheet show you how it works out.


Great suggestion bro.

I agree with you but a customer proposed to do this and I started this thread for more investigation.

Ohene Kofi Akuoku Osei  
My suggestion for a crypto arbitrage system that connects with several crypto exchangers would be to develop an automated, customizable trading bot. Here's a high-level overview of the process:

1. Research: Begin by researching various cryptocurrency exchanges and their APIs to determine which ones will be most suitable for your needs. Focus on exchanges with low fees and high liquidity, as they will offer better arbitrage opportunities.

2. API Integration: Integrate the selected cryptocurrency exchange APIs into your trading bot. This will allow your bot to access real-time market data, place orders, and manage your trading accounts across different exchanges.

3. Arbitrage Strategy: Develop an arbitrage strategy that takes advantage of price discrepancies between exchanges. This could include simple strategies, like buying low on one exchange and selling high on another, or more advanced strategies that incorporate multiple currency pairs and involve triangular or statistical arbitrage.

4. Risk Management: Implement risk management features to protect your capital. This could include setting stop-loss orders, position sizing, and diversification of assets.

5. Automation: Automate your trading bot to continuously monitor the market for arbitrage opportunities and execute trades according to your predefined strategy. Ensure that your bot is capable of adjusting to market conditions and handling high-frequency trading.

6. Performance Monitoring: Continuously monitor your trading bot's performance, and adjust your strategy as necessary. Keep an eye on fees and other costs, as these can erode your arbitrage profits.

7. Security: Ensure that your trading bot and its API connections are secure to protect your funds and sensitive information. Implement strong encryption and utilize best practices for API key management.

Building such a system will require a solid understanding of programming, finance, and cryptocurrency markets. Remember that the crypto market is volatile and unpredictable, so it's important to continuously refine and adjust your strategy to maximize profits while minimizing risks.
Bogdan Ion Puscasu  
  1. API Integration: First, you will need to integrate the APIs of the crypto exchanges you want to trade on. This will allow your app to retrieve real-time market data and execute trades automatically.

  2. Price Analysis: Once you have integrated the APIs, your app will need to analyze the prices of various cryptocurrencies across different exchanges. You can use algorithms to identify price discrepancies and potential arbitrage opportunities.

  3. Risk Management: In any trading activity, it is important to manage risks effectively. Your app should be designed to minimize the risks associated with arbitrage trading, such as slippage and volatility. You can implement various risk management strategies like stop-loss and take-profit orders to ensure that your trades are executed at the best possible prices.

Yashar Seyyedin  
Ohene Kofi Akuoku Osei #:
My suggestion for a crypto arbitrage system that connects with several crypto exchangers would be to develop an automated, customizable trading bot. Here's a high-level overview of the process:

1. Research: Begin by researching various cryptocurrency exchanges and their APIs to determine which ones will be most suitable for your needs. Focus on exchanges with low fees and high liquidity, as they will offer better arbitrage opportunities.

2. API Integration: Integrate the selected cryptocurrency exchange APIs into your trading bot. This will allow your bot to access real-time market data, place orders, and manage your trading accounts across different exchanges.

3. Arbitrage Strategy: Develop an arbitrage strategy that takes advantage of price discrepancies between exchanges. This could include simple strategies, like buying low on one exchange and selling high on another, or more advanced strategies that incorporate multiple currency pairs and involve triangular or statistical arbitrage.

4. Risk Management: Implement risk management features to protect your capital. This could include setting stop-loss orders, position sizing, and diversification of assets.

5. Automation: Automate your trading bot to continuously monitor the market for arbitrage opportunities and execute trades according to your predefined strategy. Ensure that your bot is capable of adjusting to market conditions and handling high-frequency trading.

6. Performance Monitoring: Continuously monitor your trading bot's performance, and adjust your strategy as necessary. Keep an eye on fees and other costs, as these can erode your arbitrage profits.

7. Security: Ensure that your trading bot and its API connections are secure to protect your funds and sensitive information. Implement strong encryption and utilize best practices for API key management.

Building such a system will require a solid understanding of programming, finance, and cryptocurrency markets. Remember that the crypto market is volatile and unpredictable, so it's important to continuously refine and adjust your strategy to maximize profits while minimizing risks.

Thanks for the thorough explanation. 

Yashar Seyyedin  
Bogdan Ion Puscasu #:
  1. API Integration: First, you will need to integrate the APIs of the crypto exchanges you want to trade on. This will allow your app to retrieve real-time market data and execute trades automatically.

  2. Price Analysis: Once you have integrated the APIs, your app will need to analyze the prices of various cryptocurrencies across different exchanges. You can use algorithms to identify price discrepancies and potential arbitrage opportunities.

  3. Risk Management: In any trading activity, it is important to manage risks effectively. Your app should be designed to minimize the risks associated with arbitrage trading, such as slippage and volatility. You can implement various risk management strategies like stop-loss and take-profit orders to ensure that your trades are executed at the best possible prices.

Appreciated!

Reason: