实时新闻
机器翻译译自英文(docs.alpaca.markets)本页 11 段已全部译完
此 API 通过 websocket 流提供股票市场新闻。你可以在此处找到实时 WebSocket 流的通用说明。本页重点介绍新闻流。
URL
新闻流的 URL 为
wss://stream.data.alpaca.markets/v1beta1/news
沙盒 URL:
wss://stream.data.sandbox.alpaca.markets/v1beta1/news
频道
新闻
模式
| 属性 | 类型 | 说明 |
|---|---|---|
| T | string | 消息类型(新闻为 "n") |
| id | int | 新闻文章 ID |
| headline | string | 文章的标题 |
| summary | string | 文章摘要(可能是内容的第一句) |
| author | string | 新闻文章原作者 |
| created_at | string | 文章创建日期,RFC-3339 格式 |
| updated_at | string | 文章更新日期,RFC-3339 格式 |
| content | string | 新闻文章内容(可能包含 HTML) |
| url | string | 文章 URL(如适用) |
| symbols | array<string> | 相关或提及的股票代码列表 |
| source | string | 新闻来源(例如 Benzinga) |
示例
{
"T": "n",
"id": 24918784,
"headline": "Corsair Reports Purchase Of Majority Ownership In iDisplay, No Terms Disclosed",
"summary": "Corsair Gaming, Inc. (NASDAQ:CRSR) (“Corsair”), a leading global provider and innovator of high-performance gear for gamers and content creators, today announced that it acquired a 51% stake in iDisplay",
"author": "Benzinga Newsdesk",
"created_at": "2022-01-05T22:00:37Z",
"updated_at": "2022-01-05T22:00:38Z",
"url": "https://www.benzinga.com/m-a/22/01/24918784/corsair-reports-purchase-of-majority-ownership-in-idisplay-no-terms-disclosed",
"content": "\u003cp\u003eCorsair Gaming, Inc. (NASDAQ:\u003ca class=\"ticker\" href=\"https://www.benzinga.com/stock/CRSR#NASDAQ\"\u003eCRSR\u003c/a\u003e) (\u0026ldquo;Corsair\u0026rdquo;), a leading global ...",
"symbols": ["CRSR"],
"source": "benzinga"
}示例
$ websocat -H="APCA-API-KEY-ID: ${APCA_API_KEY_ID}" -H="APCA-API-SECRET-KEY: ${APCA_API_SECRET_KEY}" \
"${APCA_API_STREAM_URL}/v1beta1/news"
[{"T":"success","msg":"connected"}]
[{"T":"success","msg":"authenticated"}]
{"action":"subscribe","news":["*"]}
[{"T":"subscription","news":["*"]}]
[{"T":"n","id":40892639,"headline":"VinFast Officially Launches VF 3 Electric Vehicle In The Philippines","summary":"VinFast Auto has officially opened pre-orders for the VF 3 in the Philippines. From September 19 to 30, early customers who reserve the VF 3 will enjoy several attractive incentives and privileges, including a","author":"Benzinga Newsdesk","created_at":"2024-09-17T09:02:44Z","updated_at":"2024-09-17T09:02:45Z","url":"https://www.benzinga.com/news/24/09/40892639/vinfast-officially-launches-vf-3-electric-vehicle-in-the-philippines","content":"\u003cp\u003eVinFast Auto has officially opened pre-orders for the VF 3 in the Philippines.\u003c/p\u003e\u003cp\u003e\u0026nbsp;\u003c/p\u003e\u003cp\u003eFrom September 19 to 30, early customers who reserve the VF 3 will enjoy several attractive incentives and privileges, including a special price of 605,000 pesos (battery subscription) or 705,000 pesos (battery included). After this period, the prices will revert to the MSRP of 645,000 pesos (battery subscription) and 745,000 pesos (battery included).\u003cbr\u003e\u003cbr\u003eAdditionally, early VF 3 customers will have the privilege of choosing from nine striking exterior paint colors, including four base colors and five premium options, free of charge. Premium paint colors will cost an additional 20,000 pesos after this period.\u003cbr\u003e\u003cbr\u003eMoreover, from September 19 to 30, for only 40,000 pesos, early customers can customize their car's paint beyond the nine available colors. This will be the only time VinFast offers this exclusive privilege for the VF 3.\u003cbr\u003e\u003cbr\u003eVinFast is accepting deposits of 5,000 pesos through its official website or at authorized dealerships (refundable under VinFast's terms).\u003cbr\u003e\u0026nbsp;\u003c/p\u003e","symbols":["VFS"],"source":"benzinga"}]AI 翻译查看英文原文