Closed winChawakorn closed 3 years ago
Hey, glad to see your interest!
I see you've made some code changes too ;)
Obviously, less latency is better. I used to setup with about the same ~30ms of latency detected on startup and set an age threshold of 10ms. Even then, the time it took to execute the trade was around 20ms per execution which ate up too much time imo and I couldn't find a way to reduce that
Thanks for your idea 😃, and wow how many tickers in your white list for detecting 10 ms opportunities? I found only at least 30ms from around 10 white list tickers.
Btw, I heard that AWS has something called direct connect which can reduce the latency to a single digit by making a request direct to another service on AWS without passing the internet. I'll try and raise the PR, if I can make it work.
iiiiiiiiiinteresting, I will look into that as well. First time I'm hearing about that
Hi bmino, first of all great application, but I am new to js so I rewrote it to C# .net core, but the same as the problems here, there is only 1 of the 3 (at best 2) of the 3 that have the same or better odds, (if you have them in your white list - even on AWS Tokyo) but that one with worse odds, i think there is a little error in the program (or it could be in mine too :) but a lot of the time I saw like 0.20$ profit (when trading with startpair USDT), I started to notice that I had always less ETH or less BTC after a trade, so i started to investigate and came to the conclusion that the 0.20 profit like calculated in the calculated/actual was in real -0.45$ instead of the projected 0.20$. You must in fact take the actual.a.spent - actual.a.earned - fees in bnb minus the difference from for example ETH => convert this to USDT and substract that from your 'real profit' => suddenly all my little profits became negative, and sometimes really negative like -0.80$ with like startcapital of 33$, so that's much. I think that's a bug in the program but i don't know for sure as i converted it to .net core code, but i don't see in your code something that converts the negative eth. to the startcoin.
Then another point : I use real-time updates instead of per 100 ms with the websocket function
Individual Symbol Book Ticker Streams
Pushes any update to the best bid or ask's price or quantity in real-time for a specified symbol.
Stream Name:
This pushes the best ask/bid price per 1 ms instead of 100 ms, so I find a lot of arbitrage opps, but still the speed isn't enough to make consistent profit's so I am about to give it up, but first i want to test your program, but this option how would that need to be implemented in here + can you make a function to calculate the max amount over the 3 arbs so that you can make your loop shorter for example if the max bet is 400$ and your balance is for example 50$, start the loop from min_invest = 48.5 to 49.9 (i always take some margin as to not take the real max amount, otherwise you get stuck) PS : I am talking about paralell execution where there is no recalculateTradeLeg after each order...
Hi bmino, first of all great application, but I am new to js so I rewrote it to C# .net core, but the same as the problems here, there is only 1 of the 3 (at best 2) of the 3 that have the same or better odds, (if you have them in your white list - even on AWS Tokyo) but that one with worse odds, i think there is a little error in the program (or it could be in mine too :) but a lot of the time I saw like 0.20$ profit (when trading with startpair USDT), I started to notice that I had always less ETH or less BTC after a trade, so i started to investigate and came to the conclusion that the 0.20 profit like calculated in the calculated/actual was in real -0.45$ instead of the projected 0.20$. You must in fact take the actual.a.spent - actual.a.earned - fees in bnb minus the difference from for example ETH => convert this to USDT and substract that from your 'real profit' => suddenly all my little profits became negative, and sometimes really negative like -0.80$ with like startcapital of 33$, so that's much. I think that's a bug in the program but i don't know for sure as i converted it to .net core code, but i don't see in your code something that converts the negative eth. to the startcoin.
Then another point : I use real-time updates instead of per 100 ms with the websocket function Individual Symbol Book Ticker Streams Pushes any update to the best bid or ask's price or quantity in real-time for a specified symbol. Stream Name: @bookTicker Update Speed: Real-time
This pushes the best ask/bid price per 1 ms instead of 100 ms, so I find a lot of arbitrage opps, but still the speed isn't enough to make consistent profit's so I am about to give it up, but first i want to test your program, but this option how would that need to be implemented in here + can you make a function to calculate the max amount over the 3 arbs so that you can make your loop shorter for example if the max bet is 400$ and your balance is for example 50$, start the loop from min_invest = 48.5 to 49.9 (i always take some margin as to not take the real max amount, otherwise you get stuck) PS : I am talking about paralell execution where there is no recalculateTradeLeg after each order...
@jurgenBE SMART GUY and good eye! I've actually had the suggestion to convert the depth cache engine from depth() to book tickers for exactly that reason but have since moved on to some other things. I would looove to chat on discord! Happy to help your development and trade some ideas. Let's leave this issue for the stated question which can be closed now.
@winChawakorn I looked into direct connection and it applies to business who own an application running in AWS and need to connect to it with less latency at their brick and mortar office. Unfortunately doesn't apply to this use case
Hey bmino you told me to discuss further on discord, I send you a friend request some months ago already : discord name = jurgen_verhasselt#7186
Hi, I'm really interested in your project. I tried it with a server with latency around 20 ms. I think it's pretty fast, but still can't make a profit. It traded 12 times with 1 win and 11 lose.
Do I need to reduce the latency or something? Can you please advice?
This is a lose result with age 39ms, and done trading in 78ms.
30.05868600 USDT -> 30.05496500 USDT (Loss: -0.012379%)