GET
/api/v1/coin/popular
获取热门币种
获取按市值排名靠前的热门币种列表。此接口为公开接口,无需认证。
请求参数
响应示例
{
"code": 200,
"msg": "success",
"data": [
{
"id": 1,
"symbol": "BTC",
"name": "Bitcoin",
"name_cn": "比特币",
"icon": "https://example.com/btc.png",
"market_cap_rank": 1
},
{
"id": 2,
"symbol": "ETH",
"name": "Ethereum",
"name_cn": "以太坊",
"icon": "https://example.com/eth.png",
"market_cap_rank": 2
}
]
}
代码示例
// cURL示例
curl -X GET "https://ziario.pro/api/v1/coin/popular?limit=10"
// PHP示例
$response = file_get_contents("https://ziario.pro/api/v1/coin/popular?limit=10");
$data = json_decode($response, true);
print_r($data);
// JavaScript示例
fetch("https://ziario.pro/api/v1/coin/popular?limit=10")
.then(response => response.json())
.then(data => console.log(data));
// Python示例
import requests
response = requests.get("https://ziario.pro/api/v1/coin/popular", params={"limit": 10})
print(response.json())