非小号公共API
FeixiaohaoAPI是一套高性能的RESTful接口,专门设计用于满足应用程序开发人员、数据科学家和企业业务平台的需求。
------------------------------------------------------------------------------------
终结点
FeixiaohaoAPI目前只有1个顶级目录。
目录:https://fxhapi.feixiaohao.info/public/v1/ticker/*
描述:返回加密货币数据,如有序加密货币列表或价格和数量数据。
------------------------------------------------------------------------------------
快速开始
Ticker(行情)
更新频率:1分钟更新一次
访问方式:
GET
URL参数
可选:
start=(指定结果集的开始排名)
limit=(指定结果集的最大数量)
convert=(将返回的price,24hvolume,和marketcap字段转换到指定货币单位并补充到结果对象.可用的货币单位有:"AUD","BRL","CAD","CHF","CLP","CNY","CZK","DKK","EUR","GBP","HKD","HUF","IDR","ILS","INR","JPY","KRW","MXN","MYR","NOK","NZD","PHP","PKR","PLN","RUB","SEK","SGD","THB","TRY","TWD","ZAR")
访问成功:
返回码:200
返回内容:
[
{
"id":"bitcoin",
"name":"Bitcoin",
"symbol":"BTC",
"rank":1,
"logo-qjnu":"https://s1.bqiapp.com/coin/20181030_72_webp/bitcoin_200_200.webp",
"logo_png":"https://s1.bqiapp.com/coin/20181030_72_png/bitcoin_200_200.png",
"price_usd":5225,
"price_btc":1,
"volume_24h_usd":5150321567,
"market_cap_usd":92163602317,
"available_supply":17637575,
"total_supply":17637575,
"max_supply":21000000,
"percent_change_1h":0.21,
"percent_change_24h":0.64,
"percent_change_7d":6,
"last_updated":1554886833
},
{
"id":"ethereum",
"name":"Ethereum",
"symbol":"ETH",
"rank":2,
"logo-qjnu":"https://s1.bqiapp.com/coin/20181030_72_webp/ethereum_200_200.webp",
"logo_png":"https://s1.bqiapp.com/coin/20181030_72_png/ethereum_200_200.png",
"price_usd":179.65,
"price_btc":0.0344,
"volume_24h_usd":2766496907,
"market_cap_usd":18971178569,
"available_supply":105598041,
"total_supply":105598041,
"max_supply":105598041,
"percent_change_1h":0.35,
"percent_change_24h":2.18,
"percent_change_7d":8.42,
"last_updated":1554886833
}
]
其中各字段的说明如下:
"id":"币种代码",
"name":"币种英文名称",
"symbol":"币种的简称",
"rank":币种的排名,
"logo-qjnu":"币种的logo",
"logo_png":"币种的logo",
"price_usd":最新价格,
"price_btc":最新价格,
"volume_24h_usd":24h的成交额,
"market_cap_usd":流通市值,
"available_supply":流通数量,
"total_supply":总发行量,
"max_supply":最大发行量,
"percent_change_1h":1小时涨跌幅,
"percent_change_24h":24小时涨跌幅,
"percent_change_7d":7天涨跌幅,
"last_updated":行情更新时间
访问失败:
返回码:401/403或者429
内容:{"message":"APIratelimitexceeded"}
示例请求:
CURL:
curl-H"Accept:application/json"-G"https://fxhapi.feixiaohao.com/public/v1/ticker?limit=5"
C#:
usingSystem;
usingSystem.Net;
usingSystem.Web;
classCSharpExample
{
publicstaticvoidMain(stringargs)
{
try
{
Console.WriteLine(makeAPICall());
}
catch(WebExceptione)
{
Console.WriteLine(e.Message);
}
}
staticstringmakeAPICall()
{
varURL=newUriBuilder("https://fxhapi.feixiaohao.com/public/v1/ticker");
varqueryString=System.Web.HttpUtility.ParseQueryString(string.Empty);
queryString="5";
queryString="5";
queryString="USD";
URL.Query=queryString.ToString();
varclient=newSystem.Net.WebClient();
client.Headers.Add("Accepts","application/json");
returnclient.DownloadString(URL.ToString());
}
}
Java:
importjava.io.IOException;
importjava.net.URISyntaxException;
importjava.util.ArrayList;
importjava.util.List;
publicclassJavaExample{
publicstaticvoidmain(Stringargs){
Stringuri="https://fxhapi.feixiaohao.com/public/v1/ticker";
Listparatmers=newArrayList();
paratmers.add(newBasicNameValuePair("start","5"));
paratmers.add(newBasicNameValuePair("limit","5"));
paratmers.add(newBasicNameValuePair("convert","USD"));
try{
Stringresult=makeAPICall(uri,paratmers);
System.out.println(result);
}catch(IOExceptione){
System.out.println("Error:cannontaccesscontent-"+e.toString());
}catch(URISyntaxExceptione){
System.out.println("Error:InvalidURL"+e.toString());
}
}
publicstaticStringmakeAPICall(Stringuri,Listparameters)
throwsURISyntaxException,IOException{
Stringresponse_content="";
URIBuilderquery=newURIBuilder(uri);
query.addParameters(parameters);
CloseableHttpClientclient=HttpClients.createDefault();
HttpGetrequest=newHttpGet(query.build());
request.setHeader(HttpHeaders.ACCEPT,"application/json");
CloseableHttpResponseresponse=client.execute(request);
try{
System.out.println(response.getStatusLine());
HttpEntityentity=response.getEntity();
response_content=EntityUtils.toString(entity);
EntityUtils.consume(entity);
}finally{
response.close();
}
returnresponse_content;
}
}
Golang:
packagemain
import(
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"
)
funcmain(){
client:=&http.Client{}
req,err:=http.NewRequest("GET","https://fxhapi.feixiaohao.com/public/v1/ticker",nil)
iferr!=nil{
log.Print(err)
os.Exit(1)
}
q:=url.Values{}
q.Add("start","5")
q.Add("limit","5")
q.Add("convert","USD")
req.Header.Set("Accepts","application/json")
req.URL.RawQuery=q.Encode()
resp,err:=client.Do(req);
iferr!=nil{
fmt.Println("Errorsendingrequesttoserver")
os.Exit(1)
}
fmt.Println(resp.Status);
respBody,_:=ioutil.ReadAll(resp.Body)
fmt.Println(string(respBody));
}
親愛的用戶: 幣安將支持Syscoin的網絡升級,具體安排如下:幣安預計將於東八區時間2021年12月06日18:49暫停SYS代幣的充值、提現業務,以支持Syscoin將於SYS區塊高度1.
親愛的KuCoin用戶:我們很高興地宣布,KuCoin將上線VictoriaVR(VR)項目並支持交易對VR/USDT.
金色财经报道,美国证券交易委员会主席GaryGensler认为,DeFi可以提供“真正的创新”,但他相信如果没有监管合规,该行业将无法生存.
FellowBinancians,BinancewillsupporttheEthereum(ETH)networkupgradeandhardfork.TheEthereum(ETH)netw.
尊敬的用户:?????????????BKEXGlobal即将上线BOBA,详情如下:上线交易对:BOBA/USDT币种类型:ERC20充值功能开放时间:已开放交易功能开放时间:2021年12月.
巴比特讯,12月2日,信息技术发展司通过线上视频方式组织召开区块链产业发展座谈会。会议总结了2021年区块链产业发展工作推进情况,介绍了区块链标准体系建设和技术产业发展情况,研究部署了下一步重点.