Sub Accounts
Sub Account endpoints are only accessible using special "Integrator API" keys and are available upon request.
List Sub Accounts
This endpoint retrieves sub accounts.
HTTP Request
GET /v1/accounts/
python
account = uniwire_api_request('/v1/accounts/')javascript
uniwire_api_request('/v1/accounts/').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});The above command returns JSON structured like this:
json
{
"result": [
{
"id": "<id>",
"name": "SUB ACCOUNT",
"slug": "sub-account",
"is_testnet": false,
"can_add_exchange": true,
"show_internal_tx": false,
"whitelabel_fee": "0.1",
"profiles": [
"<profile-id>"
],
"callback_token": "<TOKEN>",
"url": "https://uniwire.com/app/sub-account/"
}
]
}Get Sub Account
This endpoint retrieves a specific account.
HTTP Request
GET /v1/accounts/<ID>/
URL Parameters
| Parameter | Description |
|---|---|
| ID | The ID of the sub account to retrieve |
python
accounts = uniwire_api_request('/v1/accounts/<id>/')javascript
uniwire_api_request('/v1/accounts/<id>/').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});The above command returns JSON structured like this:
json
{
"result": {
"id": "<id>",
"name": "SUB ACCOUNT",
"slug": "sub-account",
"is_testnet": false,
"can_add_exchange": true,
"show_internal_tx": false,
"whitelabel_fee": "0.1",
"profiles": [
"<profile-id>"
],
"callback_token": "<TOKEN>",
"url": "https://uniwire.com/app/sub-account/"
}
}Create Account
This endpoint allows creating account. Editable fields: name,can_add_exchange,show_internal_tx, whitelabel_fee.
HTTP Request
POST /v1/accounts/
Payload Parameters
| Parameter | Description | Required |
|---|---|---|
| name | Text field maximum length 64 | Yes |
| can_add_exchange | True or False | No |
| show_internal_tx | True or False | No |
| whitelabel_fee | Whitelabel fee (decimal, 0.1=10%) | No |
python
import json
payload = {
'name': 'My Account',
'can_add_exchange': True,
'show_internal_tx': False,
'whitelabel_fee': '0.1',
}
account = uniwire_api_request('/v1/accounts/', payload, 'POST')
print(json.dumps(account, indent=2))javascript
let payload = {
name: 'My Account',
can_add_exchange: true,
show_internal_tx: false,
whitelabel_fee: '0.1',
}
uniwire_api_request('/v1/accounts/', payload, 'POST').then(function(response) {
console.log(response)
}).catch(function(error) {
console.log(error)
})JSON response for Create account endpoint:
json
{
"result": {
"id": "<id>",
"name": "My Account",
"slug": "my-account",
"is_testnet": true,
"can_add_exchange": true,
"show_internal_tx": false,
"whitelabel_fee": "0.1",
"profiles": [
"<profile-id>"
],
"callback_token": "<TOKEN>",
"url": "https://uniwire.com/app/my-account/"
}
}Update Account
This endpoint allows updating account. Editable fields: name,can_add_exchange,show_internal_tx, whitelabel_fee.
HTTP Request
PUT https://api.uniwire.com/v1/accounts/<ID>/
URL Parameters
| Parameter | Description |
|---|---|
| ID | The ID of the account to retrieve |
Payload Parameters
| Parameter | Description |
|---|---|
| name | Text field maximum length 64 |
| can_add_exchange | True or False |
| show_internal_tx | True or False |
| whitelabel_fee | Whitelabel fee (decimal, 0.1=10%) |
python
import json
payload = {
'name': 'My Account',
'can_add_exchange': True,
'show_internal_tx': False,
}
account = uniwire_api_request('/v1/accounts/<id>', payload, 'PUT')
print(json.dumps(account, indent=2))javascript
let payload = {
name: 'My Account',
can_add_exchange: true,
show_internal_tx: false,
whitelabel_fee: '0.1',
}
uniwire_api_request('/v1/accounts/<id>', payload, 'PUT').then(function(response) {
console.log(response)
}).catch(function(error) {
console.log(error)
})JSON response for Create account endpoint:
json
{
"result": {
"id": "<id>",
"name": "My Account",
"slug": "my-account",
"is_testnet": true,
"can_add_exchange": true,
"show_internal_tx": false,
"whitelabel_fee": "0.1",
"profiles": [
"<profile-id>"
],
"callback_token": "<TOKEN>",
"url": "https://uniwire.com/app/my-account/"
}
}