Skip to main content

Vezgo API (1.0.0)

Download OpenAPI specification:Download

Welcome to Vezgo! This is the Vezgo API specification. See https://vezgo.com/docs/intro/ for a complete overview of Vezgo.

Authentication

Get Authentication Token

This endpoint returns the authentication token referred as VEZGO_USER_TOKEN in this doc.

header Parameters
loginName
required
string
Examples: userid01 user@example.dev

The user's unique identification from your system (could be the username, id, or email).

Request Body schema: application/json
clientId
string
secret
string

Responses

Request samples

Content type
application/json
{
  • "clientId": "string",
  • "secret": "string"
}

Response samples

Content type
application/json
{
  • "token": "string"
}

Account

Get accounts list

This endpoint returns the list of a user's connected accounts.

Authorizations:
VEZGO_USER_TOKEN

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add account

Note: This endpoint is only useful for enterprise customers using direct API integration. If you are integrating with the Connect widget, this endpoint is not applicable. To get access to the Direct API, please contact the team.
Add a new user account for the authorized user. Each provider requires a different set of credentials. See the table below for the list of providers Wealthica currently supports, and the corresponding attributes that are required for the credentials object.

Note: Adding an account will toggle an asynchronous first sync task. If the account returns a login failed on the first sync, it will be automatically removed to minimize the number of abandoned connections.

Request Body schema: application/json
name
string

The account name.

provider
required
string

The provider name (provider.name from the /providers endpoint).

required
object (AccountCredentials)

Credentials needed for connecting to the provider. The credentials object varies according to the provider. Check provider.credentials for the list of credential information required by the provider.

sync_transactions
boolean

Whether or not to sync transactions for this account. Defaults to true and only takes effect if the Vezgo client's subscription plan has this feature.

sync_nfts
boolean

Whether or not to sync NFTs for this account. Only takes effect if the Vezgo client's subscription plan has this feature.

daily_sync
boolean

Whether or not to sync this account daily. Defaults to true and only takes effect if the Vezgo client's subscription plan has this feature.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "provider": "string",
  • "credentials": {
    },
  • "sync_transactions": true,
  • "sync_nfts": true,
  • "daily_sync": true
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "resource_type": "string",
  • "blockchain": "string",
  • "created_at": 0,
  • "updated_at": 0,
  • "status": "ok",
  • "status_details": {
    },
  • "error": {
    },
  • "fiat_value": "string",
  • "fiat_ticker": "string",
  • "provider": {
    },
  • "wallets": [
    ],
  • "balances": [
    ],
  • "v": "string",
  • "authorized": true
}

Get an account

This endpoint returns a specific account.

Authorizations:
VEZGO_USER_TOKEN
path Parameters
account_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "resource_type": "string",
  • "blockchain": "string",
  • "created_at": 0,
  • "updated_at": 0,
  • "status": "ok",
  • "status_details": {
    },
  • "error": {
    },
  • "fiat_value": "string",
  • "fiat_ticker": "string",
  • "provider": {
    },
  • "wallets": [
    ],
  • "balances": [
    ],
  • "v": "string",
  • "authorized": true
}

Update account

Note: This endpoint is only useful for enterprise customers using direct API integration. If you are integrating with the Connect widget, this endpoint is not applicable. To get access to the Direct API, please contact the team.
Update an existing account/connection. If credentials or security_answer is provided, a synchronization will be triggered.

Request Body schema: application/json
name
string

The account name.

object (AccountCredentials)

Credentials needed for connecting to the provider. The credentials object varies according to the provider. Check provider.credentials for the list of credential information required by the provider.

security_answer
string

Answer to the security question prompted by the provider website.

sync_transactions
boolean

Whether or not to sync transactions for this account. Defaults to true and only takes effect if the Vezgo client's subscription plan has this feature.

sync_nfts
boolean

Whether or not to sync NFTs for this account. Only takes effect if the Vezgo client's subscription plan has this feature.

daily_sync
boolean

Whether or not to sync this account daily. Defaults to true and only takes effect if the Vezgo client's subscription plan has this feature.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "credentials": {
    },
  • "security_answer": "string",
  • "sync_transactions": true,
  • "sync_nfts": true,
  • "daily_sync": true
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "resource_type": "string",
  • "blockchain": "string",
  • "created_at": 0,
  • "updated_at": 0,
  • "status": "ok",
  • "status_details": {
    },
  • "error": {
    },
  • "fiat_value": "string",
  • "fiat_ticker": "string",
  • "provider": {
    },
  • "wallets": [
    ],
  • "balances": [
    ],
  • "v": "string",
  • "authorized": true
}

Remove an account

Removes a specific account and all of its data from a user

Authorizations:
VEZGO_USER_TOKEN
path Parameters
account_id
required
string

Responses

Poll account for an update

Note: This endpoint is only useful for enterprise customers using direct API integration. If you are integrating with the Connect widget, this endpoint is not applicable. To get access to the Direct API, please contact the team.
Blocks (for max 30 seconds) listening for change to the account, and returns the updated version if any.

Authorizations:
VEZGO_USER_TOKEN
path Parameters
account_id
required
string
query Parameters
v
number

Base version number of the account, which is usually the newest version number that the API client knows.

If provided it will be used to compare with the latest version number on the server to determine if the account has been updated (its wallets have been retrieved, balances have been updated, or the sync has finished).

Defaults to the version number at the start of the poll.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "resource_type": "string",
  • "blockchain": "string",
  • "created_at": 0,
  • "updated_at": 0,
  • "status": "ok",
  • "status_details": {
    },
  • "error": {
    },
  • "fiat_value": "string",
  • "fiat_ticker": "string",
  • "provider": {
    },
  • "wallets": [
    ],
  • "balances": [
    ],
  • "v": "string",
  • "authorized": true
}

