๐ฎVirtual Accounts
This documentation provides details on the API endpoints available for Whirlprivacy.io, focusing on virtual accounts operations.
Last updated
This documentation provides details on the API endpoints available for Whirlprivacy.io, focusing on virtual accounts operations.
Last updated
/virtual/virtual-account
- Create Batch Virtual AccountsDescription: Creates multiple virtual accounts with provided labels. Each label must be unique and not exceed the maximum number of accounts allowed per user.
Parameters:
Parameter | Type | Description |
---|---|---|
Response:
Error Handling:
Error Code | Description |
---|---|
Example Code:
/virtual/virtual-account/unnamed
- Create Unnamed Virtual AccountsDescription: Allows the creation of a specific number of unnamed virtual accounts, limited by the maximum allowed accounts configuration.
Parameters:
Response:
Error Handling:
Example Code:
/virtual/virtual-account
- Updates Virtual AccountUpdates the label of an existing virtual account.
/virtual/virtual-account/disable
- Disables Virtual AccountDisables an existing virtual account. Main accounts cannot be disabled.
Here's a detailed Markdown documentation based on the provided code, suitable for copying and pasting into a GitBook. Each function's description aligns with the corresponding HTTP request, detailing expected parameters, behaviors, responses, error management, and sample code for execution.
/virtual/virtual-account/count
- Count User Virtual AccountsThis endpoint counts the virtual accounts associated with a logged-in user.
None.
/virtual/virtual-account
- Get Specific Virtual AccountDescription: This endpoint retrieves a specific virtual account by either label or UUID for a logged-in user.
/virtual/virtual-account/search
- Search User Virtual AccountsDescription: This endpoint searches for virtual accounts based on a label for a logged-in user.
/virtual/virtual-accounts
- List User Virtual AccountsDescription: Retrieves a list of all virtual accounts associated with the logged-in user. This includes the ability to filter accounts based on their active status and whether to include balance information.
Below is a markdown documentation for the API request described in the code you provided, specifically for retrieving the asset balance of a virtual account. This description is tailored to be integrated into a GitBook for project documentation.
/virtual/virtual-account/balance
- Retrieve Asset Balance of a Virtual AccountDescription: Retrieves the balance of the specified asset in a virtual account identified by either UUID or label. If the account is the user's main account or matches the given UUID or label, the balance of the asset is fetched. This endpoint is useful for financial tracking and management within the virtual account ecosystem.
Parameters:
Response:
Error Handling:
Example Code:
Parameter | Type | Description |
---|---|---|
Error Code | Description |
---|---|
Name | Type | Description |
---|---|---|
Error Code | Meaning |
---|---|
Name | Type | Description |
---|---|---|
Error Code | Meaning |
---|---|
Error Code | Description |
---|---|
Error Code | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Error Code | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Error Code | Description |
---|---|
Parameter | Type | Required | Description |
---|---|---|---|
Error Code | Description |
---|---|
Parameter | Type | Description | Required |
---|---|---|---|
Error Code | Description |
---|---|
labels
array of strings
List of labels for the new virtual accounts.
E_INVALID_PARAMS
The labels array is not provided or is not valid.
E_INVALID_LABEL
One or more labels are invalid according to the validation rules.
E_MAX_VIRTUAL_ACCOUNTS
The number of accounts exceeds the limit allowed.
E_CREATING_VIRTUAL_ACCOUNT
An error occurred during the creation of accounts, possibly due to duplicate labels.
amount
integer
The number of unnamed accounts to create.
E_INVALID_PARAMS
The amount is not provided or is not a valid integer.
E_MAX_VIRTUAL_ACCOUNTS
The number of accounts exceeds the limit allowed.
E_CREATING_VIRTUAL_ACCOUNT
An error occurred during the account creation process.
uuid
string
The unique identifier of the virtual account. Required if label
is not provided.
label
string
Current label of the virtual account. Required if uuid
is not provided.
newValue
string
New label for the virtual account.
E_INVALID_PARAMS
Missing or invalid parameters provided.
E_UPDATING_VIRTUAL_ACCOUNT_LABEL
Error occurred while updating the virtual account label.
uuid
string
The unique identifier of the virtual account. Required if label
is not provided.
label
string
The label of the virtual account to disable. Required if uuid
is not provided.
E_INVALID_PARAMS
Missing or invalid parameters provided.
E_DISABLING_VIRTUAL_ACCOUNT
Error occurred while disabling the account.
E_INVALID_PARAMS
Parameters provided are invalid.
E_INVALID_PARAMS
Parameters provided are invalid.
label
string
Optional. The label of the virtual account.
uuid
string
Optional. The UUID of the virtual account.
E_INVALID_PARAMS
Parameters provided are invalid.
E_VIRTUAL_ACCOUNT_NOT_FOUND
The requested virtual account could not be found.
label
string
The label to search for among virtual accounts.
E_INVALID_PARAMS
Parameters provided are invalid.
active
boolean
No
Filters the accounts based on their active status. Defaults to true.
balances
boolean
No
Determines if the balances should be included in the response.
E_INVALID_PARAMS
The provided parameters are invalid or missing.
E_VIRTUAL_ACCOUNT_NOT_FOUND
No virtual account matching the criteria found.
ticker
string
The ticker symbol of the asset
Yes
uuid
string
The UUID of the virtual account (optional if label used)
No
label
string
The label of the virtual account (optional if UUID used)
No
E_INVALID_PARAMS
Missing or invalid parameter(s)
E_INVALID_TICKER
The specified ticker does not exist