daimekashiya/luno-php

PHP SDK for the Luno API. Updated with latest release from source Github Repository since the official on Packagist only as at v0.0.4

2.0.0 2022-03-23 07:05 UTC

This package is auto-updated.

Last update: 2024-04-23 13:42:59 UTC


README

68747470733a2f2f64333265786938763961763375782e636c6f756466726f6e742e6e65742f7374617469632f696d616765732f6c756e6f2d656d61696c2d3333362e706e67

Luno API Build Status

This PHP package provides a wrapper for the Luno API. Updated with latest release from source Github Repository since the official on Packagist only as at v0.0.4

Installation

composer require daimekashiya/luno-php

Authentication

Please visit the Settings page to generate an API key.

Example usage

$client = new Luno\Client();
$client->setAuth("api_key_id", "api_key_secret");

$req = new Luno\Request\GetOrderBook();
$req->setPair("XBTZAR");

try {
  $res = $client->getOrderBook($req);
  echo "Found " . count($res->getBids()) . " bid(s)";
} catch (Luno\Error $e) {
  echo $e->message();
}

License

MIT