Bitcoin Forum
July 15, 2019, 10:56:26 PM *
News: Latest Bitcoin Core release: 0.18.0 [Torrent] (New!)
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3] 4 »  All
  Print  
Author Topic: BTC-E PHP Currency Arbitrage Bot Full Code  (Read 39604 times)
miaviator
Donator
Hero Member
*
Offline Offline

Activity: 672
Merit: 500


It's for the children!


View Profile WWW
May 31, 2013, 12:19:11 PM
 #41

Any updates to code? BTW why dont put it on github?

I moved on from the project so no updates, if you request something here I might be able to modify it.

I don't know anything about github.

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1563231386
Hero Member
*
Offline Offline

Posts: 1563231386

View Profile Personal Message (Offline)

Ignore
1563231386
Reply with quote  #2

1563231386
Report to moderator
1563231386
Hero Member
*
Offline Offline

Posts: 1563231386

View Profile Personal Message (Offline)

Ignore
1563231386
Reply with quote  #2

1563231386
Report to moderator
miaviator
Donator
Hero Member
*
Offline Offline

Activity: 672
Merit: 500


It's for the children!


View Profile WWW
May 31, 2013, 12:31:03 PM
 #42

That seems to have done it, thanks.  Though now the activity level is way down.  I was getting at least a couple of trades per 10-15 mins, now I just ran for an hour and only 1.  Forgive my ignorance if the lack of trades is just a product of current market prices, but are there other settings that are tweakable to increase activity? 

Ideally to make the most trades: (when I was running this my account had at least 100 trades per day) 

1. You need a low latency to cloudflare and btc-e (fast connection or tier 1 network, or server in russia?)
2. The script needs to be able to run with no timers firing.
3. The script needs to print no output or only print output if a trade path was analyzed and no profit was found.
4. fastTrade should be enabled! - This again ideally will cause the script to fire all three trades with no error checking and no currency clearing.  The best chance to complete three trade legs is to complete them sequentially as soon as they are found.  The issue is that this method will leave your funds stuck in whatever the last currency leg that filled was.  Since I normally run bots to make the exchange a higher profit (.2%-.6% to exchange vs .1% to me) there can be a loss when converting back to the original currency.  In the crypto currency world it is dangerous to sit in anything other than 50%Crypto 50%USD continuously balanced since the prices are extremely volatile.

To make the most profit, the script should detect price trends in BTC and trade B to B while the price is rising and U to U while the price is falling.  Or swap from B to U to ensure a 50% balance in the portfolio.

alexxy
Sr. Member
****
Offline Offline

Activity: 363
Merit: 250


View Profile
May 31, 2013, 01:20:00 PM
 #43

Can you share your latest version of this script?
miaviator
Donator
Hero Member
*
Offline Offline

Activity: 672
Merit: 500


It's for the children!


View Profile WWW
May 31, 2013, 02:01:54 PM
 #44

Can you share your latest version of this script?

This is the latest version of the arbitrage script, I can't share any of the rolling engines yet.

snowcrashed
Full Member
***
Offline Offline

Activity: 294
Merit: 100



View Profile
May 31, 2013, 08:12:07 PM
Last edit: May 31, 2013, 11:59:21 PM by snowcrashed
 #45

That seems to have done it, thanks.  Though now the activity level is way down.  I was getting at least a couple of trades per 10-15 mins, now I just ran for an hour and only 1.  Forgive my ignorance if the lack of trades is just a product of current market prices, but are there other settings that are tweakable to increase activity?  

Ideally to make the most trades: (when I was running this my account had at least 100 trades per day)  

1. You need a low latency to cloudflare and btc-e (fast connection or tier 1 network, or server in russia?)
2. The script needs to be able to run with no timers firing.
3. The script needs to print no output or only print output if a trade path was analyzed and no profit was found.
4. fastTrade should be enabled! - This again ideally will cause the script to fire all three trades with no error checking and no currency clearing.  The best chance to complete three trade legs is to complete them sequentially as soon as they are found.  The issue is that this method will leave your funds stuck in whatever the last currency leg that filled was.  Since I normally run bots to make the exchange a higher profit (.2%-.6% to exchange vs .1% to me) there can be a loss when converting back to the original currency.  In the crypto currency world it is dangerous to sit in anything other than 50%Crypto 50%USD continuously balanced since the prices are extremely volatile.

To make the most profit, the script should detect price trends in BTC and trade B to B while the price is rising and U to U while the price is falling.  Or swap from B to U to ensure a 50% balance in the portfolio.

Hmm tried running it in fastTrade mode and every trade path it finds, it cancels the order immediately afterwards.  I set minbidusd/maxbidusd to = $5, in my account I have more than that so I figured that was a good place to start unless I'm not understanding what those variables stand for.  Also, how can I optimize the settings for minbid/maxbid related to me account?

