Skip to content

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,
) -> Any
Unification Plan
  • Parameter created_on_or_after_height is missing
  • Parameter created_on_or_after is missing

Parameters

ParameterLocationTypeRequiredDescription
addressqueryAddresstrueThe wallet address that owns the account.
subaccount_numberquerySubaccountNumbertrueThe identifier for the specific subaccount within the wallet address.
limitqueryu32falseMaximum number of asset positions to return in the response.
createdBeforeOrAtHeightqueryHeightfalseFilters results to positions created at or before a specific blockchain height.
createdBeforeOrAtqueryDateTime in UTCfalseFilters results to positions created at or before a specific timestamp (ISO 8601 format).
createdOnOrAfterHeightqueryHeightfalseFilters results to positions created on or after a specific blockchain height.
createdOnOrAfterqueryDateTime in UTCfalseFilters results to positions created on or after a specific timestamp (ISO 8601 format).
pagequeryu32falseThe page number for paginated results.

Response

StatusMeaningSchemaDescription
200OKPnlTicksResponseObject ⛁The historical PnLs data.
400Bad RequestThe request was malformed or invalid.
404Not FoundThe subaccount was not found.
API Example