Skip to main content
GET
get wallet profit & loss
25 credits per request
In Query field “connectionId”: credits are multiplied by the number of values.
If the value of “connectionId” in Query is “all”, multiplier is 250 credits.
In Query field “blockchain”: credits are multiplied by the number of values.
If the value of “blockchain” in Query is “all”, multiplier is 250 credits.
Multipliers can be applied multiple times.

  • Wallet holdings with coin details, quantities, current prices, and total cost basis.
  • Profit and loss breakdowns for each holding, including realized, unrealized, all-time, 24-hour, and last-trade values.
  • Average buy and sell prices, plus profit percentages, so you can understand how each position is performing.
  • A summary object with total value, total cost, profit, and profit percentage for the filtered result set.
  • address plus connectionId/blockchain
  • Raw wallet requests require transactions to be synced first with PATCH /wallet/transactions
  • coinId: Filter the result and summary by coin ID
  • page & limit: Control pagination

Authorizations

X-API-KEY
string
header
required

API key required to access the endpoints. Generate one from your dashboard at https://openapi.coinstats.app and pass it in the X-API-KEY request header. Never expose your key in client-side code.

Query Parameters

page
number

Page number to retrieve (1-based indexing)

Example:

1

limit
number
default:1000

Number of P/L items to return per page.

Example:

1000

address
string

Wallet address for raw wallet PnL data.

Example:

"0x1234567890abcdef1234567890abcdef12345678"

connectionId
string

Single wallet connection identifier from GET /wallet/blockchains. Required with address.

Example:

"ethereum"

blockchain
string

Blockchain identifier from GET /wallet/blockchains. Used when connectionId is not provided.

Example:

"ethereum"

coinId
string

Filter PnL data by coin ID.

Example:

"bitcoin"

Response

get wallet profit & loss

result
object[]
required

Portfolio holdings with prices, PnL fields, averages, and totalCost

summary
object
required

Totals calculated from the filtered result set