Wallets list
This service allows you to list the master wallet, to get important data such as balance and others.
Wallets List
GET
api.vitawallet.io/api/businesses/wallets?page=:page&count=:count
This method allows you to list all your business wallets, supports pagination.
Query Parameters
{
"wallets": [
{
"uuid": "023d6e20-2e50-43f1-b4c0-0196de0295db",
"type": "business_wallet",
"attributes": {
"token": "iops87eopss478oios",
"created_at": "2020-03-24T01:31:39.328Z",
"is_master": false,
"balances": {
"clp": 30880,
"btc": 0.000125
}
}
},
{
"uuid": "3aaff8b2-c066-4882-bf77-37e9dc796881",
"type": "business_wallet",
"attributes": {
"token": "iops87eopss478oios78",
"created_at": "2020-03-24T20:46:12.278Z",
"is_master": false,
"balances": {
"clp": 0,
"usd": 3587.25
}
}
}
],
"total": 2,
"count": 20
}
SDK
NOTE: get method can take optional parameters, which helps you set the page number you want to get and the number of items.
import Business from 'vita-business-node';
try {
const wallets = await Business.wallets().get({page, count});
} catch {}
Get Wallet
GET
api.vitawallet.io/api/businesses/wallets/:uuid
This method gets a wallet details using its uuid.
Path Parameters
{
"wallet": {
"uuid": "023d6e20-2e50-43f1-b4c0-0196de0295db",
"type": "business_wallet",
"attributes": {
"token": "iops87eopss478oios",
"created_at": "2020-03-24T01:31:39.328Z",
"is_master": false,
"balances": {
"clp": 30880
}
}
}
}
SDK
NOTE: wallets module can get wallet uuid to search.
get method handles Vita Business services request.
import Business from 'vita-business-node';
try {
const wallet = await Business.wallets(uuid).get();
} catch {}
Última actualización