My App

Get PnL history

Retrieve the profit and loss history for the portfolio.

Requires authentication.

GET
/portfolios/pnl-history
OBSIDIAN-KEY<token>

In: header

OBSIDIAN-SECRET<token>

In: header

Query Parameters

start_time?string

(optional) Start timestamp in nanoseconds for filtering data. Default value is 1 hour before end time.

Formatuint64
end_time?string

(optional) End timestamp in nanoseconds for filtering data. Default value is current timestamp.

Formatuint64
interval?string

Time interval in nanoseconds. Default value is 60000000000 (1 minute).

Formatuint64

Response Body

application/json

application/json

curl -X GET "https://api.dev.obsidian.exchange/portfolios/pnl-history"
{
  "data": [
    {
      "time": "string",
      "pnl_usd": "string"
    }
  ]
}
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string",
      "property1": null,
      "property2": null
    }
  ]
}