跳到主要内容

投资组合 - 获取投资组合


投资组合列表​

分页列出某一基金类别的投资组合,按日期从新到旧排列。

适用范围
角色主机所需权限
管理人manager-api读取
顾问consultant-apiView Compositions

各主机的 Base URL:环境(主机)。

Request​

ENDPOINT
/composition/fund_class/FUND_CLASS_KEY/compositions
MÉTODO
GET

Query Params​

参数描述
not_status排除处于所指定状态的投资组合。
status仅返回处于所指定状态的投资组合。
reference_date查询投资组合的参考日期,格式必须为 YYYY-MM-DD。
type投资组合类型:pre_quota、final_quota 或 opening_quota。
start_date查询区间的起始日期。如提供了 end_date 则必填。格式:YYYY-MM-DD。
end_date查询区间的结束日期。如提供了 start_date 则必填。格式:YYYY-MM-DD。
page要获取的页码,从 0 开始。默认:0。
limit每页条目数。默认:20;最大:100。

status 和 not_status 可接受多个值(?status=pending_confirmation&status=confirmed)。投资组合可能的状态有 created、pending_processing、pending_validation、pending_variation_reason、pending_quota_performance、pending_confirmation、confirmed、reproved、reproved_by_agent 和 reprocessed。等待您审批的投资组合处于 pending_confirmation。

注意

按日期筛选有两种方式:

  • 指定日期:发送 query param reference_date。
  • 时间段:同时发送 query param start_date 和 end_date。
Response Body
{
"data": [
{
"composition_key": "f2208257-1489-4937-8862-031bca34016f",
"status": "confirmed",
"composition_type": "pre_quota",
"composition_date": "2024-11-13",
"fund_class": {
"name": "A SAMPLE CLASS",
"fund_class_key": "5dac941c-c779-4049-a4ee-7cee583b6860",
"document_number": "11.222.333/0001-81"
}
},
{
"composition_key": "f2208257-1489-4937-8862-031bca34016f",
"status": "confirmed",
"composition_type": "final_quota",
"composition_date": "2024-11-13",
"fund_class": {
"name": "A SAMPLE CLASS",
"fund_class_key": "5dac941c-c779-4049-a4ee-7cee583b6860",
"document_number": "11.222.333/0001-81"
}
}
],
"limit": 20,
"page": 0,
"is_last_page": true
}

分页对象​

字段类型描述
dataarrayComposition 对象列表
limitint每页获取的对象数量上限
pageint所获取的页码
is_last_pageboolean指示所获取的页是否为最后一页

Composition​

字段类型描述
composition_keystring投资组合的唯一标识 key
statusstring该投资组合的状态
composition_typestring该投资组合的类型,pre_quota/final_quota
composition_datestring投资组合的参考日期
fund_classobjectFund Class 对象

Fund Class​

字段类型描述字符数
namestring基金类别名称最多 255
fund_class_keystring基金类别的唯一标识 key36
document_numberstring基金类别的 CNPJ-
movement_validation_modestring投资组合变动的校验模式:disabled、warning 或 blocking。不为 disabled 时,投资组合包含 变动-

投资组合详情​

返回完整的投资组合:发行系列、资产、应收、应付、账户以及状态历史。

适用范围
角色主机所需权限
管理人manager-api读取
顾问consultant-apiView Compositions

各主机的 Base URL:环境(主机)。

Request​

ENDPOINT
/composition/fund_class/FUND_CLASS_KEY/composition/COMPOSITION_KEY
MÉTODO
GET

Query Params​

