Skip to main content

Managing providers

A provider is an exchange, blockchain or wallet your users can connect. Vezgo adds providers, occasionally retires one, and sometimes a provider has an outage. This page covers how to offer providers to your users and keep up with those changes.

Two ways to offer providers​

Let the Connect widget list them​

By default, Vezgo Connect opens on the full provider list and the user picks one. There is nothing to maintain: new providers appear as they are added, discontinued ones disappear, and an outage is shown on the affected provider's screen.

You can narrow the list with these options, passed to user.connect() or as Connect URL parameters:

SDK optionConnect URL parameterEffect
providersprovidersOnly these providers, for example binance,coinbase,ethereum.
disabledProvidersdisabled_providersEvery provider except these.
providerCategoriesprovider_categoriesOnly these categories: exchanges, blockchains, wallets.
hideWalletConnectWalletshide_wallet_connect_walletsHide the WalletConnect wallets.
user.connect({
providerCategories: ['exchanges', 'blockchains'],
disabledProviders: ['kraken'],
});

Build your own list​

To show providers in your own UI, open Connect directly on the one the user picks. Connect skips its own selection screen:

user.connect({ provider: 'coinbase' });

With the Connect URL, append the provider name: https://connect.vezgo.com/connect/coinbase?client_id=.... See Preselect a provider.

Your list then has to keep up with Vezgo's. Build it from the API rather than hard-coding provider names, and refresh it regularly: once a day is enough for the list itself, and more often if you show outage warnings.

Fetching Vezgo's providers​

GET /providers returns every provider Vezgo currently offers. It is public: no user token is needed.

const providers = await vezgo.providers.getList();

The fields a provider picker needs:

FieldUse
nameStable identifier. Pass it to user.connect({ provider }).
display_name, logoWhat to show the user.
categoriesexchange, blockchain or wallet.
auth_typeHow the user connects: oauth, token (API key), wallet (address) or password.
is_betaNewer providers, still in beta.
outage, outage_incident_linkSee Outages.

Each provider also has a status page with its data mapping: https://vezgo.com/status/<name>-api/, for example vezgo.com/status/coinbase-api.

WalletConnect wallets​

Besides its own providers, Vezgo connects hundreds of wallets through WalletConnect. They come from a separate public endpoint:

GET https://api.vezgo.com/v1/wallet-connect/providers

Each wallet has a name, a logo, and the links WalletConnect uses to open it on each platform:

{
"name": "My Wallet",
"logo": "https://explorer-api.walletconnect.com/v3/logo/sm/...",
"desktop": { "native": "mywallet-wc://", "universal": "" },
"mobile": { "native": "mywallet-wc://", "universal": "https://my.tt/wc/" }
}

Not every wallet runs everywhere. Some are desktop-only, many are mobile-only, and some support both, so filter the list for the platform your integration runs on. A wallet supports a platform when it has a link for it:

const response = await fetch('https://api.vezgo.com/v1/wallet-connect/providers');
const wallets = await response.json();

const hasLink = (links) => Boolean(links && (links.native || links.universal));

// In a mobile app: only wallets that can be opened on a phone.
const mobileWallets = wallets.filter((wallet) => hasLink(wallet.mobile));

// On desktop: only wallets with a desktop app or browser extension.
const desktopWallets = wallets.filter((wallet) => hasLink(wallet.desktop));

Some wallets also have a dedicated Vezgo provider, MetaMask for example. When a wallet appears in both lists, show the Vezgo provider: the Connect widget does the same.

To connect a WalletConnect wallet from your own list, open Connect on the walletconnect provider, where the user completes the connection in WalletConnect:

user.connect({ provider: 'walletconnect' });

Outages​

When a provider is having problems, because its API is down or it changed something Vezgo depends on, Vezgo sets outage: true on it and usually links the incident in outage_incident_link, on status.vezgo.com. The Connect widget shows a "Temporary Outage" notice on that provider's screen, with a link to the status page.

If you build your own list, do the same: keep the provider visible, and warn users before they try to connect. Hiding it confuses users who connected it before.

const providers = await vezgo.providers.getList();

const options = providers.map((provider) => ({
value: provider.name,
label: provider.display_name,
logo: provider.logo,
warning: provider.outage
? {
text: `${provider.display_name} is having issues. Connecting may fail until it is resolved.`,
link: provider.outage_incident_link, // may be absent
}
: null,
}));

Connected accounts carry the same fields in account.provider. Use them to explain a failing sync, rather than asking the user to reconnect:

const account = await user.accounts.getOne(accountId);

if (account.provider.outage) {
showNotice(
`${account.provider.display_name} is having issues, so this account may not update until it is resolved.`,
account.provider.outage_incident_link
);
}

To hear about incidents as they happen, subscribe on status.vezgo.com by email, RSS or Slack. You can subscribe to everything, or only to the components you use.

Discontinued providers​

When Vezgo stops offering a provider, it is unpublished:

  • GET /providers stops returning it. A list built from the API drops it automatically. Pass ?unpublished=true to include unpublished providers; they are flagged unpublished: true.
  • The Connect widget stops listing it. Opening it directly, with a preselected provider or a reconnect, shows "This connector has been discontinued."
  • Accounts already connected are not deleted. They stay available through the API, and their account.provider.unpublished is true.

For accounts whose provider was unpublished, tell the user it is no longer supported instead of offering a reconnect, which would not succeed:

const accounts = await user.accounts.getList();

for (const account of accounts) {
if (account.provider.unpublished) {
markAsDiscontinued(account); // e.g. hide the Reconnect button, show a notice
}
}

Once the user no longer needs such a connection, delete it: a connection that still syncs counts toward your usage. See Clean up connections.