luno/luno-php

PHP SDK for the Luno API

0.0.14 2023-05-15 09:54 UTC

This package is not auto-updated.

Last update: 2024-10-28 16:37:46 UTC


README

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