And thanks for releasing this code to the public as well as helping us get it running.  If I see some profits from this I will definitely be sending some your way.

Edit:  Left it running for about 24 hours and seems like every O is followed by a C soon after, running fasttrade or not.  Is this normal behavior?
billotronic
Legendary
*
Offline Offline

Activity: 1610
Merit: 1000


Crackpot Idealist


View Profile
June 01, 2013, 04:27:36 AM
 #46

That seems to have done it, thanks.  Though now the activity level is way down.  I was getting at least a couple of trades per 10-15 mins, now I just ran for an hour and only 1.  Forgive my ignorance if the lack of trades is just a product of current market prices, but are there other settings that are tweakable to increase activity? 

Ideally to make the most trades: (when I was running this my account had at least 100 trades per day) 

1. You need a low latency to cloudflare and btc-e (fast connection or tier 1 network, or server in russia?)
2. The script needs to be able to run with no timers firing.
3. The script needs to print no output or only print output if a trade path was analyzed and no profit was found.
4. fastTrade should be enabled! - This again ideally will cause the script to fire all three trades with no error checking and no currency clearing.  The best chance to complete three trade legs is to complete them sequentially as soon as they are found.  The issue is that this method will leave your funds stuck in whatever the last currency leg that filled was.  Since I normally run bots to make the exchange a higher profit (.2%-.6% to exchange vs .1% to me) there can be a loss when converting back to the original currency.  In the crypto currency world it is dangerous to sit in anything other than 50%Crypto 50%USD continuously balanced since the prices are extremely volatile.

To make the most profit, the script should detect price trends in BTC and trade B to B while the price is rising and U to U while the price is falling.  Or swap from B to U to ensure a 50% balance in the portfolio.

Even if you are on to better things, we the people, greatly appreciate you sharing your work. I've rekindled an interest in coding due to looking at and tinkering with the bots on here for btc-e. Good times.

This post sums up why all this bullshit is a scam
Read It. Hate It. Change the facts that it represents.
https://bitcointalk.org/index.php?topic=1606638.msg16139644#msg16139644
bbulker
Full Member
***
Offline Offline

Activity: 125
Merit: 100


View Profile
June 01, 2013, 06:06:58 AM
 #47

I probably won't be using this, but I like your code and found it interesting to see a trading bot's source code. Thanks.
Seal
Donator
Hero Member
*
Offline Offline

Activity: 836
Merit: 1005


View Profile WWW
June 01, 2013, 12:50:31 PM
 #48

That seems to have done it, thanks.  Though now the activity level is way down.  I was getting at least a couple of trades per 10-15 mins, now I just ran for an hour and only 1.  Forgive my ignorance if the lack of trades is just a product of current market prices, but are there other settings that are tweakable to increase activity? 

Ideally to make the most trades: (when I was running this my account had at least 100 trades per day) 

1. You need a low latency to cloudflare and btc-e (fast connection or tier 1 network, or server in russia?)
2. The script needs to be able to run with no timers firing.
3. The script needs to print no output or only print output if a trade path was analyzed and no profit was found.
4. fastTrade should be enabled! - This again ideally will cause the script to fire all three trades with no error checking and no currency clearing.  The best chance to complete three trade legs is to complete them sequentially as soon as they are found.  The issue is that this method will leave your funds stuck in whatever the last currency leg that filled was.  Since I normally run bots to make the exchange a higher profit (.2%-.6% to exchange vs .1% to me) there can be a loss when converting back to the original currency.  In the crypto currency world it is dangerous to sit in anything other than 50%Crypto 50%USD continuously balanced since the prices are extremely volatile.

To make the most profit, the script should detect price trends in BTC and trade B to B while the price is rising and U to U while the price is falling.  Or swap from B to U to ensure a 50% balance in the portfolio.

Even if you are on to better things, we the people, greatly appreciate you sharing your work. I've rekindled an interest in coding due to looking at and tinkering with the bots on here for btc-e. Good times.

I've found that latency mostly isn't relevant for bitcoin exchanges. As long as your server is in europe it will make very little difference. What I have found is that establishing the connection for a http trade call (from php) will take anywhere between 0.5 and 1.0 second regardless of where your location is. This in relative terms is massive.

miaviator
Donator
Hero Member
*
Offline Offline

Activity: 672
Merit: 500


It's for the children!


View Profile WWW
June 02, 2013, 02:07:05 AM
 #49

That seems to have done it, thanks.  Though now the activity level is way down.  I was getting at least a couple of trades per 10-15 mins, now I just ran for an hour and only 1.  Forgive my ignorance if the lack of trades is just a product of current market prices, but are there other settings that are tweakable to increase activity? 

