比特时代行情 API 使用说明 / Referance of BTC38.com's API

2014-07-10 11:09:46阅读0

 交易行情API / Trades API


返回系统支持的所有交易对的最高,最低 交易行情和交易量,每15秒钟更新。
Return the highest, lowest  trade and the vulome of trade pairs. Refreshed every 15 seconds.

所有币种交易API /  All Pairs
http://api.btc38.com/v1/ticker.php?c=all

单个币种交易API / Single Pair
http://api.btc38.com/v1/ticker.php?c=btc
http://api.btc38.com/v1/ticker.php?c=ltc
http://api.btc38.com/v1/ticker.php?c=dog
http://api.btc38.com/v1/ticker.php?c=xpm
http://api.btc38.com/v1/ticker.php?c=bec
http://api.btc38.com/v1/ticker.php?c=xrp
http://api.btc38.com/v1/ticker.php?c=zcc
http://api.btc38.com/v1/ticker.php?c=mec
http://api.btc38.com/v1/ticker.php?c=anc
http://api.btc38.com/v1/ticker.php?c=ppc
http://api.btc38.com/v1/ticker.php?c=src
http://api.btc38.com/v1/ticker.php?c=tag
http://api.btc38.com/v1/ticker.php?c=pts
http://api.btc38.com/v1/ticker.php?c=wdc
http://api.btc38.com/v1/ticker.php?c=apc
http://api.btc38.com/v1/ticker.php?c=dgc
http://api.btc38.com/v1/ticker.php?c=unc
http://api.btc38.com/v1/ticker.php?c=qrk
http://api.btc38.com/v1/ticker.php?c=tmc

市场深度API / Depth API


返回当前市场深度(委托挂单),其中 asks 是委卖单, bids 是委买单。返回30条。
Return the trade depth (current orders). Asks for buyer's order and bids for seller's order. 30 items each.

http://api.btc38.com/v1/depth.php?c=btc
http://api.btc38.com/v1/depth.php?c=ltc
http://api.btc38.com/v1/depth.php?c=dog
http://api.btc38.com/v1/depth.php?c=xpm
http://api.btc38.com/v1/depth.php?c=bec
http://api.btc38.com/v1/depth.php?c=xrp
http://api.btc38.com/v1/depth.php?c=zcc
http://api.btc38.com/v1/depth.php?c=mec
http://api.btc38.com/v1/depth.php?c=anc
http://api.btc38.com/v1/depth.php?c=ppc
http://api.btc38.com/v1/depth.php?c=src
http://api.btc38.com/v1/depth.php?c=tag
http://api.btc38.com/v1/depth.php?c=pts
http://api.btc38.com/v1/depth.php?c=wdc
http://api.btc38.com/v1/depth.php?c=apc
http://api.btc38.com/v1/depth.php?c=dgc
http://api.btc38.com/v1/depth.php?c=unc
http://api.btc38.com/v1/depth.php?c=qrk
http://api.btc38.com/v1/depth.php?c=tmc

历史成交API / History API

返回系统支持的历史成交记录,返回最新30条。

Return the trade history. 30 items for each call.

http://api.btc38.com/v1/trades.php?c=btc
http://api.btc38.com/v1/trades.php?c=ltc    
http://api.btc38.com/v1/trades.php?c=dog
http://api.btc38.com/v1/trades.php?c=xpm
http://api.btc38.com/v1/trades.php?c=bec
http://api.btc38.com/v1/trades.php?c=xrp
http://api.btc38.com/v1/trades.php?c=zcc
http://api.btc38.com/v1/trades.php?c=mec
http://api.btc38.com/v1/trades.php?c=anc
http://api.btc38.com/v1/trades.php?c=ppc
http://api.btc38.com/v1/trades.php?c=src
http://api.btc38.com/v1/trades.php?c=tag
http://api.btc38.com/v1/trades.php?c=pts
http://api.btc38.com/v1/trades.php?c=wdc
http://api.btc38.com/v1/trades.php?c=apc
http://api.btc38.com/v1/trades.php?c=dgc
http://api.btc38.com/v1/trades.php?c=unc
http://api.btc38.com/v1/trades.php?c=qrk
http://api.btc38.com/v1/trades.php?c=tmc

返回从[TID]往后的最多500条历史成交记录(以比特币为例)
http://api.btc38.com/v1/trades.php?c=btc&tid=100
因服务器有防CC攻击策略,每60秒内调用次数不可超过60次,超过部分将被防火墙拦截,建议将返回数据缓存到本地,再展示给用户,可以2秒左右更新一次缓存
As we have a technical strategy that limtes the frequency of  calling (no more than 60 times every 60 seconds ), so cache is recommanded. Better if your call our API every 2 seconds.


理财盒子
库神钱包