๐งUser
This documentation provides details on the API endpoints available for Whirlprivacy.io, focusing on user-related operations.
โ ๏ธ You must be logged in to use these requests.
Common Headers
For all requests that require user authentication, you must include the following headers:
Header Name | Value | Description |
---|---|---|
X-API-key |
| API token obtained after authentication. |
GET /user/balance
โ Get User Asset Balance
/user/balance
โ Get User Asset BalanceDescription:
Retrieves the balance of the specified asset for the authenticated user. It checks whether the asset exists and if the user has a balance greater than 0, then formats and returns the balance amount.
Parameters:
Name | Type | Description |
---|---|---|
|
| The ticker symbol of the asset. |
Response:
Error Handling:
Error Name | Description |
---|---|
| The provided ticker is invalid. |
Example Code:
GET /user/balances
โ Get User Balances
/user/balances
โ Get User BalancesDescription:
Retrieves all asset balances from the expected user.
Parameters:
Name | Type | Description |
---|---|---|
|
| The user to check the balance |
Response:
Error Handling:
Error Name | Description |
---|---|
| The user is not authorized. |
Example Code:
General Error Handling
This section covers errors that are common across multiple endpoints.
Error Name | Description |
---|---|
| The user is not authenticated or lacks the necessary permissions. |
| The specified ticker symbol does not correspond to a valid asset. |
GET /user/addresses
โ User Withdrawal Addresses
/user/addresses
โ User Withdrawal AddressesDescription:
Retrieves the active withdrawal addresses of the logged-in user.
Parameters:
Name | Type | Required | Description |
---|---|---|---|
page | Query | No | The page number of the withdrawal addresses to retrieve. Defaults to |
Response:
Error Handling:
Error Code | Description |
---|---|
E_UNAUTHORIZED | Unauthorized access to the endpoint. |
Example Code:
GET /user/addresses/all
โ All User Withdrawal Addresses
/user/addresses/all
โ All User Withdrawal AddressesDescription:
Returns a complete list of the user's withdrawal addresses, irrespective of their status.
Parameters:
No parameters are required for this request.
Response:
Error Handling:
Error Code | Description |
---|---|
E_UNAUTHORIZED | Unauthorized access to the endpoint. |
Example Code:
POST /user/addresses
โ Create Withdrawal Address
/user/addresses
โ Create Withdrawal AddressDescription:
Allows the logged-in user to add a new withdrawal address to their account.
Parameters:
Name | Type | Required | Description |
---|---|---|---|
address | Body | Yes | The withdrawal address to add. Must be a valid address format. |
name | Body | Yes | A name to associate with the withdrawal address. |
Response:
Error Handling:
Error Code | Description |
---|---|
E_INVALID_PARAMS | One or more provided parameters are invalid. |
E_MAX_ADDRESSES | The maximum number of addresses for the user has been reached. |
E_CREATING_ADDRESS | An error occurred while creating the address, possibly because it's already registered. |
E_UNAUTHORIZED | Unauthorized access to the endpoint. |
Example Code:
PUT /user/addresses
โ Disable Withdrawal Address
/user/addresses
โ Disable Withdrawal AddressDescription:
Allows the logged-in user to disable an existing withdrawal address.
Parameters:
Name | Type | Required | Description |
---|---|---|---|
address | Body | Yes | The withdrawal address to disable. |
Response:
Error Handling:
Error Code | Description |
---|---|
E_DISABLING_ADDRESS | An error occurred while disabling the address, possibly because it's not registered or already disabled. |
E_UNAUTHORIZED | Unauthorized access to the endpoint. |
Example Code:
PUT /user/api/generate
โ Generate API Key
/user/api/generate
โ Generate API KeyThis request is only possible via the standard auth on our platform. Apart from these 3 routes (and the auth/register part), all other auth routes can be accessed either via the jwt (X-API-key header) after having signed the challenge, or via the X-API-key.
Description:
Generates a new API key for the authenticated user.
Parameters:
Parameter | Type | Description |
---|---|---|
| Object | The HTTP request object. |
| Object | The HTTP response object. |
Response:
Error Handling:
Error Code | Description |
---|---|
200 | Success, but no API key generated. |
401 | Unauthorized access. |
429 | Too many requests, regeneration timeout not passed. |
Example Code:
PUT /user/api/disable
โ Disable API Key
/user/api/disable
โ Disable API KeyThis request is only possible via the standard auth on our platform. Apart from these 3 routes (and the auth/register part), all other auth routes can be accessed either via the jwt (X-API-key header) after having signed the challenge, or via the X-API-key.
Description:
Disables the current API key for the authenticated user.
Parameters:
Parameter | Type | Description |
---|---|---|
| Object | The HTTP request object. |
| Object | Authentication information. |
| Object | The HTTP response object. |
Response:
Error Handling:
Error Code | Description |
---|---|
200 | Success. |
401 | Unauthorized access. |
Example Code:
GET /user/api
โ Get API Key
/user/api
โ Get API KeyThis request is only possible via the standard auth on our platform. Apart from these 3 routes (and the auth/register part), all other auth routes can be accessed either via the jwt (X-API-key header) after having signed the challenge, or via the X-API-key.
Description:
Retrieves the current API key for the authenticated user.
Parameters:
Parameter | Type | Description |
---|---|---|
| Object | The HTTP request object. |
| Object | The HTTP response object. |
Response:
Error Handling:
Error Code | Description |
---|---|
200 | Success. |
401 | Unauthorized access. |
Example Code:
Last updated