tokenly/crypto-quote-client

获取加密货币报价的库

v1.3.0 2018-09-21 15:03 UTC

This package is not auto-updated.

Last update: 2024-09-14 17:11:07 UTC


README

获取加密货币价格的报价。

Build Status

使用方法

$client = new Tokenly\CryptoQuoteClient\Client();
$quote = $client->getQuote('bitcoinAverage', 'USD', 'BTC');
echo json_encode($quote, 192)."\n";

/*

{
    "name": "bitcoinAverage",
    "base": "USD",
    "target": "BTC",
    "ask": 217.55,
    "askSat": 21755000000,
    "bid": 217.19,
    "bidSat": 21719000000,
    "last": 217.39,
    "lastSat": 21739000000,
    "timestamp": 1423163845
}

*/

包含的驱动器有

  • bitcoinAverage
  • bitstamp
  • poloniex