Skip to content

Commit 99b64c1

Browse files
add indices/composicao to docs
1 parent 2149f46 commit 99b64c1

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

docs/endpoints/indices.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ IBXX
7171
ICO2
7272
ICON
7373
IDIV
74+
IDVR
7475
IEEX
7576
IFIL
7677
IFIX
@@ -91,6 +92,86 @@ UTIL
9192

9293
Precisa de algum outro índice? [Entre em contato][contato] e adicionamos gratuitamente.
9394

95+
### Composição
96+
**/indices/composicao**
97+
98+
Retorna a composição atual da carteira referente ao índice requisitado.
99+
100+
**Parâmetros**
101+
102+
| Parâmetro | Tipo | Descrição | |
103+
| :-: | :-: | - | :-: |
104+
| `indice` | `string` | ex: "IBOV" | obrigatório
105+
| `ordem` | `string` | "ASC" ou "DESC" | opcional
106+
107+
**Exemplo de chamada:**
108+
109+
```py
110+
import requests as req
111+
112+
URL_BASE = 'https://api.fintz.com.br'
113+
HEADERS = { 'X-API-Key': 'chave-de-teste-api-fintz' }
114+
PARAMS = { 'indice': 'IBOV'}
115+
116+
res = req.get(f'{URL_BASE}/indices/composicao', headers=HEADERS, params=PARAMS)
117+
print(res.json())
118+
```
119+
120+
**Resposta:**
121+
122+
```json
123+
[
124+
{
125+
"indice": "IBOV",
126+
"ticker": "VALE3",
127+
"participacao": 0.12618,
128+
"quantidadeTeorica": 4196924316,
129+
"data": "2024-04-22"
130+
},
131+
{
132+
"indice": "IBOV",
133+
"ticker": "PETR4",
134+
"participacao": 0.08782,
135+
"quantidadeTeorica": 4566445852,
136+
"data": "2024-04-22"
137+
},
138+
]
139+
```
140+
141+
142+
Os índices atualmente disponíveis são
143+
```
144+
AGFS
145+
BDRX
146+
GPTW
147+
IBOV
148+
IBRA
149+
IBSD
150+
IBXL
151+
IBXX
152+
ICO2
153+
ICON
154+
IDIV
155+
IDVR
156+
IEEX
157+
IFIL
158+
IFIX
159+
IFNC
160+
IGCT
161+
IGCX
162+
IGNM
163+
IMAT
164+
IMOB
165+
INDX
166+
ISEE
167+
ITAG
168+
IVBX
169+
MLCX
170+
SMLL
171+
UTIL
172+
```
173+
Precisa de algum outro índice? [Entre em contato][contato] e adicionamos gratuitamente.
174+
94175
## Taxas
95176

96177
### busca

0 commit comments

Comments
 (0)