Index portfolio
curl --request POST \
--url https://api.aisa.one/apis/v1/b3-com-br/companies/index-portfolio \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"index": "IBOV"
}
'import requests
url = "https://api.aisa.one/apis/v1/b3-com-br/companies/index-portfolio"
payload = { "index": "IBOV" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({index: 'IBOV'})
};
fetch('https://api.aisa.one/apis/v1/b3-com-br/companies/index-portfolio', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/b3-com-br/companies/index-portfolio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'index' => 'IBOV'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/b3-com-br/companies/index-portfolio"
payload := strings.NewReader("{\n \"index\": \"IBOV\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/b3-com-br/companies/index-portfolio")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"index\": \"IBOV\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/b3-com-br/companies/index-portfolio")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"index\": \"IBOV\"\n}"
response = http.request(request)
puts response.read_body{
"constituents": [
{
"asset": "AMBEV S/A",
"code": "ABEV3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 2.45,
"participation_pct_text": "2,450",
"sector": null,
"theoretical_quantity": 4043349180,
"theoretical_quantity_text": "4.043.349.180",
"type": "ON"
},
{
"asset": "ALLOS",
"code": "ALOS3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 0.531,
"participation_pct_text": "0,531",
"sector": null,
"theoretical_quantity": 478975645,
"theoretical_quantity_text": "478.975.645",
"type": "ON NM"
},
{
"asset": "ASSAI",
"code": "ASAI3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 0.467,
"participation_pct_text": "0,467",
"sector": null,
"theoretical_quantity": 1335651252,
"theoretical_quantity_text": "1.335.651.252",
"type": "ON NM"
},
{
"asset": "AUREN",
"code": "AURE3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 0.147,
"participation_pct_text": "0,147",
"sector": null,
"theoretical_quantity": 317886569,
"theoretical_quantity_text": "317.886.569",
"type": "ON NM"
},
{
"asset": "AXIA ENERGIA",
"code": "AXIA3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 4.849,
"participation_pct_text": "4,849",
"sector": null,
"theoretical_quantity": 2278697967,
"theoretical_quantity_text": "2.278.697.967",
"type": "ON NM"
},
{
"asset": "AZZAS 2154",
"code": "AZZA3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 0.089,
"participation_pct_text": "0,089",
"sector": null,
"theoretical_quantity": 130746665,
"theoretical_quantity_text": "130.746.665",
"type": "ON NM"
},
{
"asset": "B3",
"code": "B3SA3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 3.334,
"participation_pct_text": "3,334",
"sector": null,
"theoretical_quantity": 4985893391,
"theoretical_quantity_text": "4.985.893.391",
"type": "ON NM"
},
{
"asset": "BRASIL",
"code": "BBAS3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 2.464,
"participation_pct_text": "2,464",
"sector": null,
"theoretical_quantity": 2842760965,
"theoretical_quantity_text": "2.842.760.965",
"type": "ON EX NM"
},
{
"asset": "BRADESCO",
"code": "BBDC3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 0.891,
"participation_pct_text": "0,891",
"sector": null,
"theoretical_quantity": 1464434502,
"theoretical_quantity_text": "1.464.434.502",
"type": "ON EJ N1"
},
{
"asset": "BRADESCO",
"code": "BBDC4",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 3.515,
"participation_pct_text": "3,515",
"sector": null,
"theoretical_quantity": 5100907585,
"theoretical_quantity_text": "5.100.907.585",
"type": "PN EJ N1"
}
],
"country": "BR",
"index": "IBOV",
"next_page": 2,
"observed_at_ms": 1790046977111,
"page": 1,
"page_size": 10,
"portfolio": "theoretical",
"source": "b3.com.br",
"total_pages": 8,
"total_records": 76,
"totals": {
"date": null,
"participation_pct": 100,
"participation_pct_text": "100,000",
"reductor": 14030907.03256302,
"reductor_text": "14.030.907,03256302",
"theoretical_quantity": 93803750400,
"theoretical_quantity_text": "93.803.750.400"
},
"url": "https://sistemaswebb3-listados.b3.com.br/indexPage/theorical/IBOV?language=pt-br"
}B3 listed companies and indices
Index portfolio
To get an index’s composition; page through with page (default 120 rows covers IBOV in one call).
POST
https://api.aisa.one
/
apis
/
v1
/
b3-com-br
/
companies
/
index-portfolio
Index portfolio
curl --request POST \
--url https://api.aisa.one/apis/v1/b3-com-br/companies/index-portfolio \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"index": "IBOV"
}
'import requests
url = "https://api.aisa.one/apis/v1/b3-com-br/companies/index-portfolio"
payload = { "index": "IBOV" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({index: 'IBOV'})
};
fetch('https://api.aisa.one/apis/v1/b3-com-br/companies/index-portfolio', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/b3-com-br/companies/index-portfolio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'index' => 'IBOV'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/b3-com-br/companies/index-portfolio"
payload := strings.NewReader("{\n \"index\": \"IBOV\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/b3-com-br/companies/index-portfolio")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"index\": \"IBOV\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/b3-com-br/companies/index-portfolio")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"index\": \"IBOV\"\n}"
response = http.request(request)
puts response.read_body{
"constituents": [
{
"asset": "AMBEV S/A",
"code": "ABEV3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 2.45,
"participation_pct_text": "2,450",
"sector": null,
"theoretical_quantity": 4043349180,
"theoretical_quantity_text": "4.043.349.180",
"type": "ON"
},
{
"asset": "ALLOS",
"code": "ALOS3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 0.531,
"participation_pct_text": "0,531",
"sector": null,
"theoretical_quantity": 478975645,
"theoretical_quantity_text": "478.975.645",
"type": "ON NM"
},
{
"asset": "ASSAI",
"code": "ASAI3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 0.467,
"participation_pct_text": "0,467",
"sector": null,
"theoretical_quantity": 1335651252,
"theoretical_quantity_text": "1.335.651.252",
"type": "ON NM"
},
{
"asset": "AUREN",
"code": "AURE3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 0.147,
"participation_pct_text": "0,147",
"sector": null,
"theoretical_quantity": 317886569,
"theoretical_quantity_text": "317.886.569",
"type": "ON NM"
},
{
"asset": "AXIA ENERGIA",
"code": "AXIA3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 4.849,
"participation_pct_text": "4,849",
"sector": null,
"theoretical_quantity": 2278697967,
"theoretical_quantity_text": "2.278.697.967",
"type": "ON NM"
},
{
"asset": "AZZAS 2154",
"code": "AZZA3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 0.089,
"participation_pct_text": "0,089",
"sector": null,
"theoretical_quantity": 130746665,
"theoretical_quantity_text": "130.746.665",
"type": "ON NM"
},
{
"asset": "B3",
"code": "B3SA3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 3.334,
"participation_pct_text": "3,334",
"sector": null,
"theoretical_quantity": 4985893391,
"theoretical_quantity_text": "4.985.893.391",
"type": "ON NM"
},
{
"asset": "BRASIL",
"code": "BBAS3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 2.464,
"participation_pct_text": "2,464",
"sector": null,
"theoretical_quantity": 2842760965,
"theoretical_quantity_text": "2.842.760.965",
"type": "ON EX NM"
},
{
"asset": "BRADESCO",
"code": "BBDC3",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 0.891,
"participation_pct_text": "0,891",
"sector": null,
"theoretical_quantity": 1464434502,
"theoretical_quantity_text": "1.464.434.502",
"type": "ON EJ N1"
},
{
"asset": "BRADESCO",
"code": "BBDC4",
"participation_accumulated_pct": null,
"participation_accumulated_pct_text": null,
"participation_pct": 3.515,
"participation_pct_text": "3,515",
"sector": null,
"theoretical_quantity": 5100907585,
"theoretical_quantity_text": "5.100.907.585",
"type": "PN EJ N1"
}
],
"country": "BR",
"index": "IBOV",
"next_page": 2,
"observed_at_ms": 1790046977111,
"page": 1,
"page_size": 10,
"portfolio": "theoretical",
"source": "b3.com.br",
"total_pages": 8,
"total_records": 76,
"totals": {
"date": null,
"participation_pct": 100,
"participation_pct_text": "100,000",
"reductor": 14030907.03256302,
"reductor_text": "14.030.907,03256302",
"theoretical_quantity": 93803750400,
"theoretical_quantity_text": "93.803.750.400"
},
"url": "https://sistemaswebb3-listados.b3.com.br/indexPage/theorical/IBOV?language=pt-br"
}Request contract
- Method and path: POST /apis/v1/b3-com-br/companies/index-portfolio
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/b3-com-br/companies/index-portfolio
{
"operationId": "b3-com-br.companies.index-portfolio",
"method": "POST",
"path": "/apis/v1/b3-com-br/companies/index-portfolio",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"provider": {
"summary": "Official provider example; checked against AIsa request constraints",
"value": {
"index": "IBOV",
"page_size": 10
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"index": {
"description": "Index acronym, e.g. `IBOV`.",
"type": "string"
},
"page": {
"default": 1,
"description": "1-based page number.\n\nProvider reference: minimum 1; default 1.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"min": 1
}
},
"page_size": {
"description": "Rows per page; B3 returns an empty page above 120.\n\nProvider reference: minimum 1; maximum 120.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 120,
"min": 1
}
},
"portfolio": {
"default": "theoretical",
"description": "`theoretical`: current four-month portfolio; `day`: today's portfolio by sector with accumulated participation; `preview`: next rebalancing preview.\n\nProvider reference: allowed values [\"theoretical\", \"day\", \"preview\"]; default \"theoretical\".",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body",
"oneOf": [
"theoretical",
"day",
"preview"
]
}
}
},
"required": [
"index"
],
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Usage-based pricing. Default request estimate: $0.0005 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.Authorizations
Body
application/json
Response
Constituents of a B3 index (IBOV, IBRX, SMLL, IDIV, IFIX, ...) with type, theoretical quantity and participation, plus the header totals and reductor: the current theoretical portfolio, the day's portfolio grouped by sector, or the next quarterly preview.
The response contains the tool result directly.
| Documented field | Provider type | Description |
|---|---|---|
constituents | object[] | |
country | string | |
index | string | |
next_page | number | Page to request next; null when this is the last page. |
observed_at_ms | number | |
page | number | |
page_size | number | |
portfolio | string | |
source | string | |
total_pages | number | |
total_records | number | Total rows across pages as B3 reports it. |
totals | object | |
url | string |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.