Account
Get User PNL
Calculate profit and loss for a user’s trading activity
GET
Documentation Index
Fetch the complete documentation index at: https://docs.bison.markets/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Returns a comprehensive PNL (Profit and Loss) summary for a user, including:- Realized PNL - Profit/loss from completed trades and settlements
- Unrealized PNL - Estimated profit/loss on open positions
- Net PNL - Combined realized and unrealized PNL
- Total Fees - All trading fees paid
- Time Series - Optional PNL over time
To avoid ambiguity, we denote the smallest possible multiple of USDC (0.000001 USDC) as one
uusdc,
which stands for µUSDC (micro-USDC), and denote the smallest possible multiple of a contract (0.01 contract)
as one ccontract (centicontract).User-facing USDC balances are specified as fixed-point strings (e.g. "1.2625" for USDC). Contract quantities
in the API and SDK are specified as integer ccontracts strings (e.g. "1050" for 10.50 contracts at precision 2).PNL Calculation
Realized PNL is calculated as:User’s Ethereum wallet address (e.g.,
0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266)Filter PNL calculation to a specific market. When set, deposits and withdrawals are excluded from the calculation.
Start timestamp in milliseconds. Only includes transactions after this time.
End timestamp in milliseconds. Only includes transactions before this time.
Time-series granularity for the
timeSeries field:all- No time series returned (default)hour- Hourly PNL snapshotsday- Daily PNL snapshots
Response
Total USDC deposited in µUSDC (integer string). Excluded when filtering by
marketId.Total USDC withdrawn (claimed) in µUSDC (integer string). Excluded when filtering by
marketId.Realized profit/loss in µUSDC (integer string). Positive = profit, negative = loss.
Estimated unrealized profit/loss in µUSDC based on open positions (integer string).
Total PNL (realized + unrealized) in µUSDC (integer string).
Total trading fees paid in µUSDC (integer string).
Cumulative PNL over time. Only returned when
granularity is hour or day.