Get News by Token Symbol#
Retrieve news filtered by one or more token symbols.
Request Path#
GET
https://web3.okx.com/api/v6/dex/market/social/news/by-symbolRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| tokenSymbols | string | Yes | Comma-separated list of token symbols, e.g. BTC,ETH,SOL. Case-insensitive. Maximum 20 symbols supported. |
| sortBy | string | No | Sort order: 1=latest (descending by publish time), 2=hot (descending by popularity). Default 1. |
| sentiment | string | No | SocialSentimentEnum code to filter by sentiment: 1=bullish, 2=bearish, 3=neutral. Omit to return all sentiments. |
| importance | string | No | SocialImportanceEnum code to filter by article importance: 1=high, 2=medium, 3=low. Omit to return all importance levels. |
| platform | string | No | News source domain, e.g. coindesk.com. Retrieve the full list via GET /social/news/platforms. Omit to return data from all sources. |
| limit | string | No | Number of results per page, range [1, 50], default 10. |
| cursor | string | No | Pagination cursor. Omit on first request; pass the cursor from the previous response to fetch the next page. A null cursor indicates no more data. |
| detailLevel | string | No | Response detail level: 1=summary (title + summary only, content field is empty), 2=full (also returns full article content). Default 1. |
| begin | string | No | Query start timestamp (milliseconds). Defaults to current time − 72 hours; maximum lookback of 180 days. |
| end | string | No | Query end timestamp (milliseconds). Defaults to current time (now). |
| language | string | No | Response language in BCP-47 format, e.g. en_US, zh_CN. Default en_US. |
Response Parameters#
| Field | Type | Description |
|---|---|---|
| cursor | string | Next-page cursor; null indicates no more data |
| articles | array | List of news articles |
| > id | string | Unique article ID, can be used as the id parameter of GET /social/news/detail to retrieve the full article |
| > title | string | Article title |
| > summary | string | Article summary |
| > content | string | Full article content; only returned when detailLevel=2 |
| > sourceUrl | string | Original article URL |
| > source | string | First platform domain of the news source, e.g. coindesk.com |
| > timestamp | string | Article publish time, Unix millisecond timestamp |
| > tokenSymbols | array | List of token symbols mentioned in the article |
| > importance | string | Article importance level: high, medium, or low |
| > tokenSymbolSentiments | array | Per-token sentiment analysis for this article |
| >> sentiment | string | Sentiment label: bullish / bearish / neutral |
| >> tokenSymbol | string | Token symbol |
Request Example#
shell
curl --location --request GET 'https://web3.okx.com/api/v6/dex/market/social/news/by-symbol?tokenSymbols=BTC,ETH&sortBy=1&limit=10&detailLevel=1&language=en_US' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z'
Response Example#
json
{
"code": "0",
"msg": "",
"data": {
"cursor": "eyJsYXN0SWQiOiIxNzM4MDAwMDAwMDAyIn0",
"articles": [
{
"id": "NEWS_20241018_010",
"title": "Bitcoin ETF Sees Record Inflows of $800M in Single Day",
"summary": "Spot Bitcoin ETFs recorded their highest single-day inflows since launch, signaling renewed institutional interest.",
"content": "",
"sourceUrl": "https://coindesk.com/markets/2024/10/18/bitcoin-etf-record-inflows",
"source": "coindesk.com",
"timestamp": "1697630800000",
"tokenSymbols": ["BTC"],
"importance": "high",
"tokenSymbolSentiments": [
{
"tokenSymbol": "BTC",
"sentiment": "bullish"
}
]
},
{
"id": "NEWS_20241018_011",
"title": "Ethereum Layer 2 Transactions Hit All-Time High",
"summary": "Combined transaction volume on Ethereum Layer 2 networks surpassed a new record, highlighting growing adoption of scaling solutions.",
"content": "",
"sourceUrl": "https://theblock.co/post/ethereum-l2-record",
"source": "theblock.co",
"timestamp": "1697625000000",
"tokenSymbols": ["ETH"],
"importance": "medium",
"tokenSymbolSentiments": [
{
"tokenSymbol": "ETH",
"sentiment": "bullish"
}
]
}
]
}
}