Skip to main content

Overview

The Portfolio API gives you the account-level view after users deposit, withdraw, trade, or earn rewards. Use it to show current portfolio value, per-asset balances, an activity feed, and historical performance. All Portfolio endpoints are scoped to a specific account_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/summary
2

List asset positions

Fetch the asset-level balance breakdown for the portfolio.GET /v1/accounts/{account_id}/portfolio/details
3

Build the activity feed

Fetch transaction history for deposits, trades, price trigger swaps, and earn rewards.GET /v1/accounts/{account_id}/portfolio/transactions
4

Chart portfolio performance

Fetch historical balances and valuations for a selected time window.GET /v1/accounts/{account_id}/portfolio/history

Step 1: show the account summary

Call GET /v1/accounts/{account_id}/portfolio/summary to get the top-level values for a portfolio dashboard.
Use these fields for the dashboard header: See the Get Portfolio Summary API reference for the full response schema.

Step 2: list asset positions

Call GET /v1/accounts/{account_id}/portfolio/details to show the user’s holdings by asset.
Use these fields for each position: 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

Call GET /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.
Common filters: 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. 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: chart portfolio performance

Call GET /v1/accounts/{account_id}/portfolio/history to draw a portfolio value chart or show how balances changed over time.
Use the history endpoint for:
  • Portfolio value charts with timestamp and value.
  • Historical PnL views with total_pnl, when available.
  • Historical asset-balance charts when you request assets filters with both symbol and type.
  • Quote-aware charts with top-level quote_symbol, quote_type, start_timestamp, and end_timestamp.
The history endpoint returns a maximum of 365 data points per request. Use a narrower time window when you need fewer points.
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.
See the List Portfolio History API reference for all query parameters and response fields.

API reference