参数描述
closed_lines传入 true 以包含 当日平仓的行。可选;不传时,投资组合只包含未平仓的头寸。
Response Body
{
"composition_key": "f2208257-1489-4937-8862-031bca34016f",
"status": "confirmed",
"composition_type": "pre_quota",
"composition_date": "2024-12-02",
"fund_class": {
"name": "A SAMPLE CLASS",
"fund_class_key": "5dac941c-c779-4049-a4ee-7cee583b6860",
"document_number": "11.222.333/0001-81",
"movement_validation_mode": "warning"
},
"issuance_series": [
{
"issuance_serie_key": "840e01e9-0df8-4719-83c4-f10b839d8384",
"name": "SUBORDINADA - 1",
"gross_net_worth": 1891397.29,
"net_net_worth": 1891397.29,
"gross_quota_value": 1.76821576,
"net_quota_value": 1.76821576,
"number_of_quotas": 1069664.309518427,
"applied_value": 0.0,
"applied_quotas": 0.0,
"redeemed_value": 0.0,
"redeemed_quotas": 0.0,
"amortized_value": 0.0,
"tax_anticipated_value": 0.0,
"tax_anticipated_quotas": 0.0,
"profitabilities": [
{
"reference_date": "2024-11-29",
"quota_value": 1.76065188,
"di_benchmark_quota_value": 1.7613906,
"quota_percentage": 100.43,
"di_benchmark_percentage": 100.43,
"type": "monthly"
},
{
"reference_date": "2024-11-25",
"quota_value": 1.7568068,
"di_benchmark_quota_value": 1.76049545,
"quota_percentage": 99.79,
"di_benchmark_percentage": 100.0,
"type": "monthly"
},
{
"reference_date": "2024-11-01",
"quota_value": 1.74121452,
"di_benchmark_quota_value": 1.75502225,
"quota_percentage": 99.21,
"di_benchmark_percentage": 100.0,
"type": "monthly"
},
{
"reference_date": "2024-10-03",
"quota_value": 1.72167143,
"di_benchmark_quota_value": 1.75002091,
"quota_percentage": 98.38,
"di_benchmark_percentage": 100.0,
"type": "monthly"
},
{
"reference_date": "2024-09-03",
"quota_value": 1.70128747,
"di_benchmark_quota_value": 1.74445962,
"quota_percentage": 97.52,
"di_benchmark_percentage": 100.0,
"type": "monthly"
},
{
"reference_date": "2024-06-05",
"quota_value": 1.63380383,
"di_benchmark_quota_value": 1.7178922,
"quota_percentage": 95.1,
"di_benchmark_percentage": 100.0,
"type": "monthly"
},
{
"reference_date": "2023-12-08",
"quota_value": 1.52421994,
"di_benchmark_quota_value": 1.68553599,
"quota_percentage": 90.43,
"di_benchmark_percentage": 100.0,
"type": "daily"
}
]
}
],
"assets": [
{
"asset_key": "34f42521-f27f-424a-958f-8b53f15cc80d",
"asset_type": "fixed_income_fund_quota",
"purchase_date": "2024-11-27",
"total_purchase_value": 1009320,
"bad_debt_percentage": 0,
"bad_debt_value": 0,
"overdue_accounting_value": 0,
"current_accounting_value": 1234335,
"current_fair_accounting_value": 1234335,
"previous_position_value": 1233900,
"movements": [
{
"movement_type": "accrual",
"value": 435
}
]
}
],
"consolidated_assets": [
{
"asset_type": "ccb",
"asset_category": "credit_operation",
"operation_type": "fgts",
"total_units": 100000,
"bad_debt_value": 0,
"overdue_accounting_value": 40000,
"current_accounting_value": 107762590,
"current_fair_accounting_value": 107762590,
"post_maturity_interest_value": 0,
"delay_interest_value": 0,
"delay_fine_value": 0,
"previous_position_value": 107700000,
"movements": [
{
"movement_type": "payment",
"value": -120000
},
{
"movement_type": "payment_result",
"value": 4590
},
{
"movement_type": "accrual",
"value": 178000
}
]
},
{
"asset_type": "ccb",
"asset_category": "credit_operation",
"operation_type": "unsecured_credit",
"total_units": 75623,
"bad_debt_value": 0,
"overdue_accounting_value": 35642,
"current_accounting_value": 80000000,
"current_fair_accounting_value": 80000000,
"post_maturity_interest_value": 0,
"delay_interest_value": 0,
"delay_fine_value": 0,
"previous_position_value": 79950000,
"movements": [
{
"movement_type": "purchase",
"value": 30000
},
{
"movement_type": "accrual",
"value": 20000
}
]
}
],
"receivables": [
{
"origin_key": "a60f9226-edac-488e-9a58-6205a334e6ba",
"origin_type": "expense",
"description": "Taxa CVM - 2024",
"total_value": 711515,
"recognized_value": 654125,
"start_date": "2024-01-09",
"end_date": "2024-12-31",
"payment_date": "2024-05-10",
"previous_position_value": 61200,
"movements": [
{
"movement_type": "recognition",
"value": -3810
}
]
}
],
"payables": [
{
"origin_key": "19b83b17-d36c-4edd-97fe-99af6a0a4a63",
"origin_type": "expense",
"description": "Taxa de Gestão - 2024/12",
"total_value": 14586,
"recognized_value": 14586,
"start_date": "2024-12-02",
"end_date": "2024-12-31",
"payment_date": "2025-01-08",
"previous_position_value": -14100,
"movements": [
{
"movement_type": "recognition",
"value": -486
}
]
}
],
"cash_accounts": [
{
"account_key": "a41e4fa8-6950-485e-9a5b-70f21cc6774a",
"balance": 100000,
"unconcilied_cash_in": 0,
"unconcilied_cash_out": 0,
"account_branch": "0001",
"account_digit": "1",
"account_number": "372832",
"accounting_identification": 1,
"financial_institution": {
"code": "329",
"ispb": "32402502",
"name": "QI Sociedade de Crédito Direto"
}
}
]
}

