Python (SDK)
from finance_dev import FinanceDev, models
import os
with FinanceDev(
security=models.Security(
client_id=os.getenv("FINANCEDEV_CLIENT_ID", ""),
client_secret=os.getenv("FINANCEDEV_CLIENT_SECRET", ""),
),
) as fd_client:
res = fd_client.news.get_news(symbols="AAPL,GOOGL,MSFT", topics="earnings,guidance")
# Handle response
print(res)package hello.world;
import java.lang.Exception;
import java.time.OffsetDateTime;
import org.openapis.openapi.AriesJava;
import org.openapis.openapi.models.errors.ErrorResponse;
import org.openapis.openapi.models.operations.*;
public class Application {
public static void main(String[] args) throws ErrorResponse, Exception {
AriesJava sdk = AriesJava.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
GetNewsRequest req = GetNewsRequest.builder()
.symbols("AAPL,GOOGL,MSFT")
.category(Category.TECHNOLOGY)
.fromDate(OffsetDateTime.parse("2024-01-01T00:00:00Z"))
.toDate(OffsetDateTime.parse("2024-12-31T23:59:59Z"))
.build();
GetNewsResponse res = sdk.news().get()
.request(req)
.call();
if (res.object().isPresent()) {
// handle response
}
}
}curl --request GET \
--url https://api.tradearies.dev/v1/news \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tradearies.dev/v1/news', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tradearies.dev/v1/news",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tradearies.dev/v1/news"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.tradearies.dev/v1/news")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"articles": [
{
"id": "news_abc123",
"title": "Apple Reports Record Q4 Earnings",
"summary": "Apple Inc. announced record-breaking fourth quarter earnings, surpassing analyst expectations with strong iPhone sales.",
"url": "https://financialnews.com/apple-q4-earnings",
"source": "Financial News Daily",
"author": "John Smith",
"published_at": "2024-01-15T14:30:00Z",
"symbols": [
"AAPL"
],
"category": "earnings",
"sentiment": "positive",
"image_url": "https://cdn.financialnews.com/apple-earnings.jpg"
},
{
"id": "news_def456",
"title": "Tech Sector Shows Strong Growth",
"summary": "Major technology companies continue to demonstrate robust growth amid market volatility.",
"url": "https://financialnews.com/tech-sector-growth",
"source": "Market Watch",
"author": "Jane Doe",
"published_at": "2024-01-15T13:00:00Z",
"symbols": [
"AAPL",
"GOOGL",
"MSFT",
"NVDA"
],
"category": "technology",
"sentiment": "positive",
"image_url": "https://cdn.marketwatch.com/tech-growth.jpg"
}
],
"total": 150,
"limit": 20,
"offset": 0
}{
"error": "Invalid parameters",
"codes": [
{
"code": "INVALID_SYMBOL",
"field": "symbols",
"description": "One or more symbols are invalid"
}
]
}News
Get News
Retrieves the latest financial news and market updates. Returns a list of news articles relevant to trading and market activities.
GET
/
v1
/
news
Python (SDK)
from finance_dev import FinanceDev, models
import os
with FinanceDev(
security=models.Security(
client_id=os.getenv("FINANCEDEV_CLIENT_ID", ""),
client_secret=os.getenv("FINANCEDEV_CLIENT_SECRET", ""),
),
) as fd_client:
res = fd_client.news.get_news(symbols="AAPL,GOOGL,MSFT", topics="earnings,guidance")
# Handle response
print(res)package hello.world;
import java.lang.Exception;
import java.time.OffsetDateTime;
import org.openapis.openapi.AriesJava;
import org.openapis.openapi.models.errors.ErrorResponse;
import org.openapis.openapi.models.operations.*;
public class Application {
public static void main(String[] args) throws ErrorResponse, Exception {
AriesJava sdk = AriesJava.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
GetNewsRequest req = GetNewsRequest.builder()
.symbols("AAPL,GOOGL,MSFT")
.category(Category.TECHNOLOGY)
.fromDate(OffsetDateTime.parse("2024-01-01T00:00:00Z"))
.toDate(OffsetDateTime.parse("2024-12-31T23:59:59Z"))
.build();
GetNewsResponse res = sdk.news().get()
.request(req)
.call();
if (res.object().isPresent()) {
// handle response
}
}
}curl --request GET \
--url https://api.tradearies.dev/v1/news \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tradearies.dev/v1/news', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tradearies.dev/v1/news",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tradearies.dev/v1/news"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.tradearies.dev/v1/news")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"articles": [
{
"id": "news_abc123",
"title": "Apple Reports Record Q4 Earnings",
"summary": "Apple Inc. announced record-breaking fourth quarter earnings, surpassing analyst expectations with strong iPhone sales.",
"url": "https://financialnews.com/apple-q4-earnings",
"source": "Financial News Daily",
"author": "John Smith",
"published_at": "2024-01-15T14:30:00Z",
"symbols": [
"AAPL"
],
"category": "earnings",
"sentiment": "positive",
"image_url": "https://cdn.financialnews.com/apple-earnings.jpg"
},
{
"id": "news_def456",
"title": "Tech Sector Shows Strong Growth",
"summary": "Major technology companies continue to demonstrate robust growth amid market volatility.",
"url": "https://financialnews.com/tech-sector-growth",
"source": "Market Watch",
"author": "Jane Doe",
"published_at": "2024-01-15T13:00:00Z",
"symbols": [
"AAPL",
"GOOGL",
"MSFT",
"NVDA"
],
"category": "technology",
"sentiment": "positive",
"image_url": "https://cdn.marketwatch.com/tech-growth.jpg"
}
],
"total": 150,
"limit": 20,
"offset": 0
}{
"error": "Invalid parameters",
"codes": [
{
"code": "INVALID_SYMBOL",
"field": "symbols",
"description": "One or more symbols are invalid"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Maximum number of news articles to return
Required range:
1 <= x <= 100Example:
20
Number of articles to skip for pagination
Required range:
x >= 0Example:
0
Comma-separated list of stock symbols to filter news
Example:
"AAPL,GOOGL,MSFT"
News category filter
Available options:
market, earnings, economy, technology, healthcare, energy, finance Example:
"technology"
Start date for news articles (ISO 8601 format)
Example:
"2024-01-01T00:00:00Z"
End date for news articles (ISO 8601 format)
Example:
"2024-12-31T23:59:59Z"
Was this page helpful?
⌘I