derivative
Get Historical PnL
Retrieves historical profit and loss records for the specified address and sub-account.
💡 Compute Unit Value: 65 (Fixed)
get/defi/v1/derivative/gethistoricalpnl
Request
- Base URLhttps://svc.blockdaemon.com
- URLhttps://svc.blockdaemon.com/defi/v1/derivative/gethistoricalpnl
- AuthAPI key in header X-API-Key
Query parameters
addressstring required
The dYdX wallet address of the user.
Example:0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402
derivativeId'1000'
The unique identifier for dYdX V4.
Example:1000
subAccountNumberstring required
The sub-account number for the user. This specifies which sub-account's orders should be retrieved.
Example:0
Response
Successful response
Example response
{
"status": 200,
"msg": "success",
"data": {
"historicalPnL": [
{
"id": "4c3e3f94-ea28-5d34-8c60-95acc0e975fc",
"subaccountId": "8845f855-4943-5f72-9ad2-d0a2a416c5bd",
"equity": "509.314640",
"totalPnl": "19.086934",
"netTransfers": "0.000000",
"createdAt": "2024-01-16T09:03:28.508Z",
"blockHeight": "5355500",
"blockTime": "2024-01-16T09:03:21.614Z"
},
{
"id": "ee9d8bc8-af28-5f91-8edd-2982c6ff42ee",
"subaccountId": "8845f855-4943-5f72-9ad2-d0a2a416c5bd",
"equity": "509.314640",
"totalPnl": "19.086934",
"netTransfers": "0.000000",
"createdAt": "2024-01-16T09:02:58.369Z",
"blockHeight": "5355479",
"blockTime": "2024-01-16T09:02:52.074Z"
},
{
"id": "35420152-944c-5898-9465-42f4ec55bed4",
"subaccountId": "8845f855-4943-5f72-9ad2-d0a2a416c5bd",
"equity": "509.314640",
"totalPnl": "19.086934",
"netTransfers": "0.000000",
"createdAt": "2024-01-16T09:02:28.204Z",
"blockHeight": "5355457",
"blockTime": "2024-01-16T09:02:21.962Z"
},
{
"id": "b7b5f39a-47d4-55f2-b46f-48795dd83be9",
"subaccountId": "8845f855-4943-5f72-9ad2-d0a2a416c5bd",
"equity": "509.314640",
"totalPnl": "19.086934",
"netTransfers": "0.000000",
"createdAt": "2024-01-16T09:01:58.165Z",
"blockHeight": "5355434",
"blockTime": "2024-01-16T09:01:51.006Z"
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.