v1.0 Stable

WealthGuard API

Integrate powerful personal finance, investment tracking, and wealth management capabilities into your applications with our RESTful API.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Overview

The WealthGuard API provides programmatic access to financial data, portfolio management, goal tracking, and advanced analytics. Our API follows REST principles and returns JSON-encoded responses.

# Retrieve authenticated user accounts
curl https://api.wealthguard.com/v1/accounts \
  -H "Authorization: Bearer sk_live_wg_8f9a2b3c4d5e6f7g8h9i0j" \
  -H "Content-Type: application/json"

Authentication

WealthGuard uses API keys to authenticate requests. You can view and manage your API keys in the Developer Dashboard. All API requests must include your secret key in the `Authorization` header.

Never expose your secret API keys in client-side code or public repositories. For frontend applications, use our published JWT tokens or implement a secure proxy.

Base URL & Versions

Endpoints

GET /accounts

Returns a list of all financial accounts linked to the authenticated user.

ParameterTypeDescription
typeoptionalstringFilter by account type: checking, savings, investment, credit
limitoptionalintegerNumber of records to return (default: 20, max: 100)
cursoroptionalstringCursor for pagination
POST /transactions

Records a new financial transaction and automatically categorizes it using ML.

ParameterTypeDescription
account_idrequiredstringID of the account the transaction belongs to
amountrequirednumberTransaction amount in cents
currencyrequiredstringISO 4217 currency code (e.g., USD, EUR)
daterequiredstringISO 8601 timestamp of the transaction
descriptionoptionalstringTransaction description or merchant name
GET /portfolio

Retrieves the current portfolio allocation, performance metrics, and asset breakdown.

POST /goals

Creates a new financial goal with target amount, deadline, and tracking preferences.

Error Handling

WealthGuard uses conventional HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx range indicate success, 4xx range indicate client errors, and 5xx range indicate server errors.

200 OK
Request succeeded
400 Bad Request
Invalid request parameters
401 Unauthorized
Missing or invalid API key
403 Forbidden
Insufficient permissions
404 Not Found
Resource does not exist
429 Too Many Requests
Rate limit exceeded
500 Internal Error
Server-side failure

Rate Limits

API requests are limited based on your subscription tier. When you exceed the rate limit, the API will return a `429 Too Many Requests` response with a `Retry-After` header.

Tip: Implement exponential backoff when handling `429` responses to ensure smooth retry behavior under load.
"}