Skip to main content

Custom classifications and reclassification

Your organization can now create its own security classifications and reclassify any security, adapting the class tree to the way it evaluates its portfolios.

New endpoints to manage custom classifications:

The List Securities Classifications endpoint now also includes your organization's classifications.

To reclassify a security, send the desired classificationId to Update Security by ID, or null to return it to the official classification. The reclassification applies to all portfolios in your organization and is reflected in positions and metrics.

Learn more in Security Classification.

Events for custom securities

You can now register and manage the events of your custom securities, such as expiration, amortization, interest and dividends, so that they are reflected in the positions, Profit & Loss and returns of your portfolios.

New endpoints:

Supported types:

  • Expiration (EXPIRATION), with the settlement price (settlementPrice). It closes the positions in the security on the event date, and each security can have only one.
  • Cash events (CASH_AMORTIZATION, CASH_AMORTIZATION_UNSCHEDULED, CASH_DIVIDEND, CASH_INCOME, CASH_INTEREST, CASH_JSCP, CASH_PREMIUM and CASH_RETURN_OF_CAPITAL), with the amount paid per unit of the security (unitValue).

Every event has a reference date (referenceDate) and a payment date (paymentDate), which cannot be earlier than the reference date.

// REQUEST
// POST https://core.gorila.com.br/securities/{securityId}/events

{
"type": "CASH_AMORTIZATION",
"referenceDate": "2024-01-31",
"paymentDate": "2024-02-05",
"unitValue": 2.5
}

Learn more in Custom Security.

Creation date filters in the transaction list

You can now filter the transaction list by the date each transaction was created or updated, which makes it easier to fetch only what changed since your last sync.

The List Transactions and List Economic Group Transactions endpoints accept four new query parameters, in the YYYY-MM-DD format:

  • createdDateFrom and createdDateTo: transactions created from and/or up to the given date.
  • updatedDateFrom and updatedDateTo: transactions updated from and/or up to the given date.

They can be combined with the other filters of the list. The creation and update dates of each transaction are returned in the createdDate and updatedDate fields.

Drawdown

You can now query the drawdown of portfolios and economic groups: the percentage drop of the accumulated return relative to its peak.

The new Read Drawdown and Read Economic Group Drawdown endpoints return the daily drawdown series, with the date (referenceDate) and the value (drawdown) of each point, in decimal format (-0.25 means a 25% drop).

The peak is always calculated from the entire history: startDate and endDate only trim the returned series. The endpoints also accept filters by security, asset class, security type, classification and broker, which restrict the positions considered.

Learn more in Drawdown.

Multi-class funds (CVM 175)

Fund securities now carry the class and subclass structure introduced by CVM Resolution 175. Each subclass is a separate security, so you can tell apart securities that share the same CNPJ.

The List Securities and Read Security by ID endpoints return the new fund identification fields: anbimaFundId, anbimaFundName, anbimaClassId, anbimaClassName, anbimaSubclassId, anbimaSubclassName, cvmClassId and cvmSubclassId.

Example of the new fields in the response:

{
"anbimaFundId": "F0000261599",
"anbimaFundName": "Fundo de Investimento em Cotas de Fundos de Investimento RIVO FIDC",
"anbimaClassId": "C0000261599",
"anbimaClassName": "RIVO FIDC",
"anbimaSubclassId": "S0000261599",
"anbimaSubclassName": "SÊNIOR",
"cvmClassId": "1",
"cvmSubclassId": "1"
}

Since several securities can share the same CNPJ, multi-class funds must be referenced by the security ID (security.id) when creating transactions (Create Transaction) and price conversions (Price Conversion). Requests that identify these funds by cnpj are rejected with a 400 error.

Step-up CDBs

You can now create floating-rate banking bonds with a progressive rate (step-up CDBs), in which the percentage of CDI changes on predefined dates.

