Virtual balance
Section "Virtual balance" is designed for maintaining the internal financial accounting of an exchange office. It allows tracking profit dynamics and managing the virtual balance without the need to connect real exchange APIs or payment systems.Virtual balance is a tool for maintaining the internal financial accounting of an exchanger.Main principles:Balance is completely virtual: no integration with exchanges or payment systems.All calculations are carried out based on the financial automation fields of requests.The goal is to track the dynamics of balance changes, calculate profit for completed requests, and visualize it on a chart.Only users with the role Admin can manually change the virtual balance value.
1. Principle of operation
The Admin withdraws all funds from exchanges and payment systems into cash.
The Admin sets the initial virtual balance in the admin panel, for example $300.
Each request that moves to the status Completed, increases the virtual balance by the profit amount of that request.
Profit formula:profit = amount received - amount paid - fee
Calculation is performed only for requests with the status Completed.
If a request's values change after completion, the profit is recalculated automatically.
Example:
Initial balance: $300
50 completed requests with $10 profit each → virtual balance: $800
The Admin withdraws $800 into cash and sets the balance back to $100 → the cycle starts again.
2. Functional requirements
2.1. Profit calculation
For each request that is in the status Completed, the system calculates:
profit = amount received - amount paid - fee
Values are displayed:
In the request card
In the export file of requests (columns:
profit,virtual_balance_atm)
When request fields are changed after completion, a profit recalculation.
2.2. Virtual balance management
Only the Admin can change the balance manually.
All changes are recorded in the change history:
Who changed it
Date/time
Old and new balance value
History is available on the subpage "Manual balance changes history".

2.3. Balance change chart

Access to the chart: roles Admin, Operator, Financier.
The chart displays the balance change
Ability to flexibly select the display period (for example, from October 2 to November 1).
2.4. Ability to set the balance
"Set balance"
You can set the current virtual balance manually by clicking the pencil next to the balance and filling in the corresponding field in the dropdown menu

3. Roles and access rights
Admin
"Set balance", "Statistics"
Can change the balance manually
Operator
"Statistics"
View chart only
Financier
"Statistics"
View chart only
Last updated