Events and Webhooks
The Upvest architecture was designed as an asynchronous, event-driven system.
Events
Events, in this context, are records of something that has happened and which results in a change of some state held within the Investment API. Events are immutable and ordered in the sequence in which they occur.
Webhooks
Webhooks are a mechanism for your software to receive information about events.
Webhooks reverse the roles of "caller and "listener" typically associated with API consumption. This means that you must provide an accessible API endpoint, that we can make an HTTP request to. Each request will contain details of one or more events and serves as notification that they have occurred.
By providing webhooks for the Investment API to call, you remove the need to poll the API for those state changes. However, all of the information exposed in the payloads of our webhook requests is also accessible through our API endpoints.
Use cases
The range of webhook use cases within Upvest's current product functionalities is wide. The concept of a 'state-change' is common in financial architecture.
This concept runs through all of Upvest’s business domains. Below are some of the many possible use cases for webhooks.
- Users: events related to a user’s account status, for example the status changes that occur during due diligence checks required to onboard a user.
- Initial deposit: tracking whether funds have been successfully deposited so that a buy order can be placed.
- Payments: identify the status of an outgoing payment processing.
- Orders: events that occur during the order processing cycle, from initial submission to tracking cancellations to full processing.
- Reporting: events that occur during report generation, allowing a file to be retrieved as it is created.
Further reading
In our tutorial 'Implementing webhooks', we describe in detail how to implement webhooks.
Was this page helpful?