Skip to main content

ANBIMA XML (types 5 and 401)

Overview

QI CTVM generates the portfolio position files in the ANBIMA standard from the fund's portfolio composition. There are two models, delivered as independent files:

ModelStandardDescription
xml_5_by_compositionANBIMA 5.0 Position File (ISO 20022, semt.003.001.04)Portfolio position in an ISO 20022 structure, with the identification of the administrator, manager and custodian, position by asset, payables and receivables.
xml_401_by_compositionANBIMA 4.01 Position FilePortfolio position in the 4.01 layout, with the fund header and blocks by asset class.
Which one is "the ANBIMA XML"

When people talk about the ANBIMA XML in everyday work, the file in question is the xml_5_by_composition — version 5.0 of the position file. The xml_401_by_composition is the previous version of the same standard, still required by some consumers.

What you need to provide

VariableRequiredDescription
fund_class_keyyesIdentifier of the fund class the file is generated for.
reference_dateyesReference date of the position, in the YYYY-MM-DD format.
type_fund_code_anbimanoCode of the fund type in the ANBIMA table. When omitted, it is derived from the fund registration. A code outside the list of valid ones makes the generation fail.
issuance_serie_keyno (XML 401 only)Restricts the file to a single issuance series. Without it, all the series of the class enter the file.

File Structure

AttributeValue
FormatXML
EncodingUTF-8
Naming{short_fund_name}_xml_5_by_composition_{YYYY-MM-DD}.xml and {short_fund_name}_xml_401_by_composition_{YYYY-MM-DD}.xml

Both files are generated from a portfolio composition already closed on the reference date — confirmed or awaiting confirmation. Before assembling the file, the service reconciles the position: the sum of the assets, plus the receivables, minus the payables, must reconcile with the net worth reported by the issuance series. When it does not reconcile, the file is not generated.

How to receive them

There are two ways, which can be used together:

  1. In the fund's delivery routine, along with the other reports — see how the reports are delivered. Just ask the integration team to include the xml_5_by_composition and/or xml_401_by_composition models in the delivery configuration.
  2. On demand, through the API, with the composition report download route:
ENDPOINT
/composition/fund_class/{fund_class_key}/report
METHOD
POST
Request Body
{
"composition_type": "final_quota",
"report_type": "xml_5_by_composition",
"reference_date": "2026-07-29"
}

The response returns the file in base64, in the document_b64 field. The portfolio must be in the confirmed status for the download to be possible. Details in Portfolio - Download the Portfolio.

Content of the type 5 file

The file has the PosicaoAtivosCarteira root element and is divided into two parts:

  • AppHdr — message header: sending administrator (name and CNPJ), recipient fund, message identifier, layout version (semt.003.001.04), service (Arquivo de Posicao 5.0) and generation date/time.
  • Document / SctiesBalAcctgRpt — body of the position:
ElementContent
PgntnPagination of the file.
StmtGnlDtlsGeneral data of the statement: composition date, frequency and update type.
AcctOwnrCNPJ of the administrator (account owner).
AcctSvcrCNPJ of the manager.
SfkpgAcctCNPJ and name of the custodian.
BalForAcctFund class and issuance series, with ISIN, number of quotas, quota value, total value of the assets, and the breakdown of payables (PAYA) and receivables (RECE).
SubAcctDtlsOne entry per asset of the portfolio: public securities, private securities, debentures, fund quotas, credit rights, swaps, real estate and cash accounts.
AcctBaseCcyTtlAmtsTotal net worth of the fund.

The payables are classified with the ISO codes corresponding to the nature of the expense — ADMF (administration fee), MANF (management), PERF (performance), CETI (CETIP), REGF (CVM), ANBI (ANBIMA), AUDT (audit), SELC (SELIC), CUST (custody), LEGA (services) — or OTHR for the others.

Content of the type 401 file

The file has the arquivoposicao_4_01 root element, with a fundo element that brings together:

BlockContent
headerISIN, CNPJ and name of the fund, position date, administrator, manager and custodian, quota value and number of quotas, net worth, value of the assets, receivables and payables, ANBIMA fund type.
titpublicoOne block per public security, with the SELIC code, dates, quantities, unit prices, index and financial value.
titprivadoOne block per private security that is not a debenture.
debentureOne block per debenture.
swapOne block per swap contract, with asset and liability values.
cotasOne block per invested fund quota, with ISIN, CNPJ of the fund, quantity and unit price.
caixaBalance of the cash accounts.
despesasAdministration and performance fees of the fund.
outrasdespesasOther provisioned expenses.
provisaoProvisions established, with date and value.
fidcTotal financial value of the credit rights of the portfolio.

Blocks without a position on the date are not included in the file.