QuantBrasil
Documentação

quantbrasil watchlists get

Consulta uma watchlist pelo ID

Sintaxe

quantbrasil watchlists get <watchlist-id>

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

Argumentos e opções

NomeTipoObrigatórioDescriçãoPadrão
watchlist-idArgumentoSimID da watchlist
--jsonOpçãoNãoExibe saída JSON

Exemplos

quantbrasil watchlists get 123

Saída (--json)

Estrutura da resposta retornada com --json:

export interface PortfolioGetResponse {
  ok: boolean;
  portfolio: PortfolioOut;
}

export interface PortfolioOut {
  id: number;
  name: string;
  kind: "WATCHLIST" | "HOLDING" | "SYSTEM" | null;
  symbols: string[];
  weights: Record<string, number> | null;
  default_allocation_input: "TARGET_WEIGHT" | "POSITION" | null;
  has_target_weights: boolean;
  has_positions: boolean;
}

Exemplo de resposta

{
  "ok": true,
  "portfolio": {
    "id": 182,
    "name": "Longo Prazo",
    "kind": "HOLDING",
    "symbols": ["PETR4", "VALE3"],
    "weights": {
      "PETR4": 0.6,
      "VALE3": 0.4
    },
    "default_allocation_input": "TARGET_WEIGHT",
    "has_target_weights": true,
    "has_positions": false
  }
}