Ideally to make the most trades: (when I was running this my account had at least 100 trades per day) 

1. You need a low latency to cloudflare and btc-e (fast connection or tier 1 network, or server in russia?)
2. The script needs to be able to run with no timers firing.
3. The script needs to print no output or only print output if a trade path was analyzed and no profit was found.
4. fastTrade should be enabled! - This again ideally will cause the script to fire all three trades with no error checking and no currency clearing.  The best chance to complete three trade legs is to complete them sequentially as soon as they are found.  The issue is that this method will leave your funds stuck in whatever the last currency leg that filled was.  Since I normally run bots to make the exchange a higher profit (.2%-.6% to exchange vs .1% to me) there can be a loss when converting back to the original currency.  In the crypto currency world it is dangerous to sit in anything other than 50%Crypto 50%USD continuously balanced since the prices are extremely volatile.

To make the most profit, the script should detect price trends in BTC and trade B to B while the price is rising and U to U while the price is falling.  Or swap from B to U to ensure a 50% balance in the portfolio.

Even if you are on to better things, we the people, greatly appreciate you sharing your work. I've rekindled an interest in coding due to looking at and tinkering with the bots on here for btc-e. Good times.

I've found that latency mostly isn't relevant for bitcoin exchanges. As long as your server is in europe it will make very little difference. What I have found is that establishing the connection for a http trade call (from php) will take anywhere between 0.5 and 1.0 second regardless of where your location is. This in relative terms is massive.

That is an excellent point!  It would be good to open a connection with curl (or websocket) and feed things through it vs opening a new session every time.

I don't have any servers in europe?  can I borrow one?

miaviator
Donator
Hero Member
*
Offline Offline

Activity: 672
Merit: 500


It's for the children!


View Profile WWW
June 02, 2013, 02:12:00 AM
 #50

That seems to have done it, thanks.  Though now the activity level is way down.  I was getting at least a couple of trades per 10-15 mins, now I just ran for an hour and only 1.  Forgive my ignorance if the lack of trades is just a product of current market prices, but are there other settings that are tweakable to increase activity?  

Ideally to make the most trades: (when I was running this my account had at least 100 trades per day)  

1. You need a low latency to cloudflare and btc-e (fast connection or tier 1 network, or server in russia?)
2. The script needs to be able to run with no timers firing.
3. The script needs to print no output or only print output if a trade path was analyzed and no profit was found.
4. fastTrade should be enabled! - This again ideally will cause the script to fire all three trades with no error checking and no currency clearing.  The best chance to complete three trade legs is to complete them sequentially as soon as they are found.  The issue is that this method will leave your funds stuck in whatever the last currency leg that filled was.  Since I normally run bots to make the exchange a higher profit (.2%-.6% to exchange vs .1% to me) there can be a loss when converting back to the original currency.  In the crypto currency world it is dangerous to sit in anything other than 50%Crypto 50%USD continuously balanced since the prices are extremely volatile.

To make the most profit, the script should detect price trends in BTC and trade B to B while the price is rising and U to U while the price is falling.  Or swap from B to U to ensure a 50% balance in the portfolio.

Hmm tried running it in fastTrade mode and every trade path it finds, it cancels the order immediately afterwards.  I set minbidusd/maxbidusd to = $5, in my account I have more than that so I figured that was a good place to start unless I'm not understanding what those variables stand for.  Also, how can I optimize the settings for minbid/maxbid related to me account?

And thanks for releasing this code to the public as well as helping us get it running.  If I see some profits from this I will definitely be sending some your way.

Edit:  Left it running for about 24 hours and seems like every O is followed by a C soon after, running fasttrade or not.  Is this normal behavior?

The difference between fastrade and standard is that in standard the bot polls your balance after every trade.  In fast mode it doesn't care if the orders place fill fail.  it just attempts to set the orders and then immediately cancels anything that doesn't fill.

snowcrashed
Full Member
***
Offline Offline

Activity: 294
Merit: 100



View Profile
June 06, 2013, 06:23:36 PM
 #51

Well I spent a few more days running this/playing around with settings and I simply can't get it to trade consistently, let alone for a profit.  Thanks for releasing this to the public anyhow, maybe I'm just not using it properly.
Lgetty17
Member
**
Offline Offline

Activity: 98
Merit: 10


View Profile
June 12, 2013, 04:10:36 PM
 #52

How exactly do I make this work??? What do I do with the script? paste it into DOS or Python or something? I hate not knowing anything about coding, since everything surrounding bitcoin is so coding-intensive
Eb0la
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250



View Profile
June 12, 2013, 05:05:04 PM
 #53

How exactly do I make this work??? What do I do with the script? paste it into DOS or Python or something? I hate not knowing anything about coding, since everything surrounding bitcoin is so coding-intensive

