Managing virtual cash in the Investment API involves a system for tracking and managing virtual funds for your end users.
Upvest provides endpoints for increasing and decreasing the cash balance of the selected account group for this purpose. This enables an increase to be triggered before an order is placed and a decrease to be triggered after the order execution has been completed.
Authentication scopes —
virtual_cash_balances:adminFor more information, refer to Authentication scopes.
Before implementing virtual cash management, ensure you have:
Webhook handler ready — Set up a webhook endpoint to listen for virtual cash lifecycle events.
- Subscribe to
VIRTUAL_CASH_INCREASE.*andVIRTUAL_CASH_DECREASE.*events.
For more information, refer to Implementing webhooks.
- Subscribe to
How does virtual cash work? Understand the concept of virtual cash.
Virtual cash management use cases Explore some simplified example use cases to help you better understand the processes of virtual cash management.
Implementing virtual cash with the Investment API Learn step by step how you can implement virtual cash management with the Investment API. We show you the necessary API calls with sample code for a virtual cash increase or decrease.