Get Parent Historical Pnl
Query for profit and loss report for the specified time/block range of a parent subaccount.
Method Declaration
Python
async def get_parent_historical_pnls(
self,
address: str,
subaccount_number: int,
limit: Optional[int] = None,
created_before_or_at_height: Optional[int] = None,
created_before_or_at: Optional[str] = None,
created_on_or_after_height: Optional[int] = None,
created_on_or_after: Optional[str] = None,
) -> Any:Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
address | query | Address | true | The wallet address that owns the parent subaccount. |
parentSubaccountNumber | 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 | Restricts results to positions created at or before a specific blockchain height. |
createdBeforeOrAt | query | DateTime in UTC | false | Restricts results to positions created at or before a specific timestamp (ISO 8601 format). |
createdOnOrAfterHeight | query | Height | false | Restricts results to positions created on or after a specific blockchain height. |
createdOnOrAfter | query | DateTime in UTC | false | Restricts results to positions created on or after a specific timestamp (ISO 8601 format). |
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 parent subaccount was not found. |