bradtech/localbitcoins-client

A Http Client to authenticate with Localbitcoins API

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:project

pkg:composer/bradtech/localbitcoins-client

dev-main 2022-06-06 20:59 UTC

This package is auto-updated.

Last update: 2026-01-07 05:00:02 UTC


README

A Localbitcoins Client for PHP with minimal dependencies. Should work right off the box.

Documentation for the Localbitcoins API can be found here: https://localbitcoins.com/api-docs/.

Installing

Make sure you have cURL enabled in your php environment.

php --ri curl

you should see this text on your terminal:

cURL support => enabled

Install with composer

composer require bradtech/localbitcoins-client

Usage

To use the HMAC Authentication Client, create a newHMACAuthenticationClient object and initialize with the HMAC key and secret from Localbitcoins.

<?php

// you can load the files dynamically
require_once 'vendor/autoload.php';

use Bradtech\LocalbitcoinsClient\HMACAuthenticationClient;

$hmac_key = 'HMAC_KEY';
$hmac_secret = 'HMAC_SECRET';

$client = new HMACAuthenticationClient($hmac_key, $hmac_secret);

$data = $client->getWalletAddress();

var_dump($data);