elliotchance/independentreserve 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

elliotchance/independentreserve

最新稳定版本:v1.1.9

Composer 安装命令:

composer require elliotchance/independentreserve

包简介

API for independentreserve.com.

README 文档

README

Build Status Scrutinizer Code Quality Coverage Status Latest Stable Version Total Downloads License

PHP API for independentreserve.com

Installation

Using composer:

composer require elliotchance/independentreserve

Public APIs

All public APIs are supported, and do not need authentication:

use IndependentReserve\PublicClient;
use IndependentReserve\Currency;

$client = new PublicClient();
$marketSummary = $client->getMarketSummary(Currency::XBT, Currency::USD);
printf('%s: %s USD',
    $marketSummary->getCreatedTimestamp()->format('r'),
    $marketSummary->getDayAveragePrice()
);

// Fri, 26 Dec 2014 05:03:34 +0000: 323.21 USD

View all of the public APIs at https://www.independentreserve.com/API#public

Private APIs

All private APIs are available. You must use your API key and secret to access them:

use IndependentReserve\PrivateClient;
use IndependentReserve\Currency;

$client = new PrivateClient('api_key', 'api_secret');
$address = $client->getBitcoinDepositAddress();
echo $address->getBitcoinAddress();

// 12a7FbBzSGvJd36wNesAxAksLXMWm4oLUJ

View all of the private APIs at https://www.independentreserve.com/API#private

All of the public API methods are accessible through the PrivateClient as well:

$client = new PrivateClient('api_key', 'api_secret');
$marketSummary = $client->getMarketSummary(Currency::XBT, Currency::USD);

Paging Results

Some of the APIs return their results as paged calls (25 items at a time), you do not need to worry about this because these APIs use elliotchance/iterator which will handle all the paged requests for you on demand, you may use all results as an active array:

$client = new PrivateClient('api_key', 'api_secret');
$openOrders = $client->getOpenOrders();

echo count($openOrders);
// 452

var_dump($openOrders[135]); // 136th order

foreach ($openOrders as $order) {
    // ...
}

统计信息

  • 总下载量: 140
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-26