Skip to main content

ANBIMA XML (types 5 and 401)

Overview​

QI DTVM 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.

Routine parameters​

In the delivery through the fund's routine, the file is generated for the delivery's fund_class_key and reference_date. Two optional parameters can be configured in the routine by the integration team — they are not accepted in the on-demand download through the API:

ParameterDescription
type_fund_code_anbimaCode 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_keyXML 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
NamingType 5: FD{fund CNPJ, digits only}_{YYYYMMDD}.xml, the ANBIMA standard name (without a registered CNPJ, it falls back to the {short_fund_name}_xml_5_by_composition_{YYYY-MM-DD}.xml pattern, which is the one in the examples package). Type 401: {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 POST /composition/fund_class/{fund_class_key}/report, setting report_type to xml_5_by_composition or xml_401_by_composition. The response returns the file in base64 in the document_b64 field. Contract, profiles with access and errors in Download the Portfolio.
Request Body
{
"composition_type": "final_quota",
"report_type": "xml_5_by_composition",
"reference_date": "2026-07-29"
}
The validation portfolio does not generate XML

The two XMLs are not generated for the pre_quota portfolio (response 404, CMP000026). The portfolio must be in confirmed, pending_confirmation or reproved_by_agent; in any other status, the response is 400 (CMP000015).

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.