Historical Data

The historical data simplified for equities and main indicators.
GET
/historical/currencies

Query Parameters

Attribute
Description
Default
coin
List of Coins. Comma separated.
Format: ISO-4217. Example: USD,EUR,CHF
All coins.
order
Order by ascending as "asc" or descending as "desc".
desc
from
First date.
Format: YYYY-MM-DD
30 days earlier
to
Ending date.
Format: YYYY-MM-DD
Current date
OBS 1
This is a paginated endpoint. Refer to pagination documentation for more details in how to use.

Response


{
  "data": [
    {
      "id": "EUR/BRL-2021-04-19",
      "exchange": "EUR/BRL",
      "description": "Euro/Real Brasileiro",
      "timestamp": "2021-04-19",
      "open": 671,
      "close": 670,
      "high": 674,
      "low": 666
    },
    {
      "id": "USD/BRL-2021-04-20",
      "exchange": "USD/BRL",
      "description": "Dolar Americano/Real Brasileiro",
      "timestamp": "2021-04-20",
      "open": 554,
      "close": 552,
      "high": 554,
      "low": 551
    },
    {
      "id": "EUR/BRL-2021-04-20",
      "exchange": "EUR/BRL",
      "description": "Euro/Real Brasileiro",
      "timestamp": "2021-04-20",
      "open": 667,
      "close": 665,
      "high": 667,
      "low": 663
    }
  ],
  "pagination": {
      "current": 20,
      "items": 580,
      "pages": 20
    }
}
OBS 1
Values are returned in cents.
GET
/historical/debentures

Query Parameters

Attribute
Description
Default
assets
List of assets. Comma separated.
Optional.
from
First date.
Format: YYYY-MM-DD
30 days before "to"
to
Ending date.
Format: YYYY-MM-DD
Current date
order
Order by ascending as asc or descending as desc.
desc
OBS 1
This is a paginated endpoint. Refer to pagination documentation for more details in how to use.

Response


{
  "data": [
    {
      "timestamp": "2021-08-06",
      "asset": "AALM11",
      "market_quantity": 400000.0,
      "market_price_volume": 401736630.40000004,
      "treasury_quantity": 0.0,
      "treasury_price_volume": 0.0,
      "total_quantity": 400000.0,
      "total_price_volume": 401736630.40000004,
      "vna": 1000.0,
      "interest": 4.341576,
      "pu_event": 0.0,
      "pu": 1004.341576,
      "pattern": "snd_pattern"
    },
{
      "timestamp": "2021-08-06",
      "asset": "AALR12",
      "market_quantity": 35000.0,
      "market_price_volume": 283864841.68,
      "treasury_quantity": 0.0,
      "treasury_price_volume": 0.0,
      "total_quantity": 35000.0,
      "total_price_volume": 283864841.68,
      "vna": 8110.424048,
      "interest": 0.0,
      "pu_event": 0.0,
      "pu": 8110.424048,
      "pattern": "not_snd_pattern"
    }
  ],
  "pagination": {
    "current": 1,
    "items": 1866,
    "pages": 38
  }
}
GET
/historical/equities

Query Parameters

Attribute
Description
Default
symbols
List of tickers. Comma separated. Requires at least one.
from
First date.
Format: YYYY-MM-DD
30 days earlier
to
Ending date.
Format: YYYY-MM-DD
Current date
OBS 1
This is a paginated endpoint. Refer to pagination documentation for more details in how to use.

Response

{
  "data" : [
    {
      "symbol": "DISB34",
      "timestamp": "2021-03-22",
      "low": 7050,
      "high": 7232,
      "marketCapStat": {
        "high": 196023360000000,
        "low": 191090250000000,
        "close": 192879180000000,
        "open": 192445500000000
      },
      "close": 7116,
      "volume": 57019,
      "marketCap": 192879180000000,
      "open": 7100
    }
  ],
  "pagination": {
    "current": null,
    "items": 20,
    "next": 1613952000000,
    "pages": 1
  }
}
OBS 1
Values are returned in cents.
GET
/historical/finance

Query Parameters

Attribute
Description
Default
symbols
It sends a ticker’s list separated by a comma
OBS 1
This is a paginated endpoint. Refer to pagination documentation for more details in how to use.

Response

{
"data": [
  {
    "date": "2021-05-25",
    "symbol": "MGLU3",
    "market_cap": 128951382,
    "net_debt": 284515,
    "ev": 129235897,
    "revenue": 32195177,
    "ebitda": 1890067,
    "ebitda_margin": 5.9,
    "gross_margin": 25.4,
    "net_debt__ebitda": 0.2,
    "ev__ebitda": 68.4,
    "ev__revenue": 4,
    "pl": 209.1,
    "price__equity_value": 17.7,
    "net_profit": 619546,
    "ebitda_yoy": 1.0645038292618914,
    "revenue__yoy": 1.618961838571359,
    "net_profit__yoy": 0.6720841632061513,
    "net_margin": 1.9,
    "dividend_yield": 0.25,
    "roic": 7,
    "net_worth": 7270693,
    "price_to_book": 17.7
  },
  ],
  "pagination": {
    "current": 1,
    "items": 105,
    "pages": 3
  }
}
OBS 1
Values are returned in cents.
GET
/historical/funds/:id

Path Parameters

Attribute
Description
Default
id
CNPJ. Mandatory
Format: only numbers.

Query Parameters

