Overview
The Portfolio API gives you the account-level view after users deposit, withdraw, trade, transfer funds, or earn rewards. Use it to show current portfolio value, per-asset balances, an activity feed, and historical performance. Subscribe to Portfolio transaction webhooks when you want change notifications without continuous polling. All Portfolio endpoints are scoped to a specificaccount_id. Pass the same quote_symbol across related calls when you want summary values, holdings, history, and transaction amounts to line up in the same currency.
Prerequisites
- Payward Services API credentials (see the Authentication guide)
- A verified user with at least one account
- Base URL:
https://api.services.payward.com
Portfolio workflow
Use this flow when you build a portfolio dashboard or reconcile user activity after payments and trades.1
Show the account summary
Fetch total value, available value, withheld value, open-order value, and unrealized PnL.
GET /v1/accounts/{account_id}/portfolio/summary2
List asset positions
Fetch the asset-level balance breakdown for the portfolio.
GET /v1/accounts/{account_id}/portfolio/details3
Build the activity feed
Fetch transaction history for deposits, withdrawals, transfers, swaps, price trigger swaps, and earn rewards.
GET /v1/accounts/{account_id}/portfolio/transactions4
Subscribe to transaction changes
Register for
transaction.* webhook events. Retrieve the complete transaction from Portfolio after each notification.POST /v1/webhooks5
Chart portfolio performance
Fetch historical balances and valuations for a selected time window.
GET /v1/accounts/{account_id}/portfolio/historyStep 1: show the account summary
CallGET /v1/accounts/{account_id}/portfolio/summary to get the top-level values for a portfolio dashboard.
See the Get Portfolio Summary API reference for the full response schema.
Step 2: list asset positions
CallGET /v1/accounts/{account_id}/portfolio/details to show the user’s holdings by asset.
The
pnl object is optional. pnl.status can appear without PnL amounts. pnl.unrealized and pnl.realized are returned only when the amount is available and PWS can expose its reference currency. When either amount is returned, pnl.reference_currency is returned with it. If a status field is in_progress, the corresponding PnL value is still being calculated and might be absent or not final. Use pnl.reference_currency when displaying PnL amounts instead of assuming that PnL always uses the requested quote_symbol.
See the List Portfolio Details API reference for all query parameters and response fields.
Step 3: build the activity feed
CallGET /v1/accounts/{account_id}/portfolio/transactions to list user-visible portfolio activity. Use it after a deposit, withdrawal, swap, price trigger swap, or earn reward to show what changed and support reconciliation.
Each transaction can include
spend, receive, or both. Failed transactions can omit movement details, so build your UI around the required fields id, timestamp, and type, then display optional money movement fields when present.
Deposits and withdrawals can also carry details with type: "funding" and a crypto_transaction_id you can use to link to a block explorer. It appears once the transaction settles on a blockchain, and is omitted for fiat funding.
swap and price_trigger_swap represent executed transactions. Failed execution attempts do not appear in this endpoint.
Use next_page_token as page_token to fetch more transactions.
See the List Portfolio Transactions API reference for all filters and response fields.
Step 4: subscribe to transaction changes
Register a webhook to receive change notifications for the Portfolio transaction categories you use. One webhook can subscribe to any combination of these events:
Every payload contains
type, transaction_id, user_id, account_id, and timestamp. It can also contain status.
Treat the webhook as a change notification. Use transaction_id as the ids filter on GET /v1/accounts/{account_id}/portfolio/transactions to retrieve the complete ledger entry.
The same transaction can emit more than one event as its status changes. Deduplicate delivery retries with the svix-id header.
Failed swap and price trigger swap execution attempts do not emit
transaction.* events because they do not contain
ledger movements. Use the relevant quote or price trigger swap failure event instead.Step 5: chart portfolio performance
CallGET /v1/accounts/{account_id}/portfolio/history to draw a portfolio value chart or show how balances changed over time.
- Portfolio value charts with
timestampandvalue. - Historical PnL views with
total_pnl, when available. - Historical asset-balance charts when you request
assetsfilters with bothsymbolandtype. - Quote-aware charts with top-level
quote_symbol,quote_type,start_timestamp, andend_timestamp.
A missing asset balance at the start of the range means the user did not hold that asset at that time. A zero balance
means the user may have held the asset previously, but did not hold it at that snapshot. The latest daily balance can
be delayed by up to about five hours after UTC midnight while data is processed.