非小號公共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-hujt":"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-hujt":"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-hujt":"幣種的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));
}
原文來自Messari,原文標題為《CryptoThesesfor2022》,譯者|?W3.Hitchhiker投資者來說很糟糕.
1900/1/1 0:00:00尊敬的用戶:?????????????BKEXGlobal即將上線eYe,詳情如下:上線交易對:eYe/USDT幣種類型:BEP20、ERC20充值功能開放時間:已開放交易功能開放時間:2021.
1900/1/1 0:00:00親愛的ZT用戶: ZT創新板即將上線DOE,並開啟DOE/USDT交易對。具體上線時間如下: 充值:已開啟; 交易:2021年12月6日18:00; DOE Aztec創始人:出于商業原因關閉其.
1900/1/1 0:00:00尊敬的用戶: 由於杠桿ETF產品BSV3L、DOGE4L、SXP3L、DOT5L、ATOM4L、BCH5L、ONT3L、XRP4L、ZRX3L、AUDIO3L、DODO3L、EOS3L、KNC3.
1900/1/1 0:00:00親愛的ZT用戶: ZT創新板即將上線KXA,並開啟KXA/USDT交易對。具體上線時間如下: 充值:已開啟; 交易:2021年12月6日15:30; KXA 項目簡介:Kryxivia是一款奇幻.
1900/1/1 0:00:00Gate.ioiscurrentlyholdingaMEPADtradingcompetition.Wehaveapoolof$18.
1900/1/1 0:00:00