Sync an account

This endpoint triggers an account sync. Vezgo automatically synchronizes all accounts with providers once daily. You can also trigger an account sync at any time to get the latest data.

Authorizations:
VEZGO_USER_TOKEN
path Parameters
account_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "resource_type": "string",
  • "blockchain": "string",
  • "created_at": 0,
  • "updated_at": 0,
  • "status": "ok",
  • "status_details": {
    },
  • "error": {
    },
  • "fiat_value": "string",
  • "fiat_ticker": "string",
  • "provider": {
    },
  • "wallets": [
    ],
  • "balances": [
    ],
  • "v": "string",
  • "authorized": true
}

Get balance history

This endpoint returns the balance history for an account.
By default, data for the current year is returned.
NOTE: An account's balance history starts from the date the account was first connected to Vezgo.

Authorizations:
VEZGO_USER_TOKEN
path Parameters
account_id
required
string
query Parameters
from
string
to
string
wallet
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Transaction

Get transaction history

Returns the transaction history for an account

To fetch all transactions, we need to enable pagination and go page-by-page.

First make a request with an empty last (?last=) for the first page. Then use the last transaction's ID from the first page to query the next page ?last=LAST_TRANSACTION_ID, and so on.

See example code at https://vezgo.com/docs/examples#get-all-transactions

Notes:
  • The same ?from param must be provided in all requests.
  • If ?from is not passed, it defaults to the start of the current year. If you want to get all transactions including previous years, pass a very old date.
  • If ?limit is not passed, it defaults to 100. Maximum value of ?limit allowed is 1000.
  • sort can be only used when Pagination mode is not in use.

Due to trade reconciliation, ?limit doesn't guarantee the exact number of results to be returned. E.g. ?limit=10 might return 9 or fewer transactions, depending on how many times trade reconciliation happens within the 10 transactions queried from our DB.

Trade reconciliation is a process where 2 or more transactions that are originally part of a trade are combined into a single transaction_type: 'trade' transaction. This process is neccessary due to a current limitation in the Vezgo system, and will be removed in the next version of Vezgo API.

IMPORTANT: We have a hard limit of 6MB response size for transactions. If you are already passing ?limit then it should be good. But if you are passing in a large ?from=&to= range, or querying a very large account without passing in ?limit, any request returning more than 6MB of response will be dropped.

By default, transactions are sorted by transaction.initiated_at in ascending order.

When a last or limit is passed to the query, pagination mode is enabled. In this mode, transactions are sorted by their creation date (the date on which the transaction is added to the Vezgo system).

Authorizations:
VEZGO_USER_TOKEN
path Parameters
account_id
required
string
query Parameters
ticker
string
from
string
to
string
last
string
limit
number
wallet
string
sort
string
Enum: "asc" "desc"
exclude_fields
string

comma-separated list of fields to exclude from the response, for smaller response sizes.

types
Array of strings (TransactionType)
Items Enum: "deposit" "withdrawal" "trade" "staking" "unstaking" "reward" "bonus" "other"

comma-separated list of transaction types to filter by.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a specific transaction

Returns a specific transaction

Authorizations:
VEZGO_USER_TOKEN
path Parameters
account_id
required
string
tx_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "resource_type": "string",
  • "status": "string",
  • "transaction_type": "deposit",
  • "transaction_subtype": "onchain_deposit",
  • "transaction_hash": "string",
  • "realized_pnl": "string",
  • "fiat_calculated_at": 0,
  • "initiated_at": 0,
  • "confirmed_at": 0,
  • "wallet": "string",
  • "misc": {
    },
  • "parts": [
    ],
  • "fees": [
    ]
}

Order

Get order history

Returns the order history for an account

NOTE: Currently, orders are available for Binance only. Please reach us out to get this feature enabled for you.

To fetch all orders, we need to enable pagination and go page-by-page.

First make a request with an empty last (?last=) for the first page. Then use the last orders's ID from the first page to query the next page ?last=LAST_ORDER_ID, and so on.

See example code at https://vezgo.com/docs/examples#get-all-transactions

Notes:
  • The same ?from param must be provided in all requests.
  • If ?from is not passed, it defaults to the start of the current year. If you want to get all orders including previous years, pass a very old date.
  • If ?limit is not passed, it defaults to 100. Maximum value of ?limit allowed is 1000.
  • sort can be only used when Pagination mode is not in use.

By default, orders are sorted by order.order_creation_time in ascending order.

When a last or limit is passed to the query, pagination mode is enabled. In this mode, orders are sorted by their creation date.

Authorizations:
VEZGO_USER_TOKEN
path Parameters
account_id
required
string
query Parameters
from
string
to
string
last
string
limit
number
sort
string
Enum: "asc" "desc"

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a specific transaction

Returns a specific transaction

Authorizations:
VEZGO_USER_TOKEN
path Parameters
account_id
required
string
order_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "account": "string",
  • "wallet": "string",
  • "type": "string",
  • "order_creation_time": 0,
  • "order_id": "string",
  • "order_status": "string",
  • "side": "string",
  • "time_in_force": "string",
  • "base_ticker": "string",
  • "quote_ticker": "string",
  • "order_quantity": 0,
  • "order_price": 0,
  • "filled_price": 0,
  • "filled_quantity": 0,
  • "average_execution_price": "string",
  • "resource_type": "string",
  • "updated_at": 0,
  • "misc": {
    }
}

Provider

Get list of all supported providers.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get provider by name.

path Parameters
name
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

User

Remove the Vezgo user

Removes the Vezgo user associated with the user token, and all of the user's accounts.

Authorizations:
VEZGO_USER_TOKEN

Responses