Bitcoin Forum

Bitcoin => Project Development => Topic started by: BitcoinLeader on September 30, 2013, 02:00:50 AM



Title: MtGox PHP Client for API V2 - v0.1
Post by: BitcoinLeader on September 30, 2013, 02:00:50 AM
Hi developers,

Tonight I made a MtGOX Client in PHP (https://github.com/pathaksa/MtGox-PHP-API-V2) for the new MtGox API v2 (https://en.bitcoin.it/wiki/MtGox/API/HTTP/v2).

There was no client available in PHP yet for the newest version so I decided to make my own.

The PHP Class is open-source so you may freely distribute it and use it for your own websites.

Currently it features the following methods:
* MtGoxClient::getInfo()
* MtGoxClient::orderQuote($type = 'ask', $amount = '100000000')
* MtGoxClient::orderAdd('bid',1000000,1340293 )
* MtGoxClient::orderBuy($amount = 0.0001, $price)
* MtGoxClient::orderSell($amount = 0.0001, $price)
* MtGoxClient::orderCancel('4d484979-6237-4e66-b76d-4e8085a8b8be')
* MtGoxClient::getDepositAddress($description = null, $ipn = null)
* MtGoxClient::generateDepositAddress($account = '')
* MtGoxClient::getOrders()
* MtGoxClient::getTicker()
* MtGoxClient::getCurrency()
* MtGoxClient::setPair('BTCEUR')->getCurrency()
* MtGoxClient::getWalletHistory($currency = 'BTC', $page = 1)

These functions are sufficient to create your own Bitcoin Payment Processor.

I hope it will be useful to you. Feel free to post any feedback.

Donations are also welcome if you want to buy me a beer:
BTC = 1ABoNpvdm1e6MEAJe115bCy394ZsDgi8NJ

I'm happy to be able to contribute to the Bitcoin Community in this way.

Good luck!



Title: Re: MtGox PHP Client for API V2 - v0.1
Post by: kakobrekla on September 30, 2013, 02:20:16 AM
I added your link to teh wiki.


Title: Re: MtGox PHP Client for API V2 - v0.1
Post by: BitcoinLeader on September 30, 2013, 02:24:58 AM
I added your link to teh wiki.
Thank you :) I appreciate it.


Title: Re: MtGox PHP Client for API V2 - v0.1
Post by: b!z on September 30, 2013, 11:40:59 AM
Very nice. I'm sure this will be useful to many Bitcoin users.


Title: Re: MtGox PHP Client for API V2 - v0.1
Post by: faiza1990 on September 30, 2013, 12:18:45 PM
good work you are real helpful for this community


Title: Re: MtGox PHP Client for API V2 - v0.1
Post by: BitcoinLeader on September 30, 2013, 07:28:07 PM
Thank you and I will keep updating it. I am also working on a BTC-E API Client. And after that I will be creating an Arbitration Tool between BTC-E and MtGox.