Skip to content

Auto Funding

Multiple times a day a wallet's balances will be checked, and if the balance is smaller than the amount specified in " Keep Amount" by at least "Minimum Amount" it will be automatically refilled from your specified funding wallet or wallet with the largest balance when its funds drop below the designated "Minimum Amount". This action will only execute if the funding source has a sufficient balance.

List Auto Funding

This endpoint retrieves all automatic funding's.

HTTP Request

GET /v1/automatic-funding/

python
auto_funding = uniwire_api_request('/v1/automatic-funding/')
javascript
uniwire_api_request('/v1/automatic-funding/').then(function(response) {
  console.log(response);
}).catch(function(error) {
  console.log(error);
});

The above command returns JSON structured like this:

json
{
  "result": [
    {
      "id": "<id>",
      "from_wallet": {
        "id": "<wallet_id>",
        "name": "Tron"
      },
      "from_kind": "USDT-TRX",
      "to_wallet": {
        "id": "<wallet_id>",
        "name": "Tron"
      },
      "to_kind": "USDC-TRX",
      "keep_amount": "50",
      "min_amount": "50",
      "max_amount": "50",
      "exchange": {
        "id": "<exchange_id>",
        "title": "Binance"
      },
      "is_enabled": true
    }
  ]
}

Get Auto Funding

This endpoint retrieves a specific automatic funding.

HTTP Request

GET /v1/automatic-funding/<ID>/

URL Parameters

ParameterDescription
IDThe ID of the automatic funding to retrieve
python
auto_funding = uniwire_api_request('/v1/automatic-funding/<id>/')
javascript
uniwire_api_request('/v1/automatic-funding/<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>",
    "from_wallet": {
      "id": "<wallet_id>",
      "name": "Tron"
    },
    "from_kind": "USDT-TRX",
    "to_wallet": {
      "id": "<wallet_id>",
      "name": "Tron"
    },
    "to_kind": "USDC-TRX",
    "keep_amount": "50",
    "min_amount": "50",
    "max_amount": "50",
    "exchange": {
      "id": "<exchange_id>",
      "title": "Binance"
    },
    "is_enabled": true
  }
}

Create Auto Funding

This endpoint allows creating automatic funding. Only one automatic funding per wallet per kind is allowed. Editable fields: to_wallet,to_kind,keep_amount,min_amount,exchange,is_enabled.

HTTP Request

POST /v1/automatic-funding/

Payload Parameters

ParameterDescriptionRequired
is_enabledEnable / Disable automatic funding executionNo
from_walletWallet IDYes
from_kindAvailable ValuesYes
to_walletWallet IDYes
to_kindAvailable ValuesYes
min_amountMinimal amount to execute automatic fundingYes
max_amountMaximum amount to execute automatic fundingYes
keep_amountAmount to keep in walletYes
exchangeExchange IDNo
python
import json

payload = {
    'is_enabled': True,
    'from_wallet': '<wallet_id>',
    'from_kind': 'USDT-TRX',
    'to_wallet': '<wallet_id>',
    'to_kind': 'USDC-TRX',
    'min_amount': 50,
    'max_amount': 50,
    'keep_amount': 50,
    'exchange': '<exchange_id>',
}
auto_funding = uniwire_api_request('/v1/automatic-funding/', payload, 'POST')
print(json.dumps(auto_funding, indent=2))
javascript
var payload = {
  'is_enabled': True,
  'from_wallet': '<wallet_id>',
  'from_kind': 'USDT-TRX',
  'to_wallet': '<wallet_id>',
  'to_kind': 'USDC-TRX',
  'min_amount': 50,
  'max_amount': 50,
  'keep_amount': 50,
  'exchange': '<exchange_id>',
}
uniwire_api_request('/v1/automatic-funding/', payload, 'POST').then(function(response) {
  console.log(response);
}).catch(function(error) {
  console.log(error);
});

JSON response for Create Automatic Funding endpoint:

json
{
  "result": {
    "id": "<id>",
    "from_wallet": {
      "id": "<wallet_id>",
      "name": "Tron"
    },
    "from_kind": "USDT-TRX",
    "to_wallet": {
      "id": "<wallet_id>",
      "name": "Tron"
    },
    "to_kind": "USDC-TRX",
    "keep_amount": "50",
    "min_amount": "50",
    "max_amount": "50",
    "exchange": {
      "id": "<exchange_id>",
      "title": "Binance"
    },
    "is_enabled": true
  }
}

Update Auto Funding

This endpoint allows updating automatic funding. Editable fields: is_enabled,to_wallet,to_kind,keep_amount,min_amount,max_amount,exchange.

HTTP Request

PUT https://api.uniwire.com/v1/automatic-funding/<ID>/

URL Parameters

ParameterDescription
IDThe ID of the automatic funding to retrieve

Payload Parameters

ParameterDescription
is_enabledEnable / Disable automatic funding execution
to_walletWallet ID
to_kindAvailable Values
exchangeExchange ID
min_amountMinimal amount to execute automatic funding
max_amountMaximum amount to execute automatic funding
keep_amountAmount to keep in wallet
python
import json

payload = {
    'is_enabled': True,
    'to_wallet': '<wallet_id>',
    'to_kind': 'USDC-TRX',
    'min_amount': 50,
    'max_amount': 50,
    'keep_amount': 50,
    'exchange': '<exchange_id>',
}
auto_funding = uniwire_api_request('/v1/automatic-funding/<id>', payload, 'PUT')
print(json.dumps(auto_funding, indent=2))
javascript
var payload = {
  'is_enabled': True,
  'to_wallet': '<wallet_id>',
  'to_kind': 'USDC-TRX',
  'min_amount': 50,
  'max_amount': 50,
  'keep_amount': 50,
  'exchange': '<exchange_id>',
}
uniwire_api_request('/v1/automatic-funding/<id>', payload, 'PUT').then(function(response) {
  console.log(response);
}).catch(function(error) {
  console.log(error);
});

JSON response for Create Automatic Funding endpoint:

json
{
  "result": {
    "id": "<id>",
    "from_wallet": {
      "id": "<wallet_id>",
      "name": "Tron"
    },
    "from_kind": "USDT-TRX",
    "to_wallet": {
      "id": "<wallet_id>",
      "name": "Tron"
    },
    "to_kind": "USDC-TRX",
    "keep_amount": "50",
    "min_amount": "50",
    "max_amount": "50",
    "exchange": {
      "id": "<exchange_id>",
      "title": "Binance"
    },
    "is_enabled": true
  }
}

Delete Auto Funding

This endpoint allows delete automatic funding.

HTTP Request

DELETE https://api.uniwire.com/v1/automatic-funding/<ID>/

URL Parameters

ParameterDescription
IDThe ID of the automatic funding to delete
python
import json

payload = None
auto_funding = uniwire_api_request('/v1/automatic-funding/<id>', payload, 'DELETE')
print(json.dumps(auto_funding, indent=2))
javascript
var payload = null
uniwire_api_request('/v1/automatic-funding/<id>', payload, 'DELETE').then(function(response) {
  //
}).catch(function(error) {
  console.log(error);
});