Skip to content

Get PnL history

GET
/accounts/{address}/subaccounts/{subaccount_id}/pnl

Account equity / PnL time series, computed over a bounded window. The series starts from zero at the window edge — it is windowed PnL, not all-time equity.

Parameters

Path Parameters

address*

Owner address (20-byte Ethereum-style, 0x-hex).

Required
subaccount_id*
Type
integer
Required
Format
"uint16"
Minimum
0
Maximum
65535

Query Parameters

interval
Type
string
Valid values
"1h""1d"
Default
"1d"
since_ms

Window start (ms since epoch). Defaults to 30 days ago, which is also the maximum look-back.

Type
integer
Format
"int64"
limit

Max items to return.

Type
integer
Default
100
Maximum
1000

Responses

PnL points, oldest first.

application/json
JSON
[
  
{
  
  
"timestamp_ms": 0,
  
  
"equity": "-12500",
  
  
"unrealized_pnl": "-12500",
  
  
"realized_pnl": "-12500"
  
}
]

Playground

Variables
Key
Value

Samples

Powered by VitePress OpenAPI