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
| Endpoint | Returns |
|---|---|
GET /accountsuser.accounts.getList() | All the user's accounts. |
GET /accounts/{account_id}user.accounts.getOne(id) | One account. |
POST /accounts/{account_id}/syncuser.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}/historyuser.history.getList({ accountId }) | The fiat value of each wallet over time. |
GET /accounts/{account_id}/kyc-data | The 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.
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 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
}
| Field | What it is |
|---|---|
id | The account ID. Store it with your user. |
provider | The exchange, blockchain or wallet the account is connected to. See Providers. |
status | How the last sync went: ok, syncing, retry or error. See Sync status. |
status_details | The status of each part of the last sync: wallets, balances and transactions. |
error | Why the last sync failed, when there is an error: its name and message. |
wallets | The account's wallets, for example spot and futures on an exchange, each with its fiat_value. |
balances | Current 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_ticker | The account's total value, and its currency. |
blockchain | For wallet accounts, the blockchain holding the address. null otherwise. |
created_at, updated_at | When 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.
status | Meaning |
|---|---|
ok | The last sync succeeded. |
syncing | A sync is running. |
retry | The last sync failed temporarily, and Vezgo will retry it. |
error | The last sync failed. error.name says why. |
error.name | What to do |
|---|---|
LoginFailedError | The provider rejected the credentials, or the session expired. Vezgo stops syncing until the user reconnects: see Handle reconnections. |
SecurityQuestionError | The 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}. |
TemporaryFailureError | A temporary failure. Vezgo retries automatically, and you can trigger a retry with a sync. |
UnknownConnectorError, UnhandledConnectorError | Treated 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');