一個查看各大BTC比特幣交易站實時價格的命令行工具

SegmentFault用戶,獨立開發者,前支付寶前端開發工程師郭宇,爲極客們準備的一個命令行工具,方便你們看btc各交易站實時價格:前端

img-1

安裝

$ [sudo] npm install btc -g

命令行界面

只要運行btc,實時價格會自動顯示git

$ btc

快捷鍵

btc cli爲您提供一些實用的快捷鍵:github

[enter]  ->  refresh prices as you wish
[g]      ->  go to current exchange market
[a]      ->  autorefresh the current exchange market every 10 seconds, 
             press [a] to cancel or [enter] to cancel all
[q]      ->  quit

實例

var btc = require('btc');

// fetch a prices list
btc.price(function(err, prices){
    console.log(prices);
});

// fetch a seleced exchanger
btc.price('btcchina', function(err, prices){
    console.log(prices);
});

添加你比特幣的API

能夠隨時增長你新的比特幣api:npm

$ git clone https://github.com/turingou/btc.git && cd btc
$ vi ./libs/exchangers.js

確保每一個API都有其獨特的URL網站,並填寫參數貨幣segmentfault

API

請查看該文件:index.jsapi

btc支持如下交易平臺及方式:dom




原文是 郭宇 發佈在本身github 項目上的說明文檔
本文由 segmentfault 翻譯工具

相關文章
相關標籤/搜索
本站公眾號
   歡迎關注本站公眾號,獲取更多信息