QuantBrasil
Documentação

quantbrasil news asset

Busca notícias recentes para um ticker

Sintaxe

quantbrasil news asset <ticker>

Esta é uma operação de leitura. Modos de saída: json, human.

Argumentos e opções

NomeTipoObrigatórioDescriçãoPadrão
tickerArgumentoSimTicker do ativo, por exemplo PETR4
--window <days>OpçãoNãoJanela de busca em dias30
--limit <count>OpçãoNãoNúmero máximo de notícias20
--jsonOpçãoNãoMostra a resposta em JSON

Exemplos

quantbrasil news asset PETR4
quantbrasil news asset PETR4 --window 7 --limit 10
quantbrasil news asset PETR4 --json

Saída (--json)

Estrutura da resposta retornada com --json:

export interface AssetNewsResponse {
  ok: boolean;
  asset: AssetNewsAsset;
  window_days: number;
  limit: number;
  total: number;
  articles: AssetNewsArticle[];
}

export interface AssetNewsAsset {
  id: number;
  ticker: string;
  name: string | null;
  type: string | null;
}

export interface AssetNewsArticle {
  id: number;
  source_slug: string;
  source_name: string;
  title: string;
  summary: string | null;
  url: string;
  published_at: string;
  last_seen_at: string;
  content_updated_at: string | null;
  mentioned_tickers: string[];
  sentiment: AssetNewsSentiment | null;
}

export interface AssetNewsSentiment {
  model: string;
  prompt_version: string;
  sentiment: "positive" | "negative" | "neutral";
  confidence: number | null;
  reason: string | null;
  input_tokens: number | null;
  output_tokens: number | null;
  total_tokens: number | null;
  analyzed_at: string;
}

Exemplo de resposta

{
  "ok": true,
  "asset": {
    "id": 1,
    "ticker": "PETR4",
    "name": "Petrobras PN",
    "type": "B3"
  },
  "window_days": 7,
  "limit": 10,
  "total": 1,
  "articles": [
    {
      "id": 5001,
      "source_slug": "valor",
      "source_name": "Valor Econômico",
      "title": "Petrobras anuncia novo plano de investimentos",
      "summary": "A companhia detalhou os aportes previstos para o próximo ciclo.",
      "url": "https://exemplo.com.br/noticia/5001",
      "published_at": "2026-07-15T11:30:00Z",
      "last_seen_at": "2026-07-15T12:00:00Z",
      "content_updated_at": null,
      "mentioned_tickers": ["PETR4"],
      "sentiment": {
        "model": "gpt",
        "prompt_version": "v3",
        "sentiment": "positive",
        "confidence": 0.82,
        "reason": "Anúncio de investimentos tende a ser lido como positivo.",
        "input_tokens": 640,
        "output_tokens": 48,
        "total_tokens": 688,
        "analyzed_at": "2026-07-15T12:05:00Z"
      }
    }
  ]
}