Listar investimentos
curl --request GET \
--url https://api.malvo.io/investments \
--header 'X-API-KEY: <api-key>'const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.malvo.io/investments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.malvo.io/investments"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.malvo.io/investments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"page": 1,
"total": 3,
"totalPages": 1,
"results": [
{
"id": "f77eccf4-7714-498e-92a9-1bebe70335d9",
"code": "12.345.678/0001-00",
"name": "Bahia AM Advisory FIC de FIM",
"balance": 1359.39,
"currencyCode": "BRL",
"type": "MUTUAL_FUND",
"subtype": "MULTIMARKET_FUND",
"lastMonthRate": 0.24,
"annualRate": 3.24,
"lastTwelveMonthsRate": 3,
"itemId": "207f5bcd-312a-439c-abbe-166b6632c980",
"value": 500,
"quantity": 3,
"amount": 1500,
"taxes": 40.61,
"taxes2": 100,
"date": "2020-07-19T18:27:41.802Z",
"owner": "John Doe",
"number": null,
"amountProfit": 310.5,
"amountWithdrawal": 1310.5,
"amountOriginal": 1000,
"status": "ACTIVE"
},
{
"id": "2a96b873-53bb-4d16-a3d8-385a57e78d7e",
"number": null,
"name": "CDB1194KL0Z - BANCO MAXIMA S/A",
"balance": 2000,
"currencyCode": "BRL",
"type": "FIXED_INCOME",
"subtype": "CDB",
"itemId": "207f5bcd-312a-439c-abbe-166b6632c980",
"code": "0001-02",
"amount": 2500,
"taxes": null,
"taxes2": null,
"date": "2020-07-19T18:27:41.802Z",
"owner": "John Doe",
"rate": 30,
"rateType": "CDI",
"fixedAnnualRate": 10.5,
"amountProfit": null,
"amountWithdrawal": 2000,
"amountOriginal": 1000,
"issuer": "Banco Exemplo S.A.",
"issuerCNPJ": "08.050.608/0001-32",
"issueDate": "2020-07-19T18:27:41.802Z",
"purchaseDate": "2020-07-15T10:00:00.000Z",
"status": "ACTIVE"
},
{
"id": "ded7d2f1-6b90-44a8-9ace-de747b9f5bfe",
"number": "123456-2",
"name": "Previdência Exemplo",
"balance": 1359.39,
"currencyCode": "BRL",
"type": "SECURITY",
"subtype": "RETIREMENT",
"annualRate": 3.24,
"itemId": "207f5bcd-312a-439c-abbe-166b6632c980",
"code": null,
"value": 500,
"quantity": 3,
"amount": 1500,
"taxes": 0,
"taxes2": 0,
"date": "2020-07-19T18:27:41.802Z",
"owner": "John Doe",
"amountProfit": 359.39,
"amountWithdrawal": 1310.5,
"status": "ACTIVE"
}
]
}{
"code": 400,
"message": "itemId must be a UUID"
}{
"code": 403,
"codeDescription": "API_KEY_MISSING_OR_INVALID",
"message": "Missing or invalid authorization token"
}{
"code": 500,
"codeDescription": "INTERNAL_SERVER_ERROR",
"message": "Internal Server Error"
}Investments
Listar investimentos
Recupera todas as posições de investimento coletadas para o item informado. Resposta no formato de página { page, total, totalPages, results }.
GET
/
investments
Listar investimentos
curl --request GET \
--url https://api.malvo.io/investments \
--header 'X-API-KEY: <api-key>'const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.malvo.io/investments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.malvo.io/investments"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.malvo.io/investments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"page": 1,
"total": 3,
"totalPages": 1,
"results": [
{
"id": "f77eccf4-7714-498e-92a9-1bebe70335d9",
"code": "12.345.678/0001-00",
"name": "Bahia AM Advisory FIC de FIM",
"balance": 1359.39,
"currencyCode": "BRL",
"type": "MUTUAL_FUND",
"subtype": "MULTIMARKET_FUND",
"lastMonthRate": 0.24,
"annualRate": 3.24,
"lastTwelveMonthsRate": 3,
"itemId": "207f5bcd-312a-439c-abbe-166b6632c980",
"value": 500,
"quantity": 3,
"amount": 1500,
"taxes": 40.61,
"taxes2": 100,
"date": "2020-07-19T18:27:41.802Z",
"owner": "John Doe",
"number": null,
"amountProfit": 310.5,
"amountWithdrawal": 1310.5,
"amountOriginal": 1000,
"status": "ACTIVE"
},
{
"id": "2a96b873-53bb-4d16-a3d8-385a57e78d7e",
"number": null,
"name": "CDB1194KL0Z - BANCO MAXIMA S/A",
"balance": 2000,
"currencyCode": "BRL",
"type": "FIXED_INCOME",
"subtype": "CDB",
"itemId": "207f5bcd-312a-439c-abbe-166b6632c980",
"code": "0001-02",
"amount": 2500,
"taxes": null,
"taxes2": null,
"date": "2020-07-19T18:27:41.802Z",
"owner": "John Doe",
"rate": 30,
"rateType": "CDI",
"fixedAnnualRate": 10.5,
"amountProfit": null,
"amountWithdrawal": 2000,
"amountOriginal": 1000,
"issuer": "Banco Exemplo S.A.",
"issuerCNPJ": "08.050.608/0001-32",
"issueDate": "2020-07-19T18:27:41.802Z",
"purchaseDate": "2020-07-15T10:00:00.000Z",
"status": "ACTIVE"
},
{
"id": "ded7d2f1-6b90-44a8-9ace-de747b9f5bfe",
"number": "123456-2",
"name": "Previdência Exemplo",
"balance": 1359.39,
"currencyCode": "BRL",
"type": "SECURITY",
"subtype": "RETIREMENT",
"annualRate": 3.24,
"itemId": "207f5bcd-312a-439c-abbe-166b6632c980",
"code": null,
"value": 500,
"quantity": 3,
"amount": 1500,
"taxes": 0,
"taxes2": 0,
"date": "2020-07-19T18:27:41.802Z",
"owner": "John Doe",
"amountProfit": 359.39,
"amountWithdrawal": 1310.5,
"status": "ACTIVE"
}
]
}{
"code": 400,
"message": "itemId must be a UUID"
}{
"code": 403,
"codeDescription": "API_KEY_MISSING_OR_INVALID",
"message": "Missing or invalid authorization token"
}{
"code": 500,
"codeDescription": "INTERNAL_SERVER_ERROR",
"message": "Internal Server Error"
}Authorizations
Chave de API obrigatória em todos os endpoints. Envie no header X-API-KEY: <apiKey>.
Query Parameters
Identificador primário do item.
Filtra por tipo de investimento.
Available options:
COE, EQUITY, ETF, FIXED_INCOME, MUTUAL_FUND, SECURITY, OTHER Tamanho da página. Padrão 500.
Página (1-based). Padrão 1.
Response
Página de investimentos.
Envelope de paginação por página. Os campos são números (nunca strings). totalPages é 1 quando há uma única página.
⌘I