Skip to content

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

ParameterDescription
IDThe 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

ParameterDescriptionRequired
nameText field maximum length 64Yes
can_add_exchangeTrue or FalseNo
show_internal_txTrue or FalseNo
whitelabel_feeWhitelabel 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

ParameterDescription
IDThe ID of the account to retrieve

Payload Parameters

ParameterDescription
nameText field maximum length 64
can_add_exchangeTrue or False
show_internal_txTrue or False
whitelabel_feeWhitelabel 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/"
  }
}