Skip to Content
Scalar
Data APIs

Get PNL history

Returns hourly net profit history from a start timestamp.

GET
/account/{user}/pnl-history

Returns hourly net profit history from a start timestamp.

Path Parameters

user*string

User address in hex format (0x prefix optional)

Query Parameters

from_timestamp*number

Earliest hour to include, Unix timestamp (seconds)

Response Body

Hourly net profit history

application/json
  1. response

Hourly net profit history

items*array<>
Example Request
curl -X GET 'https://data.scalar.market/account/string/pnl-history?from_timestamp=0'
Example Response
{
  "items": [
    {
      "timestamp": 0,
      "net_profit": "string"
    }
  ]
}