Why aren't you getting rich with triangular arbitrage, Jow Forums? Do you hate money? Are you too stupid to know how it works? It's easy. Pick an exchange then find a coin that trades with bitcoin and ethereum. Note that since ethereum and bitcoin trade with each other, what you have here is 3 trading pairs that are related to each other in such a way that the price of any of the two pairs implies the price of the third pair. The arbitrage is obvious. If the third pair, e.g., the coin/BTC pair, is in reality trading for lower than the implied price, you buy the coin there, sell it on the, e.g. Ethereum side, then trade the Ethereum back for your bitcoin. When it's over, you have more bitcoin than you started with. It's free money. But you aren't making it. I am disappointed in you.
>t. guy who actually pulls this off regularly despite the naysayers claiming it's impossible
Any arbitrageurs here?
Other urls found in this thread:
>he thinks he can beat the bots the exchanges
hahahhahahaahah oh wow
>the exchanges bots*
Bots are better at this shit than you..margins are razor thin especially when you account for fees. There are better ways to make money trading
Your id is whitegirl. Nice.
>Bots are better at this shit than you..
You don't say :-)
I'll give you an example of one I got earlier so you can actually see how thin those margins are. First I have a few custom settings on my bot so I don't get stuck in something. First setting is if the arbitrage isn't for at least 5% I'm not interested. So earlier I got in some NANO/ETH at 0.0141478, then I sold the NANO to BTC at 0.00048078. I traded that BTC back to ETH and ended up with the equivalent of 0.0157133. The decimals are different since obviously I didn't just buy one NANO but that's the idea. Pocketed a cool 11.06%.
Think about it, somebody has to run the bots. Why not a fellow Jow Forumsraeli? Yes I brag but I'm bored.
>the exchanges bots
Oh, I just noticed this. I considered this issue before I made my own bot so I figured even if I couldn't beat the exchange it would at least be a good learning experience putting all the pieces together. I didn't actually expect it to work. But the damnedest thing is.. it does. And I trade on very high volume well funded exchanges but for some reason they are leaving this money to the traders.
What exchange?
have you accounted USD value?
if the price keeps dropping at some points or rising at others, it ruins your math and you end up with same value at final USD.
You happened to to catch a rising candle at one of the pairs while trading, but give all praise to your math.
You just lying to yourself. You are not a trader.
How can I learn doing this? Do I have to learn C++?
And am I reading you right that you do you do these trades on the very same exchange? I always thought arbitraging, if at all, only worked between different exchanges?
this
It doesnt matter because he got more bit coin
Okex for one. It's the least juiciest so I can give that one away.
>have you accounted USD value?
if the price keeps dropping at some points or rising at others, it ruins your math and you end up with same value at final USD.
>You happened to to catch a rising candle at one of the pairs while trading, but give all praise to your math.
>You just lying to yourself. You are not a trader.
I like your spunk but you misunderstand. You see, the trades are all on the next tick. I download the current state of the exchange continuously and calculate the arbitrage in real time. If the math works out, the bot sends all three orders in consecutively and they are executed on the very next tick. The first order is a so-called Fill-Or-Kill. The exchange checks the order book and if the first order can be filled in its entirety then all the orders go through the next instant before the order books change state. I'm not doing this by hand and the USD vaue is completely irrelevant. My bot sees an opportunity and it executes. From one instant to the next I have more BTC than I had before. Do you understand now?
>C++?
I use Go as it's easy to program in and fast enough for my purposes. Just figure out the api's, figure out the formula and knock yourself out.
Here's something I found a while back that while I don't use it, it did inspire me. It uses the bellman-ford algorithm to walk a graph of every coin on an exchange and since there are more than 2 base pairs, sometimes it finds arbitrage that goes through 4 and 5 pairs in all! Interesting stuff but I wrote my own thing since this is in Python and uses some of its libraries. Everything I have I wrote from scratch.
github.com
so how long did it take you to get 11% ?
To make sure I just fetched the timestamps and all three trades executed at exactly 1548844487313 so the trades were microseconds apart as the resolution of the timestamp is 1 millisecond. That's what it takes to pull this off, by the way.
yeah i know, i program bots aswell, but pretty impossible that there is such a price change within that time m8
you're selling on the second order, not the third?
I made millions on arbitrage
>but pretty impossible that there is such a price change within that time m8
Okay, you write bots so picture this. You have tickers coming in from the api. You're keeping your own order books so what you have and what the exchange has is in sync. A ticker comes in for NANO/BTC with the last, bid, and ask prices. Your bot compares that ask price with the last seen bid price of NANO on the NANO/ETH pair and compares that with the last seen bid price on the ETH/BTC pair. You mash the numbers together and for the present state of these three pairs, there is an arbitrage opportunity which you send in an order for that gets executed on the next tick.
Where in any of this is there a need for a price change "in that time"? You are comparing a single atomic state of the entire exchange order book, not waiting for any changes.
I think I understand why so few people do this now. It's apparently over most folks' head. No offense to you.
You buy on the first, sell on the second, then get your original base coin back on the third which depending on whether it's ethereum or bitcoin you will end up either "selling" or "buying". That last one is a matter of perspective.
I've done well myself!
with a bot? how complex was it? competition must be fiercer now right
good 4 you op
t. codelet
I sincerely doubt op is telling the truth
What exchange doesn't have a algorithm built in that automatically does this with no fees and a speed advantage whenever it becomes possible?
Post a video of you beating an exchange and i'll believe you op other wise you are a liar!!!!!!!! liar!!!!!!!! liar !!!!!!!
I just noticed your question, yes, it is all on the same exchange. Look up triangular arbitrage.
I always thought the same thing until I tried it. I've looked around for explanations and somebody said the exchange doesn't want to interfere with their trading engine by picking up pennies like this. Personally I don't buy that but it's what I've read. I actually procrastinated on the idea for a year before even attempting it I was so convinced it wouldn't work. As far as a video, what would it show? My thing works in a terminal on a VPS and the only output is the word arbitrage with the pairs, the initial price and the percentage. It doesn't even show me the volume as I didn't bother. I get something then I just look at the exchange to see what happened. If I need to drill down, I use the api to get exact timestamps, etc.
You don't have to believe me though. I just thought it'd be an interesting topic to shoot the shit on biz about.
Given that this depends on the exchange having no bot, or a bot significantly worse than yours, it is certain that if you made your exploits public they would improve their bots and fuck you over. The fact that you are here bragging proves you have nothing.
I know the traditional calculation for triangular arbitrage, but not the formula for selling second. Did you find it online? Did you make it yourself? I'm guessing that it's probably the former given forex has been around so long
That's like the old joke about the economist who finds a hundred dollar bill on the sidewalk and refuses to pick it up cuz it's economically irrational to find a hundred dollar bill on the sidewalk.
Here in the real world, not only are there occasional actual big face benjamins laying on the ground but there are a plethora of youtube videos and reddit post about this exact same thing. Have I found a trick? Yep. I can still talk all day about the general concept without revealing what it is.
I worked out the formula myself (it's trivially easy) to make sure I intuitively understood it but, yes, it can be found anywhere on a forex forum.
ok lets make an example, correct me:
the price of nano/btc is $0.874
the price of nano/eth is $0.876
you buy nano/btc and sell nano/eth, 0.23% win.
so you just buy if the gains are more than the fee, thanks to the bot
I'm sure your trick is nice but I doubt you have anything that makes you special, probably not even real fintech experience. Any coder who thought about it could find your "trick", assuming it even exists.
>I cant code
AAAAAAAAAAAAAAAAAAAAAAAAA
FUCK OP FUCK OP FUCK OP!!!!!!!!
Yeah, something like that. Here's an even easier way to figure it out.
(ask NANO/BTC) / (bid NANO/ETH) < bid ETH/BTC
So NANO/BTC ask price is 0.00045146
And NANO/ETH bid price is 0.01399360
Divide 0.00045146 by 0.01399360 and you get 0.03226189.
Since the ask price of ETH/BTC is currently going for 0.03122000, you have no arbitrage. When the Nano number comes up lower than the current ETH/BTC price, accounting for fees, you have one. To do the opposite route, invert the price of ETH/BTC.
>Any coder who thought about it could find your "trick", assuming it even exists.
Knock yourself out, man.
It's easy. You could be up and running with something like Python in a few weeks at most.
Thank you, man. Having responded to all my current questions - could I have your email in case I have any other questions? Kinda like a mentor thing? I.e. if I have a question, you throw me a small hint, and I learn, code and test my ass off?
Or better, I give you mine and you shoot me a mail, so you won't have to publish yours here (as all threads are archived).
so how much btc have you made so far then OP
I got it. I have a protonmail addy I'll shoot you a message from.
>How many BTC have you made?
More than 10 less than 100 and I've been doing it a while. The gains are small for each one but, ahem, you make it up on volume. Get it? Exchange? Volume? wah wah wah wahhhhh
ill try, thanks m8
The only ones who profit from this are the exchanges. Churn like this for long enough and CZ will have all of your money. You probably just heard about arbitrage and have no idea of the real world implications.
>The only ones who profit from this are the exchanges. Churn like this for long enough and CZ will have all of your money. You probably just heard about arbitrage and have no idea of the real world implications.
If I were on the lowest fee tier (I'm not), the most CZ would get would be 0.1% taker fee for each leg of my trade; that's a rough total of 0.3% for the round trip. Good thing I account for that and only attempt trades that, as I mention earlier, guarantee me much more than less than half of 1%.
That would be fucking awesome. I won't disappoint and be lazy. And I'll dedicate all of my NEET time to learn coding, the ins and outs.
ya'll motherfuckers read this cuz it's your lucky day.
four letters: ARCT
this shitcoin got me ton of money because of their product which is actually arbitrage trading platform fueled by their erc-20. The team is three autistic russians, they barely speak english and the website looks almost like a scam BUT THIS SHIT IS PAYING OFF, I'm not trying to convince anybody but if you are in arbitrage thats the best you can get with basic knowledge.
Last year I made only 120k on ADA, not to mention the other coins.
DYOR.
Nice brapper
Yeah try to beat the fees and liquidity with that shit
>Yeah try to beat the fees and liquidity with that shit
Beating the fees is this simple:
min_percentage = 1.003
if (end_btc_amount / bitcoin_start_amount > min_percentage) { do_trade(); }
"Beating" liquidity is even easier. Pull all the order books in real time and make sure there is enough volume at the top of level 2 to get all the way through before you initiate the first trade. These problems are trivial.
nice OP, i did this myself manually in 2017 on smaller exchanges (some that people consider shady or w/e, but luckily never had problems myself)
for awhile was making 0.2 to 0.5 BTC per day (8-12 hours manually) with a couple peak days in the 0.7-1.0 BTC range
i remember when ELIX was getting p&d'd in like Oct '17 and was able to do ETH/ELIX > ELIX/BTC > BTC/ETH and repeat all day for like 16 hours straight multiple days in a row, was retarded profits and for whatever reason, on the small exchange i was doing this, barely anyone else was in on it (neither bots or manual traders) and i went uncontested for the better part of a week, making 10-20% per complete triangle, blew my mind at the time.
OP is lying
I made a triangulary,quadrangular and petalangular arbitrage bot spanning bitstamp, kraken, cexio, quadriga (lol), binance, hitbtc, and many other shitexchcanges
All the exchanges interface was over a websocket/event driven, even though some didnt support that in their API, I hacked around it with tampermonkey
results: lost money as the entire market was dumping jan 2018. lol.
later results: lost money as moving usd/eur/gbp/rubles through various payment options, incurs fees higher than any triangular arbitrage
even later results: still not profitable, my arbitrage bot can find arbitrages among the 100s of trading pairs on these 10s of exchanges in less than 50ms, yet no profit after fees and moving coins around.
Fucking epic man. Rock on.
>OP is lying
>
>I made a triangulary,quadrangular and petalangular arbitrage bot spanning bitstamp, kraken, cexio, quadriga (lol), binance, hitbtc, and many other shitexchcanges
>
>All the exchanges interface was over a websocket/event driven, even though some didnt support that in their API, I hacked around it with tampermonkey
>
>results: lost money as the entire market was dumping jan 2018. lol.
>later results: lost money as moving usd/eur/gbp/rubles through various payment options, incurs fees higher than any triangular arbitrage
>
>even later results: still not profitable, my arbitrage bot can find arbitrages among the 100s of trading pairs on these 10s of exchanges in less than 50ms, yet no profit after fees and moving coins around.
Sounds like you're not as smart nor is your system nearly as sophisticated and "fast" as you think it is. Protip: my knowledge of the api of just about every exchange in your list and your description including the TamperMonkey thing, I already know what your problem was. Protip #2: SignalR is a piece of shit
the problem isnt in the speed or logical bug such as comparing order books, despite being almost-real time through websocket things, with time differences as each exchange is posting updates to their books at different times. so no, my bot was checking for this.
the problem is, the arbitrage only exists for fiat pairs, which cant be moved fast, so the execution risk fucks your trade up.
for cryptocurrency pairs, when excluding fiat, there exist trades to execute - which are not worth my fucking time, pennies to be made per day. wow.
Does it only work with a set 3rd coin? Or would there be a way to identify which shitcoin would have the best arbitrage and then automatically execute once identified? Maybe via an extra step (which then you’d have to account for the extra fee to switch to said currency?)
>for cryptocurrency pairs, when excluding fiat, there exist trades to execute - which are not worth my fucking time, pennies to be made per day. wow.
Oh, you're completely correct. If the bot you built was only capable of making pennies a day trading crypto then I can see how that would be discouraging. That's not a problem I've run into myself but if I ever do, I guess I'll see how it goes.
You can always just execute the first step in the trade but you'll need to distinguish whether the first pair is undervalued or the second pair is overvalued. It can go either way and the distinction is subtle. Some people with less, um, sensitivity to certain issues like this don't end up making very much money so just be aware.
im almost done with automatisation. the multiple times i tested manually didnt bring any positive gain. How often each day does this case happen? Do you check the bids and asks of every pair every minute ?
>im almost done with automatisation. the multiple times i tested manually didnt bring any positive gain. How often each day does this case happen? Do you check the bids and asks of every pair every minute ?
You have to get in as perfect as possible sync with the exchange order book and every exchange has their own way to do this. Just polling every minute or even every second is not even remotely good enough. If you are polling at all you are not in the game. You will find there are thousands of instances every day where you can make an attempt that mathematically would result in profit after fees. You won't get even close to all of them though. I get dozens but I'm very selective.
yeah i got live api of the order book, but i mean the trigger for it, so i can know how often a buy and sell case happens.
I will just run it down to all binance eth and btc pairs, are the ones with smaller volume better from your experience?
nice thread and nice job. personally programming was never my thing (after I gave it a go), i felt like i understood it but it's not something i could enjoy doing daily, if you catch my drift.
ever thought about doing a private discord with a few select biz NEETs and scaling this on a commission based system?
if this shit really works im gonna publish a bot for selective people definitely
I haven't found volume to matter much as long as there's a reasonable amount of action and everything on Binance is more than enough. For what you need, that would be the top of level 2. You need the bid and ask pulled continuously in real time for every coin. Suppose your script is running and you pull in a new ticker for ADA, you do your math and if you get a match, go for it. The next instance, you get a fresh price for BNB, do the math and if it's good, go for it. Ad infinitum. The real problem you're having is you're trying to do this with the Binance websocket api which (officially) only pushes orderbook updates once per second. This is worthless since by the time you get the data it's stale. I shouldn't tell you this but there is a stream for real time level 2. I'll leave it as an exercise to figure out how. I can't give everything away.
Sadly I'm not really a people person. This has been more social interaction (other than with my wife) than I've had all month. After this thread I'll probably socially hibernate for another month. No way I could manage a discord or anything. I'm 100% autistic shut-in if you get my drift.
well i'll guess i'll just ask and give a shot in the dark but any chance i can be involved?
oh no worries at all dude we're all autists here. i enjoy reading bot threads as i always learn a thing or two.
It was at this post that I realized OP almost assuredly isn't a LARP. Thank you for contributing a quality thread to Jow Forums, I miss them.
>I haven't found volume to matter much as long as there's a reasonable amount of action and everything on Binance is more than enough. For what you need, that would be the top of level 2. You need the bid and ask pulled continuously in real time for every coin. Suppose your script is running and you pull in a new ticker for ADA, you do your math and if you get a match, go for it. The next instance, you get a fresh price for BNB, do the math and if it's good, go for it. Ad infinitum.
got this
Once per second is too slow? So it can work on extremly active markets. I can use binance or simple cryptowat.ch api and i got level 2 on it.
sure, if it really works
Yo OP interested in learning more. Send me a ping so we can contact later stackcobalt (at) protonmail com
Saved your mail i'll contact you too if OP didn't get to me
i made one a while ago.... it listened on the websocket apis of a few exchanges, i built it in node.js (the evented model worked well for live data coming in), it looked for 2 and 3 pair trades. it built the order books and accounted for slippage, made sure there was enough volume to do the trade. it was about as "live" as a bot gets, there was no polling of exchanges, it received the push data directly to be as up to date as possible.
anyway, in 2017, the margins were pretty thin. i was making more money then by just trading and "investing" in coins so it wasn't worth it to run the bot. i could revisit it now, maybe people have shut their bots off. my bot wasn't at the point where it would execute trades, it just found opportunities. i would have to built it out a lot more, probably at least 3-4 weeks of work, to get it to the point where it could maybe be profitable.
>Once per second is too slow? So it can work on extremly active markets.
Try not to think of the bot as working in any sort of time resolution cuz if it runs every "second" then something might happen between those seconds. If it works every half second, something might happen betwen that and so on. Think of the exchange as a series of events. Right now this very instant, every price on Binance is a certain number. Then somebody clicks a button on their computer at home and a price changes in Binance's database. If you have a continuous real time stream of their data, your local mirror of their price data is then updated with this change. You then do your math and if you like what you see, you send a command to the exchange to execute a trade based the desired outcome. It is a series of events, not based on timing other than in the sense that one things happens after another. That's how you have to see this in order to understand what you have to do.
I gotcha!
yes totally understood, thanks m8
Don't use a secondary API like cryptowat.ch. Any extra nodes your data has to go through is going to add latency. You'd be best finding the "hidden" real-time level 2 information streams, which really isn't a difficult task. Another pro-tip: multiple VPSs that handle specific exchanges, located near the exchanges. e.g. your Binance-specific instance should be on a VPS hosted in east Asia.
Thanks for info, i will complete it today and run it for multiple days. But im still wondering if this method only works on high active markets, if one second is even too much...or does it work a few times a day on relative steady markets aswell?
Yep, all these things. Note also that cloudflare complicates the issue of locating your bot close to the exchange. I've found some exchanges, despite being in one place, actually end up having less latency from somewhere else. Sometimes even the api endpoints differ from the actual exchange. Part of the reason some people, despite doing everything "right", still can't succeed is lack of awareness of these issues.
>You'd be best finding the "hidden" real-time level 2 information streams
I didn't even know binance has hidden streams. Are those used for the browser interface on binance.com or where else did you find them?
cool man any way I can reach out to you?
got discord?
>Think about it, somebody has to run the bots. Why not a fellow Jow Forumsraeli?
I believe you. People used to say the same shit about mining btc back in 2012. Like "it's not profitable for the average joe anymore, you're competing with the big boyz!". Wish I didn't listen to them. You think for yourself so you're definitely going to make it. Brainlets, take note.
How would you execute all 3 trades in a millisecond? Doesn't it take a while before the balance of the first coin you buy gets updated? Or do you already hold a non-zero balance of all 3 coins before you start?
I got the part that you check for the price differences of each pair. But do you also set a min value for the size of the order?
Imagine you buy 100 nano / btc but there is only a 50 nano buy order on the eth pair with your arbitrage.
Yep. Pic related to the nth degree.
>How would you execute all 3 trades in a millisecond? Doesn't it take a while before the balance of the first coin you buy gets updated? Or do you already hold a non-zero balance of all 3 coins before you start?
You just send the trades consecutively. The exchange is just a computer program taking inputs and moving stuff around in a database. It gets your trade off the wire, executes it, gets your second trade, executes it, then third. The amount of time is irrelevent between the orders, all that matters is that the orders are one after the other. When the exchange matching engine executes the trade, the database reflects this immediately so there isn't an issue of something not being updated yet before the next trade and so on. It's all just one big deterministic computer program doing what's it's told in the order it is told.
Natch, all of this is predicated on the exchange not being buggy. If it is, just move on somewhere the programmers are competent.
>But do you also set a min value for the size of the order?
Imagine you buy 100 nano / btc but there is only a 50 nano buy order on the eth pair with your arbitrage.
When you keep track of all the order books, make sure to keep all the volumes for each price updated as that is a crucial part of the data your script uses to predicate a trade decision on for the reasons you imagine.
Stop telling people. There's a finite amount of arb opportunities.
But shouldn't you then always end your trade with save heaven usdt to avoid volatility in the market?
>Natch, all of this is predicated on the exchange not being buggy. If it is, just move on somewhere the programmers are competent.
I see thanks!
But don't you run into trouble with the exchange banning your IP if you're constantly querying a bunch of orderbooks?
Dude I ran an arbitrage bot and made a fucking killing early 2018 how did you possibly lose? Now its dried up so I am skeptical but might look into triangular arbitrage
Ohhhh I just read the end of your post
>moving coin around
There's your problem. You need funds on BOTH exchanges so you can buy and sell instantly. Waiting for block chain confirmations will get you killed.
>But shouldn't you then always end your trade with save heaven usdt to avoid volatility in the market?
Nope, you want to end on the same instrument (but a little bit more) as you started with. I'm a little tired so I won't go into exactly why but think about it very carefully and it'll come to you.
>IP ban
Websockets and FIX. You never poll for anything.
Do you have wickr? I'm a whale I want to learn this I'll make it worth your while
what's your hardware/internet connection like?
go/rust is probably a good language for something like this, but i don't trust my hardware unless i'm looking at something at an extremely small scale
my dad worked at nintendo, trust me guys
Well thanks for this great thread user, you gave me the motivation to start coding again. I had a bot but never got around to finish it as I ran into personal issues, and I'm now working a shitty dead-end job that is mentally and physically straining. Having a bot running that makes money sounds definitely like where I want to be. Also I think that there will be plenty of opportunities once volume comes back on the crypto markets. Cheers
Could you please give me a hint where to find realtime level 2 websocket urls for binance? Like is it actually used on binance.com or somewhere else? Couldn't find anything on the official binance API docs either.
Im serious lmao
>what's your hardware/internet connection like?
You're gonna want to use a VPS so your personal hardware won't matter.
>Have wickr?
I do not. I am interested though. Shoot me a message at [email protected]
Awesome man. Good luck and I guarantee there are plenty of opportunities. If I even thought I was killing something I wouldn't have created the thread. There's enough for all of us to make it in our own way.
Dig around their web properties with your browser console. You might find something somewhere.
Alright anons, it's late and I'm about to fall out. Good luck to everybody and I hope I made somebody's day in this fuck ass bear market we're in right now. But hey, 2022 is right around the corner and surely bitcoin will be at least 4500 by then. Peace
>You're gonna want to use a VPS so your personal hardware won't matter.
i was more asking about the specs of whatever you were using in general
t. poorfag with a shitty digitalocean box
Alright, last one then I'm really out. It doesn't really matter. Digital Ocean, Linode, Vultr, whatever you can find on lowendtalk.com. Network latency is what matters and thanks to cloudflare, even that isn't as cut and dry anymore so you'll have to experiment. Your droplet is fine for starters though.
>Your droplet is fine for starters though
i still doubt that my shitty $5 droplet can pull off three api calls and quick maffs in sub millis time
might make it over the weekend just for funsies tho.
sent
Turns out there was a depth@0ms stream, but it got deprecated quite some time ago. Thanks for wasting my time
>Pocketed a cool 11.06%.
this is not possible .
margin always < 1% dumb retard
>measure alt crypto in $
fucking retard. Jow Forums is kill