2017 © Pedro Peláez
 

library localbtc-php

PHP client for Localbitcoins.com

image

lox/localbtc-php

PHP client for Localbitcoins.com

  • Saturday, November 2, 2013
  • by lox
  • Repository
  • 6 Watchers
  • 13 Stars
  • 27 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 3 Versions
  • 4 % Grown

The README.md

LocalBitcoins.com PHP Client

This is a (work-in-progress) client for the LocalBitcoins.com API:, (*1)

https://localbitcoins.com/api-docs/, (*2)

TODO

API methods:, (*3)

  • [x] Authentication
  • [x] AccountInfo
  • [x] Myself
  • [x] Escrows
  • [x] EscrowRelease
  • [ ] Ads
  • [ ] AdUpdate

Other stuff:, (*4)

  • [ ] Custom errors
  • [ ] AccountInfo

Installing

Install with composer:, (*5)

git clone https://github.com/lox/localbtc-php.git
composer install

Authenticating

The API uses OAuth2, so it's somewhat annoying to authenticate to for console apps. First you need to register an application and generate a client ID and client secret in the API console:, (*6)

https://localbitcoins.com/accounts/api/, (*7)

Then use these commands to generate a access_token:, (*8)

export LOCALBITCOINS_CLIENT_ID=1234567
export LOCALBITCOINS_CLIENT_SECRET=123456

php oauth.php --authorize

Click the link generated, grant the application access in your localbitcoins.com account., (*9)

Copy the access_token from the output for the below example., (*10)

Usage

<?php

$client = \LocalBtc\Client::factory(array(
    'client_identifier' => '1234567',
    'access_token' => 'generated access token goes here',
));

// get data about yourself
$myself = $client->myself()->get('data');

// get data about someone
$someone = $client->accountInfo(array('username'=>'someone'))->get('data');

// get your escrows
$escrows = $client->escrows()->get('data');

// release an escrow
$client->releaseEscrow(array('escrow_id'=>123456));


The Versions

02/11 2013

v0.1.1

0.1.1.0

PHP client for Localbitcoins.com

  Sources   Download

The Requires

 

The Development Requires

guzzle bitcoin localbitcoins

20/10 2013

dev-master

9999999-dev

PHP client for Localbitcoins.com

  Sources   Download

The Requires

 

The Development Requires

guzzle bitcoin localbitcoins

20/10 2013

v0.1.0

0.1.0.0

PHP client for Localbitcoins.com

  Sources   Download

The Requires

 

The Development Requires

guzzle bitcoin localbitcoins