加密貨幣新闻
此端點用於查詢指定加密貨幣的新聞資訊,返回指定語言和加密貨幣的新聞資訊列表。
HTTP 請求
bash
GET /market/v1/tickers/{symbol}/news?lang={lang}查詢參數
| 名稱 | 類型 | 是否必需 | 描述 |
|---|---|---|---|
| symbol | string | 是 | 加密貨幣交易對代碼,例如:BTC-USDT |
| page | int | 否 | 當前頁碼,默認 1 |
| page_size | int | 否 | 每頁筆數,默認 20 |
| lang | string | 否 | 語言代碼(多語言),默認 en |
可選請求標頭
| 標頭名稱 | 類型 | 是否必須 | 描述 |
|---|---|---|---|
| Accept-Language | string | 否 | 首选语言(例如:en、zh、ja 等) |
cURL 範例
bash
curl --location --request GET '{$base_url}/market/v1/tickers/BTC-USDT/news?lang=en&page=1&page_size=20' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'X-API-Signature: YOUR_GENERATED_SIGNATURE' \
--header 'X-API-Timestamp: 1746774142003' \
--header 'Accept-Language: en'成功回應格式
请求响应的数据字段描述。
| 名稱 | 類型 | 描述 |
|---|---|---|
| headline | string | 標題 |
| content | string | 內容(文章連結) |
| moment | string | 發佈時間(UTC) |
| product_ids | string[] | 關聯加密貨幣代碼 |
成功回應範例
json
{
"code": 0,
"data": {
"total_records": 2,
"page": 1,
"page_size": 20,
"news": [
{
"headline": "Bitcoin reaches new all-time high amid institutional adoption",
"content": "https://xxxxxx.com/news/062706614.html",
"moment": "2025-05-29T06:27:06Z",
"product_ids": ["BTC-USDT"]
},
{
"headline": "Ethereum 2.0 staking rewards increase as network upgrades",
"content": "https://xxxxxx.com/news/061900055.html",
"moment": "2025-05-29T06:19:00Z",
"product_ids": ["ETH-USDT", "LTC-USDT"]
}
]
}
}錯誤回應範例
json
{
"code": 14010012,
"message": "Internal server error"
}