upload to webserver -> Go to address Smiley  As long as all dependancies are setup you should be good to go.
Queezy
Newbie
*
Offline Offline

Activity: 34
Merit: 0



View Profile
June 14, 2013, 08:57:45 PM
 #54

How exactly do I make this work??? What do I do with the script? paste it into DOS or Python or something? I hate not knowing anything about coding, since everything surrounding bitcoin is so coding-intensive

upload to webserver -> Go to address Smiley  As long as all dependancies are setup you should be good to go.

Webserver? So does this mean it won't run on a desktop pc? If anyone feel's like giving an oversimplified explanation (or a link) of how to run a script/program like this it would be very much appreciated.  Smiley
I've looked at some very simple java stuff before (should I admit it was minecraft or hide that in shame? lol.) And I have worked on a website or two, but only through a control panel and UI with alot of drag n drop, so I really know almost nothing about what it takes to code or run these types of bots.
Eb0la
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250



View Profile
June 14, 2013, 10:13:52 PM
 #55

Install WAMP
Edit PHP.INI and make sure CURL is enabled
copy script to WAMP PHP directory (call the file bot.php)
open command prompt
change directory to the WAMP instead PHP version
run "php.exe bot.php"

it starts scanning / trading

*********DON'T FORGET TO EDIT SETTINGS IN SCRIPT!!!*

If you can't get it running I would suggest to just leave it alone then as it has the potential to lose your BTC / LTC / USD if not configured correctly.
smscotten
Full Member
***
Offline Offline

Activity: 140
Merit: 100



View Profile WWW
June 21, 2013, 07:54:25 PM
 #56

What does it mean if I'm getting numbers in my output but trades aren't actually happening?

------.---------.----------------------------------.-----------------------------------.-.--------------------------------.--.-.-.3.-..-.--.-.-.----.-.--.----.---.----.----.----.-.----.------.-..-------..------.-.--.----.-.----.--.--------------------------------..------.7-.----.1-----..-.-.--.-.-.1.-----..-.-.-.--.1.----------.-...--.-------------.----.-.--.------.3.--.-.----.---.------.---------------------.2--.-.-----------.----.1------.--.-------------.----.-----------.---------.----.-----------------------------------------.----.------------------------------------------.--.------.--.-.-----------.----.---------.----.------.-----------.-.--.------------.--------.--------------.----.------.--.----------------.----.------.-.--.------.--------.1.------.----.----.----.-.--------.1.-.----.2-----.---------.------------.------.-----------.1--.---.------.----------------.----..---.---------

Have I done something wrong? The script is running and it did trigger one transaction when I started running it, but since then no.

Thanks!

ForumAcc
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
June 21, 2013, 07:57:14 PM
 #57

That output is good but the arbitrage opportunities are too small now, it would take a revamp of the fee system to allow them to arb bots properly, i ran this bot on 2 Triples BTC/LTC/RUR and USD for a week for little value.

Im pretty sure that btc-e has its own feeless arb bots running.
smscotten
Full Member
***
Offline Offline

Activity: 140
Merit: 100



View Profile WWW
June 21, 2013, 09:12:03 PM
 #58

Well, I'm not too worried about losing the vast US$5.38 total of all my currencies combined in an experiment that doesn't go anywhere. I'm mining on CPU and a crappy Nvidia GPU so you have to know it's about figuring out how all this works not about making money. Later perhaps I'll get serious about making money but right now it's like model rocketry—I expect it to teach me about the right shape of a nose cone, not take me to the moon.

In other words, let me make mistakes on small numbers before I try to screw myself up with big ones.

Looks like I'm not getting anywhere without being on Fast Trade. When I'm on Fast Trade it made me about two cents in an hour. So I'm calling this a successful experiment. Thanks!

JstnPwll
Member
**
Offline Offline

Activity: 92
Merit: 10


View Profile
July 05, 2013, 09:02:20 PM
 #59

Is the currency change function usable in its current state? Where would I put the call if I wanted to use it?

Developer, entrepreneur, idea-seeker.
BTC: 14MP75VG3Nf53pSEjowmA9gVPVvEvNpabz
JstnPwll
Member
**
Offline Offline

Activity: 92
Merit: 10


View Profile
July 07, 2013, 02:18:50 PM
 #60

Well, after tinkering with this for a while, I've come to the conclusion that either a.) I don't know how to configure it, or b.) It no longer works properly and needs updates. I've let it run for a while with a small amount of funds to play with...it hardly ever makes trades, and I have yet to see a profitable one. I always end up with less than I had before trading.

Developer, entrepreneur, idea-seeker.
BTC: 14MP75VG3Nf53pSEjowmA9gVPVvEvNpabz
Pages: « 1 2 [3] 4 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!