Skip to main content

Accounts

An account is one connection a user made through Vezgo Connect: an exchange login, a wallet or a blockchain address. It holds the connection's wallets and their current balances, and tells you how its last sync went. Its transactions have their own endpoints: see Transactions.

Every call on this page is made for one user, with that user's token. See Authentication.

Endpoints​

EndpointReturns
GET /accounts
user.accounts.getList()
All the user's accounts.
GET /accounts/{account_id}
user.accounts.getOne(id)
One account.
POST /accounts/{account_id}/sync
user.accounts.sync(id)
Starts a sync and returns the account.
DELETE /accounts/{account_id}
user.accounts.remove(id)
Deletes the account.
GET /accounts/{account_id}/history
user.history.getList({ accountId })
The fiat value of each wallet over time.
GET /accounts/{account_id}/kyc-dataThe identity data the provider holds. See KYC data.

Connecting, updating and polling accounts without the Connect widget is covered in Direct API Integration. Every endpoint and field is in the API reference.

Get an account​

Store each account's id with your user when they connect it, then fetch it whenever you need its balances.

Node.js
const vezgo = Vezgo.init({
clientId: 'YOUR_CLIENT_ID',
secret: 'YOUR_CLIENT_SECRET',
});
const user = vezgo.login('USERNAME_FROM_YOUR_SYSTEM');

const account = await user.accounts.getOne('613f3f9fe9b200002a0cc768');
cURL
curl https://api.vezgo.com/v1/accounts/613f3f9fe9b200002a0cc768 \
-H 'Authorization: Bearer YOUR_USER_TOKEN'

The account object​

A Bitcoin address with one wallet:

{
"id": "613f3f9fe9b200002a0cc768",
"resource_type": "account",
"provider": {
"name": "bitcoin",
"display_name": "Bitcoin",
"auth_type": "wallet",
"logo": "https://app.wealthica.com/images/institutions/bitcoin.png",
"resource_type": "provider"
},
"status": "ok",
"status_details": {
"wallets": "ok",
"balances": "ok",
"transactions": "ok",
"date": 1631535020587
},
"error": null,
"fiat_value": "1700.445",
"fiat_ticker": "USD",
"blockchain": null,
"wallets": [
{
"id": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh:cash:usd",
"name": null,
"address": null,
"fiat_value": "1700.445",
"fiat_ticker": "USD"
}
],
"balances": [
{
"ticker": "BTC",
"provider_ticker": "BTC",
"name": "Bitcoin",
"asset_type": "crypto",
"amount": "0.037864718",
"decimals": 8,
"fiat_value": "1700.445",
"fiat_ticker": "USD",
"wallet": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh:cash:usd",
"logo": "https://data.wealthica.com/api/securities/CRYPTO:BTC/logo",
"updated_at": 1631535020587,
"resource_type": "balance"
}
],
"created_at": 1631535007000,
"updated_at": 1631535020587
}
FieldWhat it is
idThe account ID. Store it with your user.
providerThe exchange, blockchain or wallet the account is connected to. See Providers.
statusHow the last sync went: ok, syncing, retry or error. See Sync status.
status_detailsThe status of each part of the last sync: wallets, balances and transactions.
errorWhy the last sync failed, when there is an error: its name and message.
walletsThe account's wallets, for example spot and futures on an exchange, each with its fiat_value.
balancesCurrent holdings: ticker, amount and fiat_value, and the wallet that holds them. Amounts and values are strings, so they keep their full precision.
fiat_value, fiat_tickerThe account's total value, and its currency.
blockchainFor wallet accounts, the blockchain holding the address. null otherwise.
created_at, updated_atWhen the account was connected and last updated, in milliseconds since the epoch.

Sync status​

Vezgo syncs every account daily, and again whenever you call POST /accounts/{account_id}/sync. The SyncAccount webhook tells you when a sync finishes, so you don't need to poll.

statusMeaning
okThe last sync succeeded.
syncingA sync is running.
retryThe last sync failed temporarily, and Vezgo will retry it.
errorThe last sync failed. error.name says why.
error.nameWhat to do
LoginFailedErrorThe provider rejected the credentials, or the session expired. Vezgo stops syncing until the user reconnects: see Handle reconnections.
SecurityQuestionErrorThe provider asked a security question (2FA). The question is in error.message, and any answer options in error.options. Send the answer as security_answer with PUT /accounts/{account_id}.
TemporaryFailureErrorA temporary failure. Vezgo retries automatically, and you can trigger a retry with a sync.
UnknownConnectorError, UnhandledConnectorErrorTreated like a temporary failure. If an account stays in error for long, contact Vezgo.

Balance history​

GET /accounts/{account_id}/history returns the fiat value of each wallet over time, for charts. Pass from and to as YYYY-MM-DD, and wallet to get only one wallet.

const history = await user.history.getList({
accountId: '613f3f9fe9b200002a0cc768',
from: '2026-01-01',
to: '2026-09-30',
});
[
{
"id": "6144755af8a77cae7174afa3",
"date": 1767225600000,
"wallet": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh:cash:usd",
"fiat_ticker": "USD",
"fiat_value": "1650.12"
}
]

Delete an account​

Delete the accounts your users no longer need: an account that syncs during a month counts toward that month's usage. See Clean up connections.

await user.accounts.remove('613f3f9fe9b200002a0cc768');