Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: MatthewLM on August 05, 2011, 09:32:47 PM



Title: MtGox API fails with trading bot.
Post by: MatthewLM on August 05, 2011, 09:32:47 PM
http://stackoverflow.com/questions/6959167/libcurl-timeouts-on-urls-which-are-working-in-my-webbrowser/6962850#6962850

But tradehill is fine. I was trying all day to figure out why. I have no clue.


Title: Re: MtGox API fails with trading bot.
Post by: 2112 on August 06, 2011, 12:51:19 AM
This is easy. Make the bot send HTTP headers exactly as the browser that you use on your computer. MtGox uses some DDoS protection that is very sensitive to the content and order of the HTTP headers. What exactly needs to be done changes dynamically with the DDoS attack signatures that are going on from zombie computers in your network neighbourhood.


Title: Re: MtGox API fails with trading bot.
Post by: kjj on August 07, 2011, 04:44:09 AM
Try adding a user agent to the curl options.


Title: Re: MtGox API fails with trading bot.
Post by: epetroel on August 07, 2011, 04:59:55 AM
As others have said, adding the user agent string should do the trick.

Also, posted an answer on your SO question :)


Title: Re: MtGox API fails with trading bot.
Post by: MatthewLM on August 07, 2011, 07:39:39 PM
When I tried the user-agent it failed.  ???