Attribute
Description
Default
cnpj
List of CNPJs. Comma separated. Optional.
Format: only numbers.
from
First date.
Format: YYYY-MM-DD
30 days earlier
to
Ending date.
Format: YYYY-MM-DD
Current date
OBS 1
This is a paginated endpoint. Refer to pagination documentation for more details in how to use.

Response

{
  "data": [
        {
            "id": "29206333000153_2021-03-25",
            "fund": "29206333000153",
            "aum": 15305011266,
            "quota": 197,
            "net": 15248993324,
            "income": 5700000,
            "withdraw": 0,
            "shareholders": 53,
            "date": "2021-03-25"
        }
  ],
  "pagination": {
    "current": 1,
    "items": 5927,
    "pages": 198
  }
}
OBS 1
Values are returned in cents.
GET
/historical/funds/:id/portfolio

Path Parameters

Attribute
Description
Default
id
CNPJ. Mandatory
Format: only numbers.

Query Parameters

Attribute
Description
Default
symbols
List of symbols. Comma separated. Optional.
from
First date.
Format: YYYY-MM-DD
Last month
to
Ending date.
Format: YYYY-MM-DD
Last month
OBS 1
This is a paginated endpoint. Refer to pagination documentation for more details in how to use.

Response

Attribute
Description
Default
operation_type
Codes for each operation type:

1 - Brazilian Depository Receipt - BDR
2 - Debêntures
3 - Ações
4 - Obrigações por ações e outros TVM recebidos em empréstimo
5 - Ações e outros TVM cedidos em empréstimo
6 - Vendas a termo a receber
7 - Compras a termo a receber
8 - Opções - Posições lançadas
9 - Opções - Posições titulares
10 - Certificado ou recibo de depósito de valores mobiliários
11 - Outros valores mobiliários registrados na CVM objeto de oferta pública
12 - Mercado Futuro - Posições vendidas
13 - Mercado Futuro - Posições compradas
trade_type
Code for trade purpose:

1 - Para negociação
2 - Mantido até o vencimento
connection
Indicates wether the trade is connected with the fund manager or administrator.
sell_amount
Total value in reais.
buy_amount
Total value in reais.
group
4 - General coded assets (company stocks in general, but not only)
{
  "data": [
    {
      "document": "21917206000150",
      "date": "2021-05-31",
      "operation_type": 3,
      "asset_type": "Ação ordinária",
      "connection": false,
      "trade_type": 1,
      "sell_quantity": 1040000,
      "sell_amount": 8770217,
      "buy_quantity": 340000,
      "buy_amount": 3061608,
      "portfolio_amount": 2300000,
      "portfolio_market_value": 21850000,
      "confidenciality_due": "2021-08-29",
      "symbol": "AERI3",
      "isin": "BRAERIACNOR4",
      "term_start_date": "2020-11-11",
      "group": "4"
    }
  ],
  "pagination": {
    "current": 1,
    "items": 5000,
    "pages": 198
  }
}
OBS 1
Values are returned in cents.
GET
/historical/index-composition/:id

Path Parameters

Attribute
Description
Default
id
Index symbol. Example: IBOV.

Query Parameters

Attribute
Description
Default
from
First date.
Format: YYYY-MM-DD
30 days earlier
to
Ending date.
Format: YYYY-MM-DD
Current date
OBS 1
This is a paginated endpoint. Refer to pagination documentation for more details in how to use.

Response


{
  "data": [
    {
      "date": "2021-05-04",
      "last_update": "2021-05-04T19:26:14.239Z",
      "index": "IBOV",
      "symbol": "ABEV3",
      "specification": [
        "on"
      ],
      "theoretical_quantity": 4358542894,
      "close": 1480,
      "economic_value": 64506434831.2,
      "participation": 0.029881
    },
  ],
  "pagination": {
    "current": null,
    "items": 1726,
    "next": 1617580800000,
    "pages": 1
  }
}
OBS 1
Values are returned in cents.
GET
/historical/indicators

Query Parameters

Attribute
Description
Default
order
Order by ascending as "asc" or descending as "desc".
desc
from
First date.
Format: YYYY-MM-DD
30 days earlier
to
Ending date.
Format: YYYY-MM-DD
Current date
OBS 1
This is a paginated endpoint. Refer to pagination documentation for more details in how to use.

Response

{
  "data" : [
    {
      "timestamp": "2021-03-24",
      "bdrx": 1280640,
      "ibov": 11206419,
      "ibra": 450627,
      "ibxl": 1862698,
      "ibxx": 4802967,
      "ico2": 233508,
      "icon": 492721,
      "idiv": 631088,
      "ieex": 7643153,
      "ifil": 124775,
      "ifix": 281461,
      "ifnc": 1106398,
      "igct": 507880,
      "igcx": 1839646,
      "ignm": 417168,
      "imat": 615545,
      "imob": 92836,
      "indx": 2414247,
      "isee": 389355,
      "itag": 2513204,
      "ivbx": 1565453,
      "mlcx": 218258,
      "smll": 269721,
      "util": 802570,
      "selic": 1.0379,
      "irfm": 1415466.1882,
      "ipca": 86.0,
      "imab": 793675.5992,
      "dolar": 553.3000000000001,
      "cdi": 1.0379,
      "igpm": 252.99999999999997,
    }
  ],
  "pagination": {
    "current": 1,
    "items": 5927,
    "pages": 198
  }
}
OBS 1
Values returned in monthy percentual are : IPCA, IGP-M and Poupança.
OBS 2
Values returned in daily percentual are : Selic and CDI.