Official TypeScript SDK for Velta — your USDC, on autopilot.
Query venues, read your portfolio, and manage withdrawals from any TypeScript / JavaScript app.
Velta is an MCP-native yield optimizer for the Base network. You deposit USDC once, and Velta continuously moves it to the best available lending rate across Morpho, Moonwell, and Aave — rebalancing automatically, gas-aware, with circuit breakers.
This SDK is a thin, typed client for the public Velta API. It holds no keys and signs nothing on-chain.
npm install @veltamcp/sdkNo registry config needed — it's on the public npm registry.
The venue data is public — no key required:
import { VeltaClient } from "@veltamcp/sdk";
const velta = new VeltaClient();
// Where's the best risk-adjusted USDC yield on Base right now? (ranked best-first)
const venues = await velta.getVenues();
const best = venues[0];
console.log(`Best: ${best.venueId} @ ${best.apy7dPct} (7d APY), risk ${best.riskScore}/100`);Account-scoped calls take your Velta access token:
const account = new VeltaClient({ accessToken: process.env.VELTA_ACCESS_TOKEN! });
const status = await account.getStatus();
console.log(`$${status.totalUsd} across ${status.positions.length} position(s)`);
const ledger = await account.getActivity({ limit: 10 });See examples/quickstart.ts for a runnable version.
| Method | Auth | Description |
|---|---|---|
getVenues() |
public | Venues with live APYs + Velta risk-adjusted scores, ranked best-first |
getStatus() |
token | Account snapshot — preferences, managed wallets, positions, total value |
getActivity(query?) |
token | Activity ledger (deposits, rebalances, yield, withdrawals) with plain-English reasons |
getDepositInfo() |
token | Managed wallet address + network to fund with USDC |
withdraw({ amountUsd?, fromVenue? }) |
token | Queue a withdrawal (full or partial); autopilot redeems to USDC |
All methods return typed promises and throw a VeltaError (with status and optional code) on non-2xx responses. Calling a token-only method without an accessToken throws a VeltaError(401) before any request.
Roadmap: policy mutations (set risk tier / rebalance threshold, pause/resume) ship in a later release as the authenticated write API lands. They're intentionally omitted here rather than stubbed.
new VeltaClient({
accessToken: "…", // optional; required for account-scoped calls
baseUrl: "https://veltamcp.com/api/v1", // optional override (this is the default)
fetch: customFetch, // optional (Node < 18)
});- Never hard-code your access token. Load it from an environment variable or secret manager.
- This SDK only talks to the public Velta API over HTTPS. It contains no secrets and performs no on-chain signing.
- Found a vulnerability? Email veltamcp@proton.me — please don't open a public issue for security reports.
- 🌐 Website — https://veltamcp.com
- 🐦 X — https://x.com/veltamcp
- 💬 Telegram — https://t.me/veltamcp
MIT © Velta