Introducing News API for Real-Time Stock & Crypto Stories

We’re excited to announce Alpaca’s News API, an extension of our Market Data API. Through our partnership with Benzinga, we now provide developers with the latest financial news through an easy-to-integrate API. Incorporate News API into your workflows to assess market movements or embed it into your fintech app to display the latest stock and crypto headlines!

Market Data API expands to include News API

Data and Limitations
Launching as a limited-time beta, News API is currently available for free with rate limits determined by current Market Data API subscription plans; 200 calls per minute for Free plans and 10,000 call per minute for Unlimited plans. News API allows users to retrieve real-time and historical news data dating back to 2015 for both stock and crypto symbols. Users can also query by a number of different fields including symbol, date, content, source, and more. Currently, news data is only provided by Benzinga.

Pricing
After the limited-time beta period and based on your selected Market Data API subscription plan, there may be additional pricing changes and/or impacts to rate limit. All News API users will be updated well in advance of any upcoming changes to the pricing structure.

Keep an edge on the market

Daily news helps to keep Trading API users aware of the latest news that may impact their portfolios and or give insights into other investments options. Along with backtesting and sentiment analysis, traders can build their algos based on strategies backed by high-quality news data analysis.

WebSocket real-time data streaming
News API provides access to real-time news data via WebSocket that lets you stay ahead of the markets. Seamlessly integrate live news data into your app or trading strategy and react to breaking news as it happens.

from alpaca_trade_api import Stream

stream_client = Stream("<API_KEY>", "<API_SECRET>")


async def news_data_handler(news):
"""Will fire each time news data is published
"""
print(news)

stream_client.subscribe_news(news_data_handler,  "AAPL")

stream_client.run()
News API real-time news code snippet

Backtesting
Backtest to assess the viability of trading strategies based on 6+ years of historical stock market and crypto news data.

from alpaca_trade_api import REST

rest_client = REST("<API_KEY>", "<API_SECRET>")
news = rest_client.get_news("AAPL", "2021-01-01", "2021-12-31")
News API historical news code snippet

Sentiment analysis
Predict market movements and assess current positions based on sentiments observed in headlines and news stories. Instead of scrapping the internet for news content and manually evaluating sentiments, News API can be used to build sentiment analysis tools to quickly quantify news data.

Engage end-users with creative in-platform news displays

News API delivers relevant market-moving content from trusted sources. By enabling this feature, Broker API developers can build their own news widget interface, display notifications, and real-time news streams. End-users will now be able to view the latest financial news to make informed decisions without having to exit your fintech app!

Key features

  • Covers stock market and crypto news data
  • 130-160 full-length articles, with images, are included for full-length stories
  • 600-900 real-time headlines per day
  • Historical querying up to 2015
  • Detailed fields offered: author, created_at, updated_at, headline, summary, content, images, URL, symbols, and source
  • Historical access via REST API and real-time streams over WebSocket

News API support has been added to all four officially maintained Alpaca SDKs.

To learn more, check out our learn article on Sentiments Analysis of Financial News with News API and Transformers, or view our full News API documentation.

Sentiments Analysis of Financial News with News API and Transformers
Alpaca now provides news data via API, allowing you to access market moving content from timely and trusted sources. In the following sections, we’ll learn how to use the news data API to place trades based on sentiment analysis.
News API
Access Alpaca’s historical and real-time stock market and crypto news through REST API and WebSocket.

Alpaca is not affiliated with Benzinga and neither are responsible for the liabilities of the other.

Brokerage services are provided by Alpaca Securities LLC ("Alpaca"), member FINRA/SIPC, a wholly-owned subsidiary of AlpacaDB, Inc. Technology and services are offered by AlpacaDB, Inc.

This is not an offer, solicitation of an offer, or advice to buy or sell securities, or open a brokerage account in any jurisdiction where Alpaca is not registered (Alpaca is registered only in the United States).

Interested in learning more about Broker API?

Don't miss out on any updates about our Broker API suite of solutions! Share your details with us and be the first to know about our latest content.

You've successfully subscribed to Alpaca Blog | Developer-First API for Stocks and Crypto
Great! Next, complete checkout for full access to Alpaca Blog | Developer-First API for Stocks and Crypto
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.