The Create Security endpoint accepts two new optional fields for FLOATING_RATE_BANKING_BOND securities:

  • scaleType: INCREMENTAL (the new rate applies only from the change date onward) or RETROACTIVE (once the change date is reached, the new rate applies from the bond's start). The default is NONE.
  • scaling: the list of rate changes, each with its date (date) and the new multiplier.

The multiplier field still indicates the rate in effect at issuance. Both fields must be sent together, and step-up rates are accepted only for bonds indexed to CDI, without spread and with interestPaymentPeriod equal to BULLET. The List Securities and Read Security by ID endpoints also return scaleType and scaling.

// REQUEST
// POST https://core.gorila.com.br/securities

{
"type": "FLOATING_RATE_BANKING_BOND",
"bankingBondType": "CDB",
"initialDate": "2025-01-01",
"maturityDate": "2030-01-01",
"issuerId": "30306294000145",
"issuanceFaceValue": 1000,
"index": "CDI",
"multiplier": 1.0,
"scaleType": "INCREMENTAL",
"scaling": [
{ "date": "2026-01-01", "multiplier": 1.05 },
{ "date": "2027-01-01", "multiplier": 1.10 }
]
}

Learn more in the "Step-up CDB" section of Security.

Classification when creating custom securities

You can now set the classification of a custom security when creating it, with the new optional classificationId field.

In the Create Security endpoint, with the CUSTOM type, send in classificationId the identifier of the desired classification, which you can get from List Securities Classifications. Without the field, the security is classified based on its asset class (assetClass).

//REQUEST
//POST https://core.gorila.com.br/securities

{
"type": "CUSTOM",
"name": "Fazenda Boa Vista",
"description": "Fazenda Boa Vista - MG",
"assetClass": "TANGIBLE",
"initialDate": "2022-04-04",
"classificationId": "TANGIBLE_GENERIC"
}

Learn more in Custom Security.

Metrics from the exposure perspective

The Net Asset Value (NAV), market value and TWR of portfolios and economic groups can now be calculated from the exposure perspective. This avoids distorted returns in portfolios leveraged with futures and forwards.

The new optional marketValueType parameter accepts two values:

  • AUTO (default): keeps the previous behavior. NAV and market value follow the wealth perspective, in which futures and forwards have a zero market value.
  • EXPOSURE: futures and forwards are always calculated from the exposure perspective (quantity × closing price × contract multiplier). In NAV and market value, they contribute the full value of the contracts (signed), and TWR is measured over the exposure.

The parameter is available in:

Learn more in Exposure.

Crypto futures contracts

Portfolios now support crypto futures contracts, including Bitcoin (BIT), Ethereum (ETR) and Solana (SOL) futures.

These contracts can be registered in portfolio transactions and are included in the portfolio's metrics, like the other futures contracts. See how to register a futures transaction in Transactions - Examples.

API key management in GorilaVIEW

Owners and admins of business organizations can now list, create and delete the organization's API keys directly in GorilaVIEW, without contacting Gorila's support team. Organization API keys are now called OATs.

On the organization management page in GorilaVIEW, available to users with the Owner or Admin role, you can:

  • list, create and delete the organization's API keys (OATs);
  • define whether the organization's users can create Personal Access Tokens (PATs).

The new name is only a change in terminology: existing keys keep working and are sent the same way, in the Authorization header. PATs remain the personal keys, tied to a user.

Keys issued by Gorila's team are now delivered through a single-use link, so that Gorila employees do not have access to your key.

Learn more about API keys in Organization.

New bond: CDCA

Agribusiness credit rights certificates (CDCA, Certificados de Direitos Creditórios do Agronegócio) are now supported, with the CORPORATE_BONDS_CDCA security type. They are handled like debêntures, CRIs and CRAs, with integrated prices and events.

As with the other corporate bonds, you don't need to create the security: find it with List Securities and register transactions with Create Transaction, identifying the CDCA by securityId or ISIN.

Learn more in Transactions - Examples.

Organization control over PATs

Organizations now have more control over their users' Personal Access Tokens (PATs): requests made with the PAT of a deactivated user, or of an organization that has disabled PATs, are rejected.

The API now checks two conditions on every request authenticated with a PAT:

  • Active user: if the user who owns the PAT has been deactivated in Gorila, the request returns 401 with the message inactive user.
  • PATs enabled in the organization: organizations can disable the use of PATs by their users. While PATs are disabled, new PATs cannot be created, and requests with the organization's existing PATs return 401:
{
"code": 401,
"message": "Personal Access Tokens are disabled for this organization"
}

The organization's API keys are not affected by these checks.

New security classification

GorilaCORE now supports Gorila's new security classification: a hierarchical tree of classes and subclasses with up to 4 levels, which you can use to filter and group the metrics of portfolios and economic groups.

In the tree, an inflation-indexed government bond, for example, is under "Fixed Income > Inflation Indexed > Government Bond". The levels go from CLASSIFICATION_L0 (the broadest) to CLASSIFICATION_L3 (the most detailed). What's new:

  • Classification tree: the new List Securities Classifications endpoint lists the classifications, with filters by level (classificationLevel) and by parent classification (parentId).
  • Classification of each security: security objects, such as those returned by List Securities and Read Security by ID, now include the classifications field, with the security's classification at each level.
  • Filter: most metrics endpoints of portfolios and economic groups accept the securityClassification filter, with the identifier of a classification.
  • Grouping: the per-position endpoints that accept groupBy, such as List Position Market Values, accept grouping the result by classification level: CLASSIFICATION_L0, CLASSIFICATION_L1, CLASSIFICATION_L2 or CLASSIFICATION_L3.

Learn more in Security Classification.

Portfolio alias and connected portfolios

The portfolio object now has two new fields: alias, a nickname defined by your organization, and connected, which indicates whether the portfolio belongs to someone else and was shared with your organization.

Both fields are returned by endpoints such as List Portfolios and Read Portfolio by ID:

  • connected: true when the portfolio was shared with (connected to) your organization and is not owned by it.
  • alias: the nickname your organization gives the portfolio, or null when there is none. The original name (name) does not change, and the portfolio's owner does not see the alias.

The alias is useful, for example, to identify connected portfolios with your organization's internal codes. To set, change or remove it, use Update Portfolio by ID, sending alias with the new value or null:

{
"alias": "ID-0042"
}

Learn more in Portfolio.

New banking bond: LCD

Banking bonds can now be created with the new LCD type, to represent Letras de Crédito do Desenvolvimento.

In the Create Security endpoint, send bankingBondType equal to LCD when creating a fixed-rate (FIXED_RATE_BANKING_BOND) or floating-rate (FLOATING_RATE_BANKING_BOND) banking bond. The resulting security has the CORPORATE_BONDS_LCD type and, like the other banking bonds, can then be used in transactions through the returned securityId.

Learn more in Security.

Dividend yield by position

You can now query the dividend yield of a portfolio's positions: how much each security paid out in income, per unit, relative to its price over a period.

The new List Position Dividend Yield endpoint returns, for each security in the portfolio:

  • dividendYield: the dividend yield for the period, in decimal format (0.05 = 5%);
  • hasOpenPositionAllDays: whether there was a position on every day of the period;
  • currency: the security's payment currency;
  • security: the security's basic data.

The dividend yield is the sum of the income per unit with ex-dates in the period, divided by the security's closing price. The period is defined by startDate and endDate; when endDate is not informed, today's date is used. The endpoint also allows filtering by security, asset class, security type and broker.

Learn more in Dividend Yield.

More precise symbol search

Searching for securities by symbol is now more precise: the search only returns securities whose symbol is exactly the searched term or starts with it.

The change affects the search parameter of the List Securities endpoint. Previously, symbol matching was approximate, which could return incorrect results, for example, when searching by CNPJ. Searches by the security's descriptive name are not affected and remain approximate.

Learn more in Security.

New filters in the transaction list

The transaction lists of portfolios and economic groups now accept new filters, so you can fetch only the transactions you need instead of filtering the full list on your side.

The List Transactions and List Economic Group Transactions endpoints accept the following optional query parameters:

  • brokerId: the broker's CNPJ.
  • securityId: Gorila's identifier of the security.
  • type: the transaction type, such as REGULAR or CUSTODY_TRANSFER.
  • side: the transaction direction, BUY (purchase) or SELL (sale).

The filters can be combined with each other and with the period filters (startDate and endDate). For example, to list only the sales of a security:

GET /portfolios/{portfolioId}/transactions?securityId=1651&side=SELL

Learn more in Transaction.

Managed funds

Managed funds can now be created as securities in GorilaCORE, with the new MANAGED_FUND type, and receive transactions in portfolios.

In the Create Security endpoint, send type equal to MANAGED_FUND. Registration follows the same model as investment clubs (INVESTMENT_CLUB): name (name), description (description), asset class (assetClass) and initial date (initialDate) are required, and the cnpj is optional.

As with investment clubs, the quota value is provided by your organization. Use Upsert Security Prices to send the price series, List Security Prices to query it and Delete Security Prices to remove the price of a date.

Learn more in Security.

Economic group invested amount

You can now query the invested amount of economic groups, both consolidated and per position, with the same views already available for portfolios.

Two new endpoints were added:

The group's invested amount is the sum of the invested amounts of the positions of its portfolios. Both endpoints accept the same filters as the portfolio version (security, asset class, security type and broker), and values are expressed in Brazilian reais (BRL).

Learn more in Invested Amount.