Detalhe de uma carteira
Retorna posições calculadas, totais, proventos, resultado e retornos. Por padrão, `holdings` inclui apenas posições abertas e watchlist, sem séries mensais ou transações. Use `include` para adicionar essas camadas, ou `listPortfolioTransactions` para o ledger de um ativo.
In: header
Path Parameters
Id da carteira (de listPortfolios).
Query Parameters
Camadas separadas por vírgula: closed inclui posições encerradas; monthly, séries mensais por posição; transactions, o ledger completo e potencialmente volumoso.
Response Body
curl -X GET "https://api.databolsa.com/v1/portfolios/string?include=closed%2Cmonthly"{
"id": "string",
"name": "string",
"visibility": "string",
"created_at": "string",
"exclude_from_consolidated": true,
"holdings_count": 0,
"open_positions": 0,
"closed_positions": 0,
"watchlist_entries": 0,
"merged_assets": 0,
"patrimonio": 0,
"invested": 0,
"unrealized_pl": 0,
"unrealized_pct": 0,
"realized_pl": 0,
"realized_by_month": {
"property1": 0,
"property2": 0
},
"income_received": 0,
"income_by_month": {
"property1": 0,
"property2": 0
},
"total_pl": 0,
"xirr": 0,
"returns": {
"xirr": 0,
"twr": {
"cumulative": 0,
"annualized": 0,
"months": 0
},
"explain": "string"
},
"day_change_brl": 0,
"day_change_pct": 0,
"kind_mix": "string",
"is_watchlist": true,
"any_unpriced": true,
"any_cost_unknown": true,
"fx": {
"usd_brl": 0,
"as_of": "string",
"source": "usdt",
"change_pct": 0
},
"holdings": [
{
"symbol": "string",
"asset_type": "string",
"name": "string",
"qty": 0,
"avg_price": 0,
"invested_cost": 0,
"cost_basis_known": true,
"price": 0,
"change_pct": 0,
"market_value": 0,
"unrealized_pl": 0,
"unrealized_pct": 0,
"unrealized_pct_reason": "zero_cost",
"valuation": "market",
"realized_pl": 0,
"realized_by_month": {
"property1": 0,
"property2": 0
},
"income_received": 0,
"income_by_month": {
"property1": 0,
"property2": 0
},
"weight_pct": 0,
"day_change_brl": 0,
"added_at": "string",
"tx_count": 0,
"closed": true,
"is_watchlist": true,
"priced": true,
"renamed_to": "string",
"merged_from": [
"string"
],
"currency": "string",
"price_native": 0,
"fx_rate": 0,
"native": {
"currency": "string",
"avg_price": 0,
"invested_cost": 0,
"cost_basis_known": true,
"price": 0,
"change_pct": 0,
"market_value": 0,
"unrealized_pl": 0,
"unrealized_pct": 0,
"realized_pl": 0,
"income_received": 0
},
"asset_id": "string",
"meta": null,
"transactions": [
{
"id": "string",
"kind": "string",
"trade_date": "string",
"quantity": 0,
"price": 0,
"fees": 0,
"ratio": 0,
"currency": "string",
"note": "string",
"event_kind": "string"
}
]
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"details": {
"property1": null,
"property2": null
}
}Raio-X de custos recorrentes da carteira
Estima custos anuais observáveis de posições abertas: administração de fundos, custódia do Tesouro e diferença de renda fixa bancária tributável para 100% do CDI. `items` traz destinatário, referência e excesso; `by_recipient` e `totals` agregam. Custos sem base pública ficam em `not_estimated`, sem valor inferido. `flags` descreve fatos, não recomendações.
Histórico mensal consolidado
Série mensal do patrimônio consolidado do dono da chave: valor de mercado, aporte acumulado, proventos recebidos e resultado realizado, mês a mês. Exclui carteiras marcadas como simulação.