完整 Composition​

字段类型描述
composition_keystring投资组合的唯一标识 key
statusstring该投资组合的状态
composition_typestring该投资组合的类型,pre_quota/final_quota
composition_datestring投资组合的参考日期
fund_classobjectFund Class 对象
issuance_seriesarrayIssuance Series 对象列表
assetsarrayAssets 对象列表
consolidated_assetsarrayConsolidated Assets 对象列表
receivablesarrayReceivables 对象列表
payablesarrayPayables 对象列表
cash_accountsarrayCash Accounts 对象列表
status_eventsarray投资组合的状态历史。见 Status Events

Issuance Serie​

字段类型描述
issuance_serie_keystring发行系列的唯一标识 key
namestring该系列的名称
gross_net_worthfloat该系列的总净资产(PL Bruto)
net_net_worthfloat该系列的净资产净额(PL Líquido)
gross_quota_valuefloat份额总值
net_quota_valuefloat份额净值
number_of_quotasfloat份额总数
applied_valuefloat期间内申购总金额(可选)
applied_quotasfloat期间内申购份额数量(可选)
redeemed_valuefloat期间内赎回总金额(可选)
redeemed_quotasfloat期间内赎回份额数量(可选)
amortized_valuefloat期间内摊销总金额(可选)
tax_anticipated_valuefloat预缴税款金额(可选)
tax_anticipated_quotasfloat预缴税款对应的份额数量(可选)
isin_codestring该系列的 ISIN 代码(可选)
profitabilitiesarrayProfitability 对象列表

Profitability​

字段类型描述
reference_datestring分析业绩所依据的参考日期
quota_valuefloat该系列在参考日期的份额净值
di_benchmark_quota_valuefloat假设参考份额按 100% DI 增长,其当前的份额净值
quota_percentagefloat期间内份额的累计收益率(%)
di_benchmark_percentagefloat期间内 DI 基准的累计收益率(%)
typestring收益率的期间类型

Assets​

字段类型描述
asset_keystring资产的唯一标识 key
asset_typestring资产类型
purchase_datestring资产的购入日期
total_purchase_valuestring资产的购入总额
bad_debt_percentagestring计提的坏账准备(PDD)比例 %
bad_debt_valueinteger计提的坏账准备(PDD)总额——以分为单位的整数
overdue_accounting_valueinteger资产的逾期金额——以分为单位的整数
current_accounting_valueinteger资产总值——以分为单位的整数
current_fair_accounting_valueinteger资产总值——以分为单位的整数
previous_position_valueinteger资产在上一个工作日的头寸——以分为单位的整数。该行未计算变动时不返回
movementsarrayMovements 对象列表。该行未计算变动时为空列表

Consolidated Assets​

每一行汇总同一 asset_type 下 operation_type 相同的资产。同一 asset_type 可能出现在多行中,每个 operation_type 一行。

注意

不要把 asset_type 当作列表的唯一键。如需某一资产类型的合计,请将 asset_type 相同的各行相加。

字段类型描述
asset_typestring资产类型
asset_categorystring资产类别
operation_typestring该行资产的操作类型。资产没有操作类型时不返回
total_unitsinteger该类型及该操作类型下汇总的资产总数
bad_debt_valueinteger计提的坏账准备(PDD)总额——以分为单位的整数
overdue_accounting_valueinteger资产的逾期金额——以分为单位的整数
current_accounting_valueinteger资产总值——以分为单位的整数
current_fair_accounting_valueinteger资产公允总值——以分为单位的整数
post_maturity_interest_valueinteger到期后利息——以分为单位的整数
delay_interest_valueinteger逾期利息——以分为单位的整数
delay_fine_valueinteger逾期罚金——以分为单位的整数
previous_position_valueinteger该行在上一个工作日的头寸——以分为单位的整数。该行未计算变动时不返回
movementsarrayMovements 对象列表。该行未计算变动时为空列表

