curl --request GET \
--url https://api.despezzas.com/v1/investments/overview \
--header 'Authorization: Basic <encoded-value>'const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.despezzas.com/v1/investments/overview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v1/investments/overview"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.despezzas.com/v1/investments/overview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"accumulated_patrimony_cents": 4850000,
"contributions": {
"count": 3,
"total_cents": 300000,
"variation_percent": 12.5
},
"dividends": {
"count": 4,
"total_cents": 12000,
"variation_percent": 12.5
},
"end_date": "2026-09-30",
"net_contributions_cents": 250000,
"start_date": "2026-09-01",
"withdrawals": {
"count": 1,
"total_cents": 50000,
"variation_percent": 12.5
},
"previous_period": {
"contributions": {
"count": 3,
"total_cents": 280000,
"variation_percent": 12.5
},
"dividends": {
"count": 4,
"total_cents": 11000,
"variation_percent": 12.5
},
"net_contributions_cents": 280000,
"withdrawals": {
"count": 0,
"total_cents": 0,
"variation_percent": 12.5
}
},
"realized_yield_percent": 4.8
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}Aportes e resgates
Aportes, resgates e dividendos registrados como lançamentos nas contas de investimento no período (padrão: mês atual).
Escopo necessário: read.
curl --request GET \
--url https://api.despezzas.com/v1/investments/overview \
--header 'Authorization: Basic <encoded-value>'const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.despezzas.com/v1/investments/overview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v1/investments/overview"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.despezzas.com/v1/investments/overview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"accumulated_patrimony_cents": 4850000,
"contributions": {
"count": 3,
"total_cents": 300000,
"variation_percent": 12.5
},
"dividends": {
"count": 4,
"total_cents": 12000,
"variation_percent": 12.5
},
"end_date": "2026-09-30",
"net_contributions_cents": 250000,
"start_date": "2026-09-01",
"withdrawals": {
"count": 1,
"total_cents": 50000,
"variation_percent": 12.5
},
"previous_period": {
"contributions": {
"count": 3,
"total_cents": 280000,
"variation_percent": 12.5
},
"dividends": {
"count": 4,
"total_cents": 11000,
"variation_percent": 12.5
},
"net_contributions_cents": 280000,
"withdrawals": {
"count": 0,
"total_cents": 0,
"variation_percent": 12.5
}
},
"realized_yield_percent": 4.8
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}Authorizations
HTTP Basic com o token como usuário e o secret como senha: curl -u dpz_tk_…:dpz_sk_…. Crie a chave em https://despezzas.com/settings/api-keys.
Query Parameters
Início do período (YYYY-MM-DD).
"2026-09-01"
Fim do período (YYYY-MM-DD).
"2026-09-30"
Filtra pelas contas informadas (repita o parâmetro ou use account_ids[]). Também aceita a forma account_ids[].
["3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f"]
Inclui a comparação com o período anterior.
true
Response
Sucesso.
Aportes, resgates e dividendos registrados como lançamentos em contas de investimento no período.
Patrimônio acumulado (aportes − resgates + dividendos, desde o início). Em centavos.
4850000
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Fim (YYYY-MM-DD).
"2026-09-30"
Aportes − resgates. Em centavos.
250000
Início (YYYY-MM-DD).
"2026-09-01"
Show child attributes
Show child attributes
Mesmas métricas do período anterior (só com compare_previous=true).
Show child attributes
Show child attributes
Rendimento realizado % (dividendos / aportes líquidos; null sem aportes).
4.8