Post
Topic
Board Project Development
Re: Help with simple PHP trading over BTC-e
by
n4ru
on 18/04/2013, 01:32:03 UTC
Check out the PHP library called Guzzle. It's a nice wrapper for RESTful type APIs.

http://guzzlephp.org/

I wrote a wrapper for BTC-e REST API using Guzzle and Symfony framework. Even if you're not using Symfony, the client.xml service description can still be used with Guzzle to execute requests against BTC-e.

The BTC-e API actually has a few really annoying bugs and limitations (no market orders, missing the trade order ID if the order was executed immediately, etc....). I haven't made the code public on my GitHub yet because it's embedded with an app. PM if you'd like me to send you the source and I can share as well as explain the API bugs I encountered and how I worked around them. Hopefully this is helpful.

Links to a few potentially useful pastebins:
  - guzzle client.xml: http://pastebin.com/sgZNU8ew
  - guzzle Client class to handle BTC-e authentication: http://pastebin.com/DzkfN3Cy
  - guzzle Command class to handle BTC-e authentication: http://pastebin.com/nGmYCCjr

Awesome stuff, I'll check it out! I am inclined to agree with this, however;

That is a lot of extra files and calls for a very simple function.

BTC-E can work thru webservers. It is an API as long as you can connect to the btc-e server you can run it. For a few bitcoins I can create a php library for you for btc-e.
I know all this... I'm simply stumped on how to execute the actual trade via the API. I'm not looking for someone to create an entire library for me, just point me in the right direction so I can do it myself.

For 1 bitcoin (just to cover my time) I can create a function php script that allows you to call it and execute a trade. If you want send 1 bitcoin to http://qcl.me/gweedo and I will write the script and send it to you.
I wish I got paid almost $100 for a couple lines of code...