跳到主要内容

按币种获取文章列表

HTTP request 分页获取与指定币种关联的 Web3 内容列表。

  • GET /api/v3/content/articles/listByCoin

权重(IP): 1

请求头

请求头是否必须描述
locale内容语言,默认 en_US。可选值:ar_ARaz_AZde_DEen_USes_419es_ARes_ESfa_IRfr_FRin_IDit_ITja_JPpl_PLpt_BRpt_PTru_RUuk_UKvi_VNzh_CNzh_TW

请求参数

参数名类型是否必须适用板块描述
sectionString全部内容板块:wikinewslearnquestions
symbolString条件必填全部币种符号,例如 BTC;与 slug 至少传一个。
slugString条件必填全部币种 slug,例如 btc;与 symbol 至少传一个。
startEnableDateStringnewsenabledDate 区间起始值(含),支持 Unix 秒或毫秒时间戳;其他板块忽略。
endEnableDateStringnewsenabledDate 区间结束值(含),支持 Unix 秒或毫秒时间戳;不传时结果默认不超过当前时间,其他板块忽略。
withCountBoolean全部是否返回总数和总页数,默认 false
pageInteger全部页码,从 1 开始,默认 1
pageSizeInteger全部每页数量,默认 25,最大 200
populateThumbnailBooleanwikinewslearn是否返回 thumbnail,默认 falsequestions 板块忽略。
populateTagListsBoolean全部是否返回 tagLists,默认 false
populateCoinsBoolean全部是否返回 coinsMaps,默认 false

请求示例

curl "https://api-spot.weex.com/api/v3/content/articles/listByCoin?section=learn&symbol=BTC&page=1&pageSize=10&withCount=true&populateThumbnail=true&populateTagLists=true&populateCoins=true" \
-H "ACCESS-KEY:*******" \
-H "ACCESS-SIGN:*******" \
-H "ACCESS-PASSPHRASE:*****" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale: en_US" \
-H "Content-Type: application/json"

返回参数

字段名类型描述
totalLong总记录数。withCount=false 时可能为 null
pageInteger当前页码。
pageSizeInteger每页数量。
pagesInteger总页数。withCount=false 时可能为 null
hasNextPageBoolean是否存在下一页。
itemsArticleListItem[]文章列表,字段定义请参见获取文章列表

列表不返回文章正文。每条记录固定包含获取文章列表中定义的 30 个 ArticleListItem 字段;不适用于当前 section 的字段返回 null,不会省略。

返回示例

{
"total": 154,
"page": 1,
"pageSize": 10,
"pages": 16,
"hasNextPage": true,
"items": [
{
"id": 1714,
"documentId": "vvcry6rt2d8bt5e4kgaaxkv7",
"v4Id": null,
"section": "learn",
"title": "什么是比特币?",
"summary": null,
"level": "Beginner",
"contentKey": "learn-bitcoin",
"titleEn": "What Is Bitcoin?",
"thumbnail": null,
"tagLists": [],
"coinsMaps": [
{
"id": 1,
"documentId": "btc-coin-map",
"slug": "btc",
"symbol": "BTC",
"name": "Bitcoin",
"icon": "https://example.com/btc.png",
"type": "Tokens",
"locale": "en_US"
}
],
"publishedAt": 1780993501641,
"createdAt": 1780993356022,
"updatedAt": 1780993519507
}
]
}