GET
/v2/investmentsList investments by cursor
Recovers the investments of an item, newest first, using cursor-based pagination. Unlike GET /investments, the response never embeds each investment's transactions: read them from GET /v2/investments/{id}/transactions.
Parameters
Query Parameters
| Name | Type |
|---|---|
itemIdrequired | string (uuid) |
type | string |
after | string |
Responses
200Retrieve a list of investments for an item using cursor-based pagination
object
Cursor-based paginated response for investments
resultsrequiredobject[]
List of investments for the current page. This endpoint never populates transactions: read an investment's transactions from GET /v2/investments/{id}/transactions.
itemsobject
Investimento representando um ativo específico
nextrequiredstring | null
Ready-to-use query string for the next page: append it as-is to the endpoint path (GET /v2/investments{next}). Null if there are no more results.
Example response
json
{
"results": [
{
"id": "f77eccf4-7714-498e-92a9-1bebe70335d9",
"code": "22.222.222/0001-22",
"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"
}
],
"next": "?itemId=a0d3e26c-3e9b-4b4a-a6c5-7e8e0b14a6a1&after=MjAyMC0xMC0xNVQwMDowMDowMC4wMDBafGE4NTM0Yzg1LTUzY2UtNGYyMS05NGQ3LTUwZTlkMmVlNDk1Nw=="
}curl -X GET \
'https://api.pluggy.ai/v2/investments' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY'Resposta de exemplo
{
"results": [
{
"id": "f77eccf4-7714-498e-92a9-1bebe70335d9",
"code": "22.222.222/0001-22",
"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"
}
],
"next": "?itemId=a0d3e26c-3e9b-4b4a-a6c5-7e8e0b14a6a1&after=MjAyMC0xMC0xNVQwMDowMDowMC4wMDBafGE4NTM0Yzg1LTUzY2UtNGYyMS05NGQ3LTUwZTlkMmVlNDk1Nw=="
}