luno / luno-php
Luno API 的 PHP SDK
0.0.14
2023-05-15 09:54 UTC
Requires
- guzzlehttp/guzzle: ^6.3.3
- netresearch/jsonmapper: ^1.4
Requires (Dev)
- phpunit/phpunit: 7.1.4
This package is not auto-updated.
Last update: 2024-09-16 16:13:53 UTC
README
Luno API 
此 PHP 包为 Luno API 提供了包装器。
安装
composer require "luno/luno-php"
身份验证
请访问 设置 页面以生成 API 密钥。
示例用法
$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(); }