Receivables​

字段类型描述
origin_keystring产生该应收项的资源的唯一标识 key
origin_typestring产生该应收项的资源类型
descriptionstring条目描述
total_valuefloat应收总额
recognized_valuefloat已确认(计提)的金额
start_datestring开始确认的日期
end_datestring结束确认的日期
payment_datestring清算日期
previous_position_valueinteger该条目在上一个工作日的头寸——以分为单位的整数。该行未计算变动时不返回
movementsarrayMovements 对象列表,不含 units。该行未计算变动时为空列表

Payables​

字段类型描述
origin_keystring产生该应付项的资源的唯一标识 key
origin_typestring产生该应付项的资源类型
descriptionstring条目描述
total_valuefloat应付总额
recognized_valuefloat已确认(计提)的金额
start_datestring开始确认的日期
end_datestring结束确认的日期
payment_datestring清算日期
previous_position_valueinteger该条目在上一个工作日的头寸——以分为单位的整数。该行未计算变动时不返回
movementsarrayMovements 对象列表,不含 units。该行未计算变动时为空列表

Movements​

变动用于解释该行当日的变化:previous_position_value 加上各变动的 value 等于该行的当前头寸。仅当基金类别的 movement_validation_mode 不为 disabled 时,才会在 pre_quota 和 final_quota 投资组合中计算变动。

字段类型描述
movement_typestring变动类型。见 movement_type 枚举值
valueinteger变动对该行头寸的影响(带正负号)——以分为单位的整数
unitsfloat变动的单位数量(如有)。仅出现在 assets 和 consolidated_assets 中

各行的当前头寸为:

列表当前头寸
assetscurrent_fair_accounting_value - bad_debt_value
consolidated_assetscurrent_fair_accounting_value - bad_debt_value + post_maturity_interest_value + delay_interest_value + delay_fine_value
receivablestotal_value - recognized_value
payables- recognized_value

movement_type 枚举值​

值描述
purchase当日购入的资产
payment收到的付款或条目的结算。冲正时符号相反
units_sale资产单位的出售
payment_result当日付款的会计损益
units_sale_result当日单位出售的会计损益
premium_deferral溢价递延
accrual当日计提
bad_debt_provision坏账准备(PDD)的变动
write_off资产核销
recognition应付项和应收项的确认(计提)

当日平仓的行​

默认情况下,当日平仓的头寸不会出现在投资组合中。传入 closed_lines=true 且基金类别的 movement_validation_mode 不为 disabled 时,该头寸会出现在当日的投资组合中:各项金额为零,带有前一日的 previous_position_value,以及解释其退出的 movements。下一个工作日该行不再出现。

列表如何识别平仓行
assetscurrent_fair_accounting_value、current_accounting_value、bad_debt_value 和 overdue_accounting_value 均为 0,且 previous_position_value 不为 0
consolidated_assetstotal_units 和所有金额均为 0,且 previous_position_value 不为 0
receivables 和 payablestotal_value 和 recognized_value 均为 0,且 previous_position_value 不为 0

Cash Accounts​

字段类型描述
account_keystring账户的唯一标识 key
balanceinteger账户余额——以分为单位的整数
unconcilied_cash_ininteger该账户待对账的入账金额——以分为单位的整数
unconcilied_cash_outinteger该账户待对账的出账金额——以分为单位的整数
account_branchstring账户所属分行
account_digitstring账户校验位
account_numberstring账号
accounting_identificationinteger该账户的会计标识
financial_institutionobjectFinancial Institution 对象
account_dataobject包含账户数据的对象(字段与上述相同)

Financial Institution​

字段类型描述
codestring金融机构的 COMPE 代码
ispbstring金融机构的 ISPB
namestring金融机构名称

Status Events​

字段类型描述
statusstring投资组合所处的状态
event_datetimestring状态变更的日期和时间
metadataobject变更相关数据(如有)。管理人拒绝时,包含其填写的 reproved_reason

错误​

状态码代码触发条件
400CMP000016列表查询只提供了 start_date 和 end_date 中的一个。
400CMP000017列表查询中 end_date 早于 start_date。
400QIT000004该 fund_class_key 属于其他管理人的基金类别。
400QIT000010查询参数无效:limit 大于 100、page 为负数或 reference_date 不符合 YYYY-MM-DD 格式。
404CMP000001不存在该 fund_class_key 对应的基金类别。
404CMP000012查询的 composition_key 在所指定的基金类别中不存在。

认证、权限和主机相关错误:参见 API 错误。