Walletguide
DevelopersAPIReferencedata

ProfitLoss

Whole-wallet figures need the permissions listed without assets:read; scoping the request with assetIds makes it a per-asset breakdown, which needs…

POST
/wallets/{walletId}/data/profitLoss

Authorization

bearerAuth
headerAuthorization<token>

A Walletguide API key (wg_…) or an OAuth bearer token. Paste the value only. Create a key under Wallet settings → API keys.

Path Parameters

walletId*string

The wallet id (row uuid)

Formatuuid

Request Body

application/json
  1. body
monthPeriod*

The month window the P&L table covers.

showUnassigned?boolean

Include uncategorized transactions (default true).

categoryIds?array<string>

Restrict to these category ids.

assetIds?array<string>

Restrict to these asset ids.

Response Body

profitLoss result

application/json
  1. response
rows*array<>
unassignedPerMonth*array<number>
currencyChangeEffectPerMonth*array<number>
totalsPerMonth*array<number>
months*array<string>

The month labels (YYYY-MM) each per-month array is aligned to.

Example Request
curl -X POST 'https://api.walletguide.com/wallets/497f6eca-6276-4993-bfeb-53cbbbba6f08/data/profitLoss' \  -H 'Content-Type: application/json' \  -d '{  "monthPeriod": {    "startMonth": "string",    "endMonth": "string"  }}'
Example Response
{  "rows": [    {      "id": "string",      "parentId": "string",      "kind": "category",      "level": 0,      "name": "string",      "amountsPerMonth": [        0      ],      "hasPlainTransactionsPerMonth": [        true      ]    }  ],  "unassignedPerMonth": [    0  ],  "currencyChangeEffectPerMonth": [    0  ],  "totalsPerMonth": [    0  ],  "months": [    "string"  ]}