luno/luno-php

PHP SDK for the Luno API

0.0.4 2019-03-25 12:27 UTC

README

68747470733a2f2f64333265786938763961763375782e636c6f756466726f6e742e6e65742f7374617469632f696d616765732f6c756e6f2d656d61696c2d3333362e706e67

Luno API Build Status

This PHP package provides a wrapper for the Luno API.

Installation

composer require "luno/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