Get Historical PNL
Retrieves historical profit and loss (PNL) data for a specific subaccount on the exchange. These records provide insights into the trading performance over time.
Method Declaration
Python
async def get_subaccount_historical_pnls(
self,
address: str,
subaccount_number: int,
effective_before_or_at: Optional[str] = None,
effective_at_or_after: Optional[str] = None,
) -> AnyUnification Plan
- Parameter
created_on_or_after_heightis missing - Parameter
created_on_or_afteris missing
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
address | query | Address | true | The wallet address that owns the account. |
subaccount_number | query | SubaccountNumber | true | The identifier for the specific subaccount within the wallet address. |
limit | query | u32 | false | Maximum number of asset positions to return in the response. |
createdBeforeOrAtHeight | query | Height | false | Filters results to positions created at or before a specific blockchain height. |
createdBeforeOrAt | query | DateTime in UTC | false | Filters results to positions created at or before a specific timestamp (ISO 8601 format). |
createdOnOrAfterHeight | query | Height | false | Filters results to positions created on or after a specific blockchain height. |
createdOnOrAfter | query | DateTime in UTC | false | Filters results to positions created on or after a specific timestamp (ISO 8601 format). |
page | query | u32 | false | The page number for paginated results. |
Response
| Status | Meaning | Schema | Description |
|---|---|---|---|
200 | OK | PnlTicksResponseObject ⛁ | The historical PnLs data. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The subaccount was not found. |