Bitcoin Forum
May 07, 2024, 08:33:13 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: I need a working PHP mtgox API script [.1 btc]  (Read 751 times)
BitvoinVender (OP)
Newbie
*
Offline Offline

Activity: 46
Merit: 0


View Profile
May 22, 2013, 06:40:38 PM
Last edit: May 22, 2013, 07:29:02 PM by BitvoinVender
 #1

Need to be able to withdraw btc and place buy orders.

v1/v2

must be in php


link to my attempts so far,
https://bitcointalk.org/index.php?topic=213284.msg2237716#msg2237716
1715070793
Hero Member
*
Offline Offline

Posts: 1715070793

View Profile Personal Message (Offline)

Ignore
1715070793
Reply with quote  #2

1715070793
Report to moderator
1715070793
Hero Member
*
Offline Offline

Posts: 1715070793

View Profile Personal Message (Offline)

Ignore
1715070793
Reply with quote  #2

1715070793
Report to moderator
Make sure you back up your wallet regularly! Unlike a bank account, nobody can help you if you lose access to your BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
torba
Member
**
Offline Offline

Activity: 100
Merit: 10



View Profile
May 23, 2013, 01:05:51 AM
 #2

https://github.com/Someguy123/MtGOX-PHP-API
The class is pretty well documented inside the file. Just include the 1 file at the top of your script, then do for example this
Code:
$gox = new Gox('myLongAPIKey', 'Mysecretsecret');
$price = $gox->ticker();

if($price<100){
     $gox->buyBTC($amount, $price, "USD");
}
else {
     $gox->sellBTC($amount, $price, "USD");

}
Whereas $amount and $price actually have to equal something.
See this for more detail on the various functions of the library, it's code is really easy to understand
https://github.com/Someguy123/MtGOX-PHP-API/blob/master/Gox.class.php
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!