quantbrasil rankings current
Consulta o topo atual de um ranking
Sintaxe
quantbrasil rankings currentEsta é uma operação de leitura. Modos de saída: json, human.
Argumentos e opções
| Nome | Tipo | Obrigatório | Descrição | Padrão |
|---|---|---|---|---|
--system <slug> | Opção | Não | Slug do ranking do sistema | — |
--id <id> | Opção | Não | ID numérico do ranking do usuário | — |
--top <n> | Opção | Não | Número de ativos do topo do ranking | 20 |
--json | Opção | Não | Exibe saída JSON | — |
Exemplos
quantbrasil rankings current --system momentum-90d --top 20
quantbrasil rankings current --system magic-formula --top 10
quantbrasil rankings current --system low-risk --top 30
quantbrasil rankings current --id 123 --top 20Saída (--json)
Estrutura da resposta retornada com --json:
export interface RankingCurrentResponse {
ok: boolean;
summary_markdown: string;
ranking: RankingDefinitionOut;
as_of: string | null;
top_n: number;
count: number;
rows: RankingCurrentRowOut[];
}
export interface RankingDefinitionOut {
id: string;
name: string;
kind: "SYSTEM" | "USER";
description: string | null;
order_metric: RankingMetricOut;
metrics: RankingMetricOut[];
latest_as_of: string | null;
total_assets: number | null;
return_simulation: RankingReturnSimulationOut;
}
export interface RankingCurrentRowOut {
rank: number;
ticker: string;
name: string | null;
order_metric: RankingMetricValueOut;
score: number | null;
metrics: Record<string, string | number | boolean | null>;
}
export interface RankingMetricOut {
key: string;
label: string;
direction: "asc" | "desc";
unit: string | null;
}
export interface RankingReturnSimulationOut {
supported: boolean;
earliest_start_date: string | null;
max_top_n: number | null;
}
export interface RankingMetricValueOut {
key: string;
label: string;
value: string | number | boolean | null;
unit: string | null;
direction: "asc" | "desc";
}Exemplo de resposta
{
"ok": true,
"summary_markdown": "Ranking 'Momentum - 90 dias' consultado. 1 ativo retornado.",
"ranking": {
"id": "momentum-90d",
"name": "Momentum - 90 dias",
"kind": "SYSTEM",
"description": "Ranking por retorno acumulado em 90 dias.",
"order_metric": {
"key": "return_value",
"label": "Retorno 90 dias",
"direction": "desc",
"unit": "ratio"
},
"metrics": [],
"latest_as_of": "2026-05-15",
"total_assets": 120,
"return_simulation": {
"supported": true,
"earliest_start_date": "2023-01-02",
"max_top_n": 30
}
},
"as_of": "2026-05-15",
"top_n": 20,
"count": 1,
"rows": [
{
"rank": 1,
"ticker": "PETR4",
"name": "Petrobras PN",
"order_metric": {
"key": "return_value",
"label": "Retorno 90 dias",
"value": 0.1234,
"unit": "ratio",
"direction": "desc"
},
"score": 1,
"metrics": {
"return_value": 0.1234
}
}
]
}