Investment transactions

Reference information for our Investment transactions webhook events.

Historical update

As soon as a banking recurrent link, which contains investment transactions, is created, we asynchronously load the Investment transactions available. You will receive a historical_updatenotification whenever the investment transactions list is available for you to access.

{
   "webhook_id":"03d1ca0d62db4f769488265d141047b7",
   "webhook_type":"INVESTMENTS_TRANSACTIONS", 
   "webhook_code":"historical_update", 
   "link_id":"2f5d361d-dad6-45d4-a0bf-26d479766067",
   "data":{
      "total_investments_transactions":3 // Total number of investments transactions found
   }
}

Once you receive the notification, you can get further details by making the following request:

curl --request GET 'https://api.belvo.com/investments/transactions/?link={id}' \
-u [Secret Key ID]:[Secret Key PASSWORD]
client.investmentsTransasctions.list({
  filters: {
    link: "{id}"
  }
})
client.InvestmentsTransactions.list(link="{id}")
client.investments_transaction.list(params: {
  link: "{id}"
})

Where:

  • {id} is the link_id you receive in your historical_update notification.

New investment transactions available

You can receive a new_investments_transactions_available notification whenever new investment transactions are available for a banking recurrent link.

Once you receive the notification, you can query the investment transactions resource to pull the details of these new investment transactions. For example, if you receive the following webhook:

{
  "webhook_id": "aadf41a1fc8e4f79a49f7f04027ac999",
  "webhook_type": "INVESTMENTS_TRANSACTIONS",
  "webhook_code": "new_investments_transactions_available",
  "link_id": "16f68516-bcbc-4cf7-b815-c500d4204e28",
  "data": {
    "new_transactions": 8 // Number of new investments transactions found since last event
  }
}

You can request more information about the investment portfolios with the following query to the Investment transactions endpoint using the created_at filter:

curl --request GET 'https://api.belvo.com/investments/transactions/?link={id}&created_at__range={date1},{date2}' \
-u [Secret Key ID]:[Secret Key PASSWORD]
client.investmentsTransactions.list({
  filters: {
    link: "{id}",
    created_at__range: "{date1},{date2}"
  }
})
client.InvestmentsTransactions.list(link="{id}",created_at__range="{date1},{date2}")
client.investments_transaction.list(params: {
  link: "{id}",
  created_at__range: "{date1},{date2}"
})

Where:

  • {id} is the link_id you received in the notification.
  • {date1} is the date when you previously received a notification, in YYYY-MM-DD format.
  • {date2} is the date you received the latest notification, in YYYY-MM-DD format.